diff mbox series

[v2,05/10] drm/armada: Allow build with COMPILE_TEST=y

Message ID 20241003111851.10453-6-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm: Increase COMPILE_TEST=y coverage | expand

Commit Message

Ville Syrjälä Oct. 3, 2024, 11:18 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Allow armada to be built with COMPILE_TEST=y for greater
coverage. Builds fine on x86/x86_64 at least.

Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/armada/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

kernel test robot Oct. 7, 2024, 12:19 a.m. UTC | #1
Hi Ville,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20241003]
[cannot apply to shawnguo/for-next linus/master rmk-arm/drm-armada-devel rmk-arm/drm-armada-fixes v6.12-rc1 v6.11 v6.11-rc7 v6.12-rc2]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ville-Syrjala/drm-tilcdc-Allow-build-without-__iowmb/20241003-192043
base:   next-20241003
patch link:    https://lore.kernel.org/r/20241003111851.10453-6-ville.syrjala%40linux.intel.com
patch subject: [PATCH v2 05/10] drm/armada: Allow build with COMPILE_TEST=y
config: csky-randconfig-r121-20241006 (https://download.01.org/0day-ci/archive/20241007/202410070736.GTeKJE6r-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20241007/202410070736.GTeKJE6r-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410070736.GTeKJE6r-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/armada/armada_gem.c:63:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void *addr @@
   drivers/gpu/drm/armada/armada_gem.c:63:37: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/gpu/drm/armada/armada_gem.c:63:37: sparse:     got void *addr
   drivers/gpu/drm/armada/armada_gem.c:185:28: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/gpu/drm/armada/armada_gem.c:185:28: sparse:     expected void *addr
   drivers/gpu/drm/armada/armada_gem.c:185:28: sparse:     got void [noderef] __iomem *

vim +63 drivers/gpu/drm/armada/armada_gem.c

96f60e37dc6609 Russell King    2012-08-15  40  
96f60e37dc6609 Russell King    2012-08-15  41  void armada_gem_free_object(struct drm_gem_object *obj)
96f60e37dc6609 Russell King    2012-08-15  42  {
96f60e37dc6609 Russell King    2012-08-15  43  	struct armada_gem_object *dobj = drm_to_armada_gem(obj);
dad75a5208ec88 Simona Vetter   2020-09-04  44  	struct armada_private *priv = drm_to_armada_dev(obj->dev);
96f60e37dc6609 Russell King    2012-08-15  45  
96f60e37dc6609 Russell King    2012-08-15  46  	DRM_DEBUG_DRIVER("release obj %p\n", dobj);
96f60e37dc6609 Russell King    2012-08-15  47  
96f60e37dc6609 Russell King    2012-08-15  48  	drm_gem_free_mmap_offset(&dobj->obj);
96f60e37dc6609 Russell King    2012-08-15  49  
0b8ebeacf5ef43 Simona Vetter   2015-11-24  50  	might_lock(&priv->linear_lock);
0b8ebeacf5ef43 Simona Vetter   2015-11-24  51  
96f60e37dc6609 Russell King    2012-08-15  52  	if (dobj->page) {
96f60e37dc6609 Russell King    2012-08-15  53  		/* page backed memory */
96f60e37dc6609 Russell King    2012-08-15  54  		unsigned int order = get_order(dobj->obj.size);
96f60e37dc6609 Russell King    2012-08-15  55  		__free_pages(dobj->page, order);
96f60e37dc6609 Russell King    2012-08-15  56  	} else if (dobj->linear) {
96f60e37dc6609 Russell King    2012-08-15  57  		/* linear backed memory */
0b8ebeacf5ef43 Simona Vetter   2015-11-24  58  		mutex_lock(&priv->linear_lock);
96f60e37dc6609 Russell King    2012-08-15  59  		drm_mm_remove_node(dobj->linear);
0b8ebeacf5ef43 Simona Vetter   2015-11-24  60  		mutex_unlock(&priv->linear_lock);
96f60e37dc6609 Russell King    2012-08-15  61  		kfree(dobj->linear);
96f60e37dc6609 Russell King    2012-08-15  62  		if (dobj->addr)
96f60e37dc6609 Russell King    2012-08-15 @63  			iounmap(dobj->addr);
96f60e37dc6609 Russell King    2012-08-15  64  	}
96f60e37dc6609 Russell King    2012-08-15  65  
96f60e37dc6609 Russell King    2012-08-15  66  	if (dobj->obj.import_attach) {
96f60e37dc6609 Russell King    2012-08-15  67  		/* We only ever display imported data */
0481c8c47f5e85 Russell King    2015-06-15  68  		if (dobj->sgt)
e4ea542846d0ef Dmitry Osipenko 2022-10-17  69  			dma_buf_unmap_attachment_unlocked(dobj->obj.import_attach,
0481c8c47f5e85 Russell King    2015-06-15  70  							  dobj->sgt, DMA_TO_DEVICE);
96f60e37dc6609 Russell King    2012-08-15  71  		drm_prime_gem_destroy(&dobj->obj, NULL);
96f60e37dc6609 Russell King    2012-08-15  72  	}
96f60e37dc6609 Russell King    2012-08-15  73  
96f60e37dc6609 Russell King    2012-08-15  74  	drm_gem_object_release(&dobj->obj);
96f60e37dc6609 Russell King    2012-08-15  75  
96f60e37dc6609 Russell King    2012-08-15  76  	kfree(dobj);
96f60e37dc6609 Russell King    2012-08-15  77  }
96f60e37dc6609 Russell King    2012-08-15  78
diff mbox series

Patch

diff --git a/drivers/gpu/drm/armada/Kconfig b/drivers/gpu/drm/armada/Kconfig
index b22c891a670b..1376337548da 100644
--- a/drivers/gpu/drm/armada/Kconfig
+++ b/drivers/gpu/drm/armada/Kconfig
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_ARMADA
 	tristate "DRM support for Marvell Armada SoCs"
-	depends on DRM && HAVE_CLK && ARM && MMU
+	depends on DRM && HAVE_CLK && MMU && (ARM || COMPILE_TEST)
 	select DRM_CLIENT_SELECTION
 	select DRM_KMS_HELPER
 	select FB_IOMEM_HELPERS if DRM_FBDEV_EMULATION