Hello,
This patch series stems from subsystem-wide changes I wanted to compile-test with an ARM64 cross-compiler. My laziness to fire a 32-bit ARM build probably resulted in more time being spent writing these patches, but hopefully they'll turn out to be useful for more people :-)
Patches 1/7 and 2/7 are fixes for compilation warnings on 64-bit platforms in the omapdrm and sti-drm drivers. They are a dependency for the Kconfig changes that follow to avoid introducing build warnings, but could also be merged before.
Patches 3/7 to 7/7 enable compilation of the imx-dcss, omapdrm, sti-drm, tegra-drm and tilcdc drivers on ARM64 with COMPILE_TEST. The patches are independent from each other, so they can be picked by their respective maintainers.
We could also extend test compilation to more architecture, but I didn't want to remove all dependencies on ARM or ARM64 at this point for fear or triggering build warnings that I wouldn't be able to catch locally. If there's a consensus that fully relaxing the platform requirement is better, I can submit a new version that does so and rely on the 0day bot to catch issues.
Laurent Pinchart (7): drm/omap: Cast pointer to integer safely drm/sti: Use correct printk format specifiers for size_t drm/imx/dcss: Enable COMPILE_TEST on all ARM64 platforms drm/omap: Enable COMPILE_TEST on all ARM and ARM64 platforms drm/sti: Enable COMPILE_TEST on all ARM and ARM64 platforms drm/tegra: Enable COMPILE_TEST on all ARM64 platforms drm/tilcdc: Enable COMPILE_TEST on all ARM64 platforms
drivers/gpu/drm/imx/dcss/Kconfig | 3 ++- drivers/gpu/drm/omapdrm/Kconfig | 2 +- drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- drivers/gpu/drm/sti/Kconfig | 3 ++- drivers/gpu/drm/sti/sti_hqvdp.c | 4 ++-- drivers/gpu/drm/tegra/Kconfig | 2 +- drivers/gpu/drm/tilcdc/Kconfig | 3 ++- drivers/gpu/host1x/Kconfig | 2 +- 8 files changed, 12 insertions(+), 9 deletions(-)
On 64-bit platforms, the compiler complains that casting a void pointer to an unsigned int loses data. Cast the pointer to a uintptr_t unsigned to fix this.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index f86e20578143..c05d3975cb31 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -572,7 +572,7 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev) priv->dss->mgr_ops_priv = priv;
soc = soc_device_match(omapdrm_soc_devices); - priv->omaprev = soc ? (unsigned int)soc->data : 0; + priv->omaprev = soc ? (uintptr_t)soc->data : 0; priv->wq = alloc_ordered_workqueue("omapdrm", 0);
mutex_init(&priv->list_lock);
On 28/07/2021 18:37, Laurent Pinchart wrote:
On 64-bit platforms, the compiler complains that casting a void pointer to an unsigned int loses data. Cast the pointer to a uintptr_t unsigned to fix this.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index f86e20578143..c05d3975cb31 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -572,7 +572,7 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev) priv->dss->mgr_ops_priv = priv;
soc = soc_device_match(omapdrm_soc_devices);
- priv->omaprev = soc ? (unsigned int)soc->data : 0;
priv->omaprev = soc ? (uintptr_t)soc->data : 0; priv->wq = alloc_ordered_workqueue("omapdrm", 0);
mutex_init(&priv->list_lock);
Looks fine, although the subject sounds odd. Why was the cast "unsafe" before, and "safe" now?
There's also another bunch of warnings I see:
drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_vc_send_long’: drivers/gpu/drm/omapdrm/dss/dsi.c:7:25: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘const long unsigned int’} [-Wformat=] 7 | #define DSS_SUBSYS_NAME "DSI" | ^~~~~ drivers/gpu/drm/omapdrm/dss/dss.h:30:21: note: in expansion of macro ‘DSS_SUBSYS_NAME’ 30 | #define pr_fmt(fmt) DSS_SUBSYS_NAME ": " fmt | ^~~~~~~~~~~~~~~ ./include/linux/dynamic_debug.h:134:15: note: in expansion of macro ‘pr_fmt’ 134 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ ./include/linux/dynamic_debug.h:152:2: note: in expansion of macro ‘__dynamic_func_call’ 152 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ ./include/linux/dynamic_debug.h:162:2: note: in expansion of macro ‘_dynamic_func_call’ 162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ | ^~~~~~~~~~~~~~~~~~ ./include/linux/printk.h:471:2: note: in expansion of macro ‘dynamic_pr_debug’ 471 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~ drivers/gpu/drm/omapdrm/dss/dss.h:36:2: note: in expansion of macro ‘pr_debug’ 36 | pr_debug(format, ## __VA_ARGS__) | ^~~~~~~~ drivers/gpu/drm/omapdrm/dss/dsi.c:2097:3: note: in expansion of macro ‘DSSDBG’ 2097 | DSSDBG("dsi_vc_send_long, %d bytes\n", msg->tx_len); | ^~~~~~ In file included from ./include/linux/printk.h:7, from ./include/linux/kernel.h:19, from drivers/gpu/drm/omapdrm/dss/dsi.c:9: drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_vc_generic_read’: ./include/linux/kern_levels.h:5:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ {aka ‘const long unsigned int’} [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ./include/linux/kern_levels.h:11:18: note: in expansion of macro ‘KERN_SOH’ 11 | #define KERN_ERR KERN_SOH "3" /* error conditions */ | ^~~~~~~~ ./include/linux/printk.h:390:9: note: in expansion of macro ‘KERN_ERR’ 390 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~ drivers/gpu/drm/omapdrm/dss/dss.h:40:2: note: in expansion of macro ‘pr_err’ 40 | pr_err("omapdss " DSS_SUBSYS_NAME " error: " format, ##__VA_ARGS__) | ^~~~~~ drivers/gpu/drm/omapdrm/dss/dsi.c:2393:2: note: in expansion of macro ‘DSSERR’ 2393 | DSSERR("%s(vc %d, reqlen %d) failed\n", __func__, vc, msg->tx_len); | ^~~~~~
Tomi
Hi Tomi,
On Thu, Jul 29, 2021 at 09:13:17AM +0300, Tomi Valkeinen wrote:
On 28/07/2021 18:37, Laurent Pinchart wrote:
On 64-bit platforms, the compiler complains that casting a void pointer to an unsigned int loses data. Cast the pointer to a uintptr_t unsigned to fix this.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index f86e20578143..c05d3975cb31 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -572,7 +572,7 @@ static int omapdrm_init(struct omap_drm_private *priv, struct device *dev) priv->dss->mgr_ops_priv = priv;
soc = soc_device_match(omapdrm_soc_devices);
- priv->omaprev = soc ? (unsigned int)soc->data : 0;
priv->omaprev = soc ? (uintptr_t)soc->data : 0; priv->wq = alloc_ordered_workqueue("omapdrm", 0);
mutex_init(&priv->list_lock);
Looks fine, although the subject sounds odd. Why was the cast "unsafe" before, and "safe" now?
The result is indeed exactly the same. It was safe before, because we know the value won't exceed 32 bits. I'll s/safely/without generating a warning/.
There's also another bunch of warnings I see:
I wonder how I missed those. Will fix.
drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_vc_send_long’: drivers/gpu/drm/omapdrm/dss/dsi.c:7:25: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘const long unsigned int’} [-Wformat=] 7 | #define DSS_SUBSYS_NAME "DSI" | ^~~~~ drivers/gpu/drm/omapdrm/dss/dss.h:30:21: note: in expansion of macro ‘DSS_SUBSYS_NAME’ 30 | #define pr_fmt(fmt) DSS_SUBSYS_NAME ": " fmt | ^~~~~~~~~~~~~~~ ./include/linux/dynamic_debug.h:134:15: note: in expansion of macro ‘pr_fmt’ 134 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ ./include/linux/dynamic_debug.h:152:2: note: in expansion of macro ‘__dynamic_func_call’ 152 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ ./include/linux/dynamic_debug.h:162:2: note: in expansion of macro ‘_dynamic_func_call’ 162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ | ^~~~~~~~~~~~~~~~~~ ./include/linux/printk.h:471:2: note: in expansion of macro ‘dynamic_pr_debug’ 471 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~ drivers/gpu/drm/omapdrm/dss/dss.h:36:2: note: in expansion of macro ‘pr_debug’ 36 | pr_debug(format, ## __VA_ARGS__) | ^~~~~~~~ drivers/gpu/drm/omapdrm/dss/dsi.c:2097:3: note: in expansion of macro ‘DSSDBG’ 2097 | DSSDBG("dsi_vc_send_long, %d bytes\n", msg->tx_len); | ^~~~~~ In file included from ./include/linux/printk.h:7, from ./include/linux/kernel.h:19, from drivers/gpu/drm/omapdrm/dss/dsi.c:9: drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_vc_generic_read’: ./include/linux/kern_levels.h:5:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ {aka ‘const long unsigned int’} [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ./include/linux/kern_levels.h:11:18: note: in expansion of macro ‘KERN_SOH’ 11 | #define KERN_ERR KERN_SOH "3" /* error conditions */ | ^~~~~~~~ ./include/linux/printk.h:390:9: note: in expansion of macro ‘KERN_ERR’ 390 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~ drivers/gpu/drm/omapdrm/dss/dss.h:40:2: note: in expansion of macro ‘pr_err’ 40 | pr_err("omapdss " DSS_SUBSYS_NAME " error: " format, ##__VA_ARGS__) | ^~~~~~ drivers/gpu/drm/omapdrm/dss/dsi.c:2393:2: note: in expansion of macro ‘DSSERR’ 2393 | DSSERR("%s(vc %d, reqlen %d) failed\n", __func__, vc, msg->tx_len); | ^~~~~~
The correct format specifier for size_t is %zu. Using %d (or %u) generates a warning on 64-bit platforms. Fix it.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- drivers/gpu/drm/sti/sti_hqvdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c index d09b08995b12..3c61ba8b43e0 100644 --- a/drivers/gpu/drm/sti/sti_hqvdp.c +++ b/drivers/gpu/drm/sti/sti_hqvdp.c @@ -927,12 +927,12 @@ static void sti_hqvdp_start_xp70(struct sti_hqvdp *hqvdp)
header = (struct fw_header *)firmware->data; if (firmware->size < sizeof(*header)) { - DRM_ERROR("Invalid firmware size (%d)\n", firmware->size); + DRM_ERROR("Invalid firmware size (%zu)\n", firmware->size); goto out; } if ((sizeof(*header) + header->rd_size + header->wr_size + header->pmem_size + header->dmem_size) != firmware->size) { - DRM_ERROR("Invalid fmw structure (%d+%d+%d+%d+%d != %d)\n", + DRM_ERROR("Invalid fmw structure (%zu+%d+%d+%d+%d != %zu)\n", sizeof(*header), header->rd_size, header->wr_size, header->pmem_size, header->dmem_size, firmware->size);
On 7/28/21 5:37 PM, Laurent Pinchart wrote:
The correct format specifier for size_t is %zu. Using %d (or %u) generates a warning on 64-bit platforms. Fix it.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
drivers/gpu/drm/sti/sti_hqvdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c index d09b08995b12..3c61ba8b43e0 100644 --- a/drivers/gpu/drm/sti/sti_hqvdp.c +++ b/drivers/gpu/drm/sti/sti_hqvdp.c @@ -927,12 +927,12 @@ static void sti_hqvdp_start_xp70(struct sti_hqvdp *hqvdp)
header = (struct fw_header *)firmware->data; if (firmware->size < sizeof(*header)) {
DRM_ERROR("Invalid firmware size (%d)\n", firmware->size);
goto out; } if ((sizeof(*header) + header->rd_size + header->wr_size + header->pmem_size + header->dmem_size) != firmware->size) {DRM_ERROR("Invalid firmware size (%zu)\n", firmware->size);
DRM_ERROR("Invalid fmw structure (%d+%d+%d+%d+%d != %d)\n",
DRM_ERROR("Invalid fmw structure (%zu+%d+%d+%d+%d != %zu)\n",
Hi Laurent,
Looping Benjamin (new email address) and Alain (future maintainer of drm/sti).
Reviewed-by: Philippe Cornu philippe.cornu@foss.st.com Many thanks for your patch, Philippe :-)
sizeof(*header), header->rd_size, header->wr_size, header->pmem_size, header->dmem_size, firmware->size);
To extend test coverage, relax the dependency on ARCH_MXC to also enable compilation when COMPILE_TEST is selected.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- drivers/gpu/drm/imx/dcss/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/imx/dcss/Kconfig b/drivers/gpu/drm/imx/dcss/Kconfig index 2b17a964ff05..ad9844fb85ac 100644 --- a/drivers/gpu/drm/imx/dcss/Kconfig +++ b/drivers/gpu/drm/imx/dcss/Kconfig @@ -3,7 +3,8 @@ config DRM_IMX_DCSS select IMX_IRQSTEER select DRM_KMS_CMA_HELPER select VIDEOMODE_HELPERS - depends on DRM && ARCH_MXC && ARM64 + depends on DRM + depends on ARM64 && (ARCH_MXC || COMPILE_TEST) help Choose this if you have a NXP i.MX8MQ based system and want to use the Display Controller Subsystem. This option enables DCSS support.
Hi Laurent,
On Wed, Jul 28, 2021 at 5:37 PM Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com wrote:
To extend test coverage, relax the dependency on ARCH_MXC to also enable compilation when COMPILE_TEST is selected.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
Thanks for your patch!
--- a/drivers/gpu/drm/imx/dcss/Kconfig +++ b/drivers/gpu/drm/imx/dcss/Kconfig @@ -3,7 +3,8 @@ config DRM_IMX_DCSS select IMX_IRQSTEER select DRM_KMS_CMA_HELPER select VIDEOMODE_HELPERS
depends on DRM && ARCH_MXC && ARM64
depends on DRM
depends on ARM64 && (ARCH_MXC || COMPILE_TEST)
As you now have two depends statements, I think this would be easier to read by maintaining a strict separation between "hard" and "soft" dependencies:
depends on DRM && ARM64 depends on ARCH_MXC || COMPILE_TEST
Gr{oetje,eeting}s,
Geert
On Fri, 2021-07-30 at 14:10 +0200, Geert Uytterhoeven wrote:
Hi Laurent,
On Wed, Jul 28, 2021 at 5:37 PM Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com wrote:
To extend test coverage, relax the dependency on ARCH_MXC to also enable compilation when COMPILE_TEST is selected.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
Thanks for your patch!
--- a/drivers/gpu/drm/imx/dcss/Kconfig +++ b/drivers/gpu/drm/imx/dcss/Kconfig @@ -3,7 +3,8 @@ config DRM_IMX_DCSS select IMX_IRQSTEER select DRM_KMS_CMA_HELPER select VIDEOMODE_HELPERS
depends on DRM && ARCH_MXC && ARM64
depends on DRM
depends on ARM64 && (ARCH_MXC || COMPILE_TEST)
As you now have two depends statements, I think this would be easier to read by maintaining a strict separation between "hard" and "soft" dependencies:
depends on DRM && ARM64 depends on ARCH_MXC || COMPILE_TEST
I would let (ARCH_MXC && ARM64) stay together, and as Tomi suggested, lift the ARM64 limitation if COMPILE_TEST is enabled:
depends on DRM depends on (ARCH_MXC && ARM64) || COMPILE_TEST
regards Philipp
To extend test coverage, relax the dependency on ARCH_OMAP2PLUS or ARCH_MULTIPLATFORM to also enable compilation on ARM or ARM4 when COMPILE_TEST is selected.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- drivers/gpu/drm/omapdrm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig index e7281da5bc6a..fd5ef00444c1 100644 --- a/drivers/gpu/drm/omapdrm/Kconfig +++ b/drivers/gpu/drm/omapdrm/Kconfig @@ -2,7 +2,7 @@ config DRM_OMAP tristate "OMAP DRM" depends on DRM - depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM + depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM || ((ARM || ARM64) && COMPILE_TEST) select OMAP2_DSS select DRM_KMS_HELPER select VIDEOMODE_HELPERS
Hi Laurent,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tegra-drm/drm/tegra/for-next] [also build test WARNING on tegra/for-next drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next linus/master v5.14-rc3 next-20210730] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Laurent-Pinchart/drm-Extend-COMPILE... base: git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next config: arm64-allyesconfig (attached as .config) compiler: aarch64-linux-gcc (GCC) 10.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/de95f9a00c85a831f2029e3bbbc59183e029... git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Laurent-Pinchart/drm-Extend-COMPILE_TEST-support-to-some-ARM-drivers/20210728-234045 git checkout de95f9a00c85a831f2029e3bbbc59183e029cd8c # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot lkp@intel.com
All warnings (new ones prefixed by >>):
drivers/gpu/drm/omapdrm/dss/dsi.c: In function 'dsi_vc_send_long':
drivers/gpu/drm/omapdrm/dss/dsi.c:7:25: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'const long unsigned int'} [-Wformat=]
7 | #define DSS_SUBSYS_NAME "DSI" | ^~~~~ drivers/gpu/drm/omapdrm/dss/dss.h:30:21: note: in expansion of macro 'DSS_SUBSYS_NAME' 30 | #define pr_fmt(fmt) DSS_SUBSYS_NAME ": " fmt | ^~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:134:15: note: in expansion of macro 'pr_fmt' 134 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ include/linux/dynamic_debug.h:152:2: note: in expansion of macro '__dynamic_func_call' 152 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:162:2: note: in expansion of macro '_dynamic_func_call' 162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ | ^~~~~~~~~~~~~~~~~~ include/linux/printk.h:471:2: note: in expansion of macro 'dynamic_pr_debug' 471 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~ drivers/gpu/drm/omapdrm/dss/dss.h:36:2: note: in expansion of macro 'pr_debug' 36 | pr_debug(format, ## __VA_ARGS__) | ^~~~~~~~ drivers/gpu/drm/omapdrm/dss/dsi.c:2097:3: note: in expansion of macro 'DSSDBG' 2097 | DSSDBG("dsi_vc_send_long, %d bytes\n", msg->tx_len); | ^~~~~~ In file included from include/linux/printk.h:7, from include/linux/kernel.h:19, from drivers/gpu/drm/omapdrm/dss/dsi.c:9: drivers/gpu/drm/omapdrm/dss/dsi.c: In function 'dsi_vc_generic_read': include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' {aka 'const long unsigned int'} [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' 11 | #define KERN_ERR KERN_SOH "3" /* error conditions */ | ^~~~~~~~ include/linux/printk.h:390:9: note: in expansion of macro 'KERN_ERR' 390 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~ drivers/gpu/drm/omapdrm/dss/dss.h:40:2: note: in expansion of macro 'pr_err' 40 | pr_err("omapdss " DSS_SUBSYS_NAME " error: " format, ##__VA_ARGS__) | ^~~~~~ drivers/gpu/drm/omapdrm/dss/dsi.c:2393:2: note: in expansion of macro 'DSSERR' 2393 | DSSERR("%s(vc %d, reqlen %d) failed\n", __func__, vc, msg->tx_len); | ^~~~~~
vim +7 drivers/gpu/drm/omapdrm/dss/dsi.c
3de7a1dc0c9d29 drivers/video/omap2/dss/dsi.c Tomi Valkeinen 2009-10-28 @7 #define DSS_SUBSYS_NAME "DSI" 3de7a1dc0c9d29 drivers/video/omap2/dss/dsi.c Tomi Valkeinen 2009-10-28 8
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
To extend test coverage, relax the dependency on ARCH_STI or ARCH_MULTIPLATFORM to also enable compilation on ARM or ARM4 when COMPILE_TEST is selected.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- drivers/gpu/drm/sti/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig index d0cfdd36b38f..e7d18893bc11 100644 --- a/drivers/gpu/drm/sti/Kconfig +++ b/drivers/gpu/drm/sti/Kconfig @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_STI tristate "DRM Support for STMicroelectronics SoC stiH4xx Series" - depends on OF && DRM && (ARCH_STI || ARCH_MULTIPLATFORM) + depends on OF && DRM + depends on ARCH_STI || ARCH_MULTIPLATFORM || ((ARM || ARM64) && COMPILE_TEST) select RESET_CONTROLLER select DRM_KMS_HELPER select DRM_GEM_CMA_HELPER
On 7/28/21 5:37 PM, Laurent Pinchart wrote:
To extend test coverage, relax the dependency on ARCH_STI or ARCH_MULTIPLATFORM to also enable compilation on ARM or ARM4 when
Hi Laurent,
Looping Benjamin (new email address) and Alain (future maintainer of drm/sti).
minor typo (ARM4 -> ARM64)
Reviewed-by: Philippe Cornu philippe.cornu@foss.st.com Many thanks for your patch, Philippe :-)
COMPILE_TEST is selected.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
drivers/gpu/drm/sti/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig index d0cfdd36b38f..e7d18893bc11 100644 --- a/drivers/gpu/drm/sti/Kconfig +++ b/drivers/gpu/drm/sti/Kconfig @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_STI tristate "DRM Support for STMicroelectronics SoC stiH4xx Series"
- depends on OF && DRM && (ARCH_STI || ARCH_MULTIPLATFORM)
- depends on OF && DRM
- depends on ARCH_STI || ARCH_MULTIPLATFORM || ((ARM || ARM64) && COMPILE_TEST) select RESET_CONTROLLER select DRM_KMS_HELPER select DRM_GEM_CMA_HELPER
To extend test coverage, support COMPILE_TEST on ARM64 in addition to ARM.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- drivers/gpu/drm/tegra/Kconfig | 2 +- drivers/gpu/host1x/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig index 5043dcaf1cf9..ab3093fdbfa8 100644 --- a/drivers/gpu/drm/tegra/Kconfig +++ b/drivers/gpu/drm/tegra/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_TEGRA tristate "NVIDIA Tegra DRM" - depends on ARCH_TEGRA || (ARM && COMPILE_TEST) + depends on ARCH_TEGRA || ((ARM || ARM64) && COMPILE_TEST) depends on COMMON_CLK depends on DRM depends on OF diff --git a/drivers/gpu/host1x/Kconfig b/drivers/gpu/host1x/Kconfig index 6dab94adf25e..c3a8521c8068 100644 --- a/drivers/gpu/host1x/Kconfig +++ b/drivers/gpu/host1x/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config TEGRA_HOST1X tristate "NVIDIA Tegra host1x driver" - depends on ARCH_TEGRA || (ARM && COMPILE_TEST) + depends on ARCH_TEGRA || ((ARM || ARM64) && COMPILE_TEST) select IOMMU_IOVA help Driver for the NVIDIA Tegra host1x hardware.
To extend test coverage, support COMPILE_TEST on ARM64 in addition to ARM.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- drivers/gpu/drm/tilcdc/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tilcdc/Kconfig b/drivers/gpu/drm/tilcdc/Kconfig index 9f505a149990..37009f4ace9f 100644 --- a/drivers/gpu/drm/tilcdc/Kconfig +++ b/drivers/gpu/drm/tilcdc/Kconfig @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_TILCDC tristate "DRM Support for TI LCDC Display Controller" - depends on DRM && OF && ARM + depends on DRM && OF + depends on ARM || (ARM64 && COMPILE_TEST) select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER
On 28/07/2021 18:37, Laurent Pinchart wrote:
Hello,
This patch series stems from subsystem-wide changes I wanted to compile-test with an ARM64 cross-compiler. My laziness to fire a 32-bit ARM build probably resulted in more time being spent writing these patches, but hopefully they'll turn out to be useful for more people :-)
Patches 1/7 and 2/7 are fixes for compilation warnings on 64-bit platforms in the omapdrm and sti-drm drivers. They are a dependency for the Kconfig changes that follow to avoid introducing build warnings, but could also be merged before.
Patches 3/7 to 7/7 enable compilation of the imx-dcss, omapdrm, sti-drm, tegra-drm and tilcdc drivers on ARM64 with COMPILE_TEST. The patches are independent from each other, so they can be picked by their respective maintainers.
We could also extend test compilation to more architecture, but I didn't want to remove all dependencies on ARM or ARM64 at this point for fear or triggering build warnings that I wouldn't be able to catch locally. If there's a consensus that fully relaxing the platform requirement is better, I can submit a new version that does so and rely on the 0day bot to catch issues.
I would allow compilation for any architecture if COMPILE_TEST is enabled. I think git grep shows that is how COMPILE_TEST is usually used.
Tomi
Hi Laurent,
On Wed, Jul 28, 2021 at 06:37:29PM +0300, Laurent Pinchart wrote:
Hello,
This patch series stems from subsystem-wide changes I wanted to compile-test with an ARM64 cross-compiler. My laziness to fire a 32-bit ARM build probably resulted in more time being spent writing these patches, but hopefully they'll turn out to be useful for more people :-)
Patches 1/7 and 2/7 are fixes for compilation warnings on 64-bit platforms in the omapdrm and sti-drm drivers. They are a dependency for the Kconfig changes that follow to avoid introducing build warnings, but could also be merged before.
Patches 3/7 to 7/7 enable compilation of the imx-dcss, omapdrm, sti-drm, tegra-drm and tilcdc drivers on ARM64 with COMPILE_TEST. The patches are independent from each other, so they can be picked by their respective maintainers.
We could also extend test compilation to more architecture, but I didn't want to remove all dependencies on ARM or ARM64 at this point for fear or triggering build warnings that I wouldn't be able to catch locally. If there's a consensus that fully relaxing the platform requirement is better, I can submit a new version that does so and rely on the 0day bot to catch issues.
I have alpha, sparc64, and a few more so we can get pretty good coverage before it hits -next. If we enable more build coverage then please address all W=1 warnings first.
I for once always builds with W=1 these days, and I see more and more warnings sneaking in again. So lets try to keep the noise level down.
Sam
Hi Sam,
On Thu, Jul 29, 2021 at 06:53:33PM +0200, Sam Ravnborg wrote:
On Wed, Jul 28, 2021 at 06:37:29PM +0300, Laurent Pinchart wrote:
Hello,
This patch series stems from subsystem-wide changes I wanted to compile-test with an ARM64 cross-compiler. My laziness to fire a 32-bit ARM build probably resulted in more time being spent writing these patches, but hopefully they'll turn out to be useful for more people :-)
Patches 1/7 and 2/7 are fixes for compilation warnings on 64-bit platforms in the omapdrm and sti-drm drivers. They are a dependency for the Kconfig changes that follow to avoid introducing build warnings, but could also be merged before.
Patches 3/7 to 7/7 enable compilation of the imx-dcss, omapdrm, sti-drm, tegra-drm and tilcdc drivers on ARM64 with COMPILE_TEST. The patches are independent from each other, so they can be picked by their respective maintainers.
We could also extend test compilation to more architecture, but I didn't want to remove all dependencies on ARM or ARM64 at this point for fear or triggering build warnings that I wouldn't be able to catch locally. If there's a consensus that fully relaxing the platform requirement is better, I can submit a new version that does so and rely on the 0day bot to catch issues.
I have alpha, sparc64, and a few more so we can get pretty good coverage before it hits -next.
It seems that the consensus is to enable COMPILE_TEST on all platforms, so I'll do that.
If we enable more build coverage then please address all W=1 warnings first.
I for once always builds with W=1 these days, and I see more and more warnings sneaking in again. So lets try to keep the noise level down.
Hmmmm... I build my kernel with -Werror to make sure I catch all warnings. W=1 doesn't play well with that :-S I'll see if I can turn the additional warnings into non-errors, but that may become a game of whack-a-mole.
dri-devel@lists.freedesktop.org