A couple more errors showed up in linux-next in the last few days, all because of missing header files. I have not seen these before, and most configurations appear to be fine. There must have been an implicit inclusion somewhere before that just got removed, but I couldn't find it and doing the explicit #include should always be better here.
Please apply for 4.7 to avoid regressing on randconfig builds.
Arnd
The omapdrm driver relies on this header to be included implicitly, but this does not always work, and I get this error in randconfig builds:
gpu/drm/omapdrm/dss/hdmi_phy.c: In function 'hdmi_phy_dump': gpu/drm/omapdrm/dss/hdmi_phy.c:34:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] gpu/drm/omapdrm/dss/hdmi_wp.c: In function 'hdmi_wp_dump': gpu/drm/omapdrm/dss/hdmi_wp.c:26:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] gpu/drm/omapdrm/dss/hdmi_pll.c: In function 'hdmi_pll_dump': gpu/drm/omapdrm/dss/hdmi_pll.c:30:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration]
This adds the #include statements in all files that have a seq_printf statement.
Signed-off-by: Arnd Bergmann arnd@arndb.de --- drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | 1 + drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 1 + drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | 1 + drivers/gpu/drm/omapdrm/omap_debugfs.c | 2 ++ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 + drivers/gpu/drm/omapdrm/omap_fb.c | 2 ++ drivers/gpu/drm/omapdrm/omap_gem.c | 1 + 7 files changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c index 1f5d19c119ce..f98b750fc499 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c @@ -13,6 +13,7 @@ #include <linux/io.h> #include <linux/platform_device.h> #include <linux/slab.h> +#include <linux/seq_file.h> #include <video/omapdss.h>
#include "dss.h" diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_pll.c b/drivers/gpu/drm/omapdrm/dss/hdmi_pll.c index 06e23a7c432c..f1015e8b8267 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_pll.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_pll.c @@ -16,6 +16,7 @@ #include <linux/io.h> #include <linux/platform_device.h> #include <linux/clk.h> +#include <linux/seq_file.h>
#include <video/omapdss.h>
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c b/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c index 13442b9052d1..055f62fca5dc 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c @@ -14,6 +14,7 @@ #include <linux/err.h> #include <linux/io.h> #include <linux/platform_device.h> +#include <linux/seq_file.h> #include <video/omapdss.h>
#include "dss.h" diff --git a/drivers/gpu/drm/omapdrm/omap_debugfs.c b/drivers/gpu/drm/omapdrm/omap_debugfs.c index 6f5fc14fc015..479bf24050f8 100644 --- a/drivers/gpu/drm/omapdrm/omap_debugfs.c +++ b/drivers/gpu/drm/omapdrm/omap_debugfs.c @@ -17,6 +17,8 @@ * this program. If not, see http://www.gnu.org/licenses/. */
+#include <linux/seq_file.h> + #include <drm/drm_crtc.h> #include <drm/drm_fb_helper.h>
diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index de275a5be1db..4ceed7a9762f 100644 --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -27,6 +27,7 @@ #include <linux/module.h> #include <linux/platform_device.h> /* platform_device() */ #include <linux/sched.h> +#include <linux/seq_file.h> #include <linux/slab.h> #include <linux/time.h> #include <linux/vmalloc.h> diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index 610962396eb0..dce41e176a64 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.c +++ b/drivers/gpu/drm/omapdrm/omap_fb.c @@ -17,6 +17,8 @@ * this program. If not, see http://www.gnu.org/licenses/. */
+#include <linux/seq_file.h> + #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h>
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 907154f5b67c..d2d879da6287 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -17,6 +17,7 @@ * this program. If not, see http://www.gnu.org/licenses/. */
+#include <linux/seq_file.h> #include <linux/shmem_fs.h> #include <linux/spinlock.h> #include <linux/pfn_t.h>
Some parts of the OMAP drm driver rely on implicit inclusion of linux/of.h but fail in some configurations:
drivers/gpu/drm/omapdrm/dss/hdmi4.c: In function 'hdmi_probe_of': drivers/gpu/drm/omapdrm/dss/hdmi4.c:564:2: error: implicit declaration of function 'of_node_put' [-Werror=implicit-function-declaration] drivers/gpu/drm/omapdrm/dss/hdmi5.c: In function 'hdmi_probe_of': drivers/gpu/drm/omapdrm/dss/hdmi5.c:590:2: error: implicit declaration of function 'of_node_put' [-Werror=implicit-function-declaration]
This adds an explicit #include statement to those files.
Signed-off-by: Arnd Bergmann arnd@arndb.de --- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 1 + drivers/gpu/drm/omapdrm/dss/hdmi5.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index f892ae157ff3..079bcfcbc8ef 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -25,6 +25,7 @@ #include <linux/io.h> #include <linux/interrupt.h> #include <linux/mutex.h> +#include <linux/of.h> #include <linux/delay.h> #include <linux/string.h> #include <linux/platform_device.h> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index a43f7b10e113..68ac2491d4b1 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -31,6 +31,7 @@ #include <linux/interrupt.h> #include <linux/mutex.h> #include <linux/delay.h> +#include <linux/of.h> #include <linux/string.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h>
A lot of the display drivers for OMAP use the gpio descriptor functions that are only available in linux/gpio.h if GPIOLIB is enabled and otherwise produce a build error:
drivers/gpu/drm/omapdrm/displays/encoder-opa362.c: In function 'opa362_enable': drivers/gpu/drm/omapdrm/displays/encoder-opa362.c:101:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration] drivers/gpu/drm/omapdrm/displays/panel-dpi.c: In function 'panel_dpi_probe_pdata': drivers/gpu/drm/omapdrm/displays/panel-dpi.c:189:23: error: implicit declaration of function 'gpio_to_desc' [-Werror=implicit-function-declaration] drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c: In function 'sharp_ls_enable': drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c:120:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]
This replaces the existing linux/gpio.h with linux/gpio/consumer.h where needed. In case of panel-lgphilips-lb035q02.c however, we also have to include linux/gpio.h to get the definition of gpio_is_valid and gpio_set_value_cansleep that are used for the non-DT case.
Signed-off-by: Arnd Bergmann arnd@arndb.de --- drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | 1 + drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | 2 +- drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 1 + drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c | 2 +- 10 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c index 225fd8d6ab31..667ca4a24ece 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c @@ -9,6 +9,7 @@ * the Free Software Foundation. */
+#include <linux/gpio/consumer.h> #include <linux/slab.h> #include <linux/module.h> #include <linux/platform_device.h> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c index 8c246c213e06..9594ff7a2b0c 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c @@ -14,7 +14,7 @@ * the Free Software Foundation. */
-#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/slab.h> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c index 2fd5602880a7..671806ca7d6a 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c @@ -9,7 +9,7 @@ * the Free Software Foundation. */
-#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/slab.h> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index e780fd4f8b46..7c2331be8d15 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c @@ -9,7 +9,7 @@ * the Free Software Foundation. */
-#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/slab.h> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 36485c2137ce..2b118071b5a1 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -14,7 +14,7 @@ #include <linux/backlight.h> #include <linux/delay.h> #include <linux/fb.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/interrupt.h> #include <linux/jiffies.h> #include <linux/module.h> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c index 458f77bc473d..ac680e1de603 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c @@ -15,6 +15,7 @@ #include <linux/spi/spi.h> #include <linux/mutex.h> #include <linux/gpio.h> +#include <linux/gpio/consumer.h>
#include <video/omapdss.h> #include <video/omap-panel-data.h> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c index 780cb263a318..38d2920a95e6 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c @@ -15,7 +15,7 @@ #include <linux/delay.h> #include <linux/spi/spi.h> #include <linux/fb.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/of_gpio.h>
#include <video/omapdss.h> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c index 529a017602e4..4363fffc87e3 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c @@ -10,7 +10,7 @@ */
#include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/module.h> #include <linux/of.h> #include <linux/of_gpio.h> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c index 31efcca801bd..deb416736aad 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c @@ -29,7 +29,7 @@ #include <linux/sched.h> #include <linux/backlight.h> #include <linux/fb.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/of.h> #include <linux/of_gpio.h>
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c index 03e2beb7b4f0..d93175b03a12 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c @@ -14,7 +14,7 @@ #include <linux/delay.h> #include <linux/spi/spi.h> #include <linux/regulator/consumer.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/err.h> #include <linux/slab.h> #include <linux/of_gpio.h>
We get a harmless build warning when trying to use the mediatek DRM driver with IOMMU support disabled:
warning: (DRM_MEDIATEK) selects IOMMU_DMA which has unmet direct dependencies (IOMMU_SUPPORT)
However, the IOMMU_DMA symbol is not meant to be used by drivers at all, and this driver doesn't seem to have a strict dependency on it other than using the mediatek IOMMU driver that does.
Since we also want to be able to do compile tests with the driver on other platforms, the IOMMU_DMA symbol should not be selected here.
Signed-off-by: Arnd Bergmann arnd@arndb.de --- If someone has a better explanation about why the 'select' is here, let me know, it certainly seems out of place.
drivers/gpu/drm/mediatek/Kconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index 0c06a69d7f04..545973f6b743 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -7,7 +7,6 @@ config DRM_MEDIATEK select DRM_KMS_HELPER select DRM_MIPI_DSI select DRM_PANEL - select IOMMU_DMA select MEMORY select MTK_SMI help
On Wednesday 11 May 2016 22:11:07 Arnd Bergmann wrote:
We get a harmless build warning when trying to use the mediatek DRM driver with IOMMU support disabled:
warning: (DRM_MEDIATEK) selects IOMMU_DMA which has unmet direct dependencies (IOMMU_SUPPORT)
However, the IOMMU_DMA symbol is not meant to be used by drivers at all, and this driver doesn't seem to have a strict dependency on it other than using the mediatek IOMMU driver that does.
Since we also want to be able to do compile tests with the driver on other platforms, the IOMMU_DMA symbol should not be selected here.
Signed-off-by: Arnd Bergmann arnd@arndb.de
If someone has a better explanation about why the 'select' is here, let me know, it certainly seems out of place.
Sorry, I didn't mean to send this as a reply to "More build fixes for omapdrm in current -next", I copied the wrong command line.
I'll resend it if necessary.
Arnd
On Wed, May 11, 2016 at 10:15:20PM +0200, Arnd Bergmann wrote:
On Wednesday 11 May 2016 22:11:07 Arnd Bergmann wrote:
We get a harmless build warning when trying to use the mediatek DRM driver with IOMMU support disabled:
warning: (DRM_MEDIATEK) selects IOMMU_DMA which has unmet direct dependencies (IOMMU_SUPPORT)
However, the IOMMU_DMA symbol is not meant to be used by drivers at all, and this driver doesn't seem to have a strict dependency on it other than using the mediatek IOMMU driver that does.
Since we also want to be able to do compile tests with the driver on other platforms, the IOMMU_DMA symbol should not be selected here.
Signed-off-by: Arnd Bergmann arnd@arndb.de
If someone has a better explanation about why the 'select' is here, let me know, it certainly seems out of place.
Sorry, I didn't mean to send this as a reply to "More build fixes for omapdrm in current -next", I copied the wrong command line.
I'll resend it if necessary.
That's probably the reason why patchwork didn't include the commit message in the downloaded mbox. I've pieced it together manually and applied this to topic/drm-misc.
Thanks, Thierry
On 11/05/16 21:11, Arnd Bergmann wrote:
We get a harmless build warning when trying to use the mediatek DRM driver with IOMMU support disabled:
warning: (DRM_MEDIATEK) selects IOMMU_DMA which has unmet direct dependencies (IOMMU_SUPPORT)
However, the IOMMU_DMA symbol is not meant to be used by drivers at all, and this driver doesn't seem to have a strict dependency on it other than using the mediatek IOMMU driver that does.
Since we also want to be able to do compile tests with the driver on other platforms, the IOMMU_DMA symbol should not be selected here.
Signed-off-by: Arnd Bergmann arnd@arndb.de
If someone has a better explanation about why the 'select' is here, let me know, it certainly seems out of place.
Ack - it's neither an IOMMU driver nor a DMA API implementation, so it has no business with IOMMU_DMA. If there's an IOMMU dependency in general it should be on MTK_IOMMU, not underlying implementation details.
Robin.
drivers/gpu/drm/mediatek/Kconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index 0c06a69d7f04..545973f6b743 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -7,7 +7,6 @@ config DRM_MEDIATEK select DRM_KMS_HELPER select DRM_MIPI_DSI select DRM_PANEL
- select IOMMU_DMA select MEMORY select MTK_SMI help
Am Mittwoch, den 11.05.2016, 22:11 +0200 schrieb Arnd Bergmann:
We get a harmless build warning when trying to use the mediatek DRM driver with IOMMU support disabled:
warning: (DRM_MEDIATEK) selects IOMMU_DMA which has unmet direct dependencies (IOMMU_SUPPORT)
However, the IOMMU_DMA symbol is not meant to be used by drivers at all, and this driver doesn't seem to have a strict dependency on it other than using the mediatek IOMMU driver that does.
Since we also want to be able to do compile tests with the driver on other platforms, the IOMMU_DMA symbol should not be selected here.
Signed-off-by: Arnd Bergmann arnd@arndb.de
If someone has a better explanation about why the 'select' is here, let me know, it certainly seems out of place.
No, it just has been there since the initial RFC and nobody noticed.
drivers/gpu/drm/mediatek/Kconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index 0c06a69d7f04..545973f6b743 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -7,7 +7,6 @@ config DRM_MEDIATEK select DRM_KMS_HELPER select DRM_MIPI_DSI select DRM_PANEL
- select IOMMU_DMA select MEMORY select MTK_SMI help
Acked-by: Philipp Zabel p.zabel@pengutronix.de
I tried make ARCH=arm64 allnoconfig and then set CONFIG_MODULES=y CONFIG_ARCH_MEDIATEK=y CONFIG_DRM=m CONFIG_DRM_MEDIATEK=m
And it builds fine with IOMMU_DMA/MTK_IOMMU disabled.
thanks Philipp
On 11/05/16 19:01, Arnd Bergmann wrote:
A couple more errors showed up in linux-next in the last few days, all because of missing header files. I have not seen these before, and most configurations appear to be fine. There must have been an implicit inclusion somewhere before that just got removed, but I couldn't find it and doing the explicit #include should always be better here.
Thanks. I picked the first one as is, and third one with some conflict resolutions. A patch similar to the second one was already queued.
Tomi
dri-devel@lists.freedesktop.org