Skip to contentSkip to conversation

drm: drm_drv: Only call drm_agp_clear() in __OS_HAS_AGP case

PATCH In review Fabio Estevam 2 participants 2 messages Aug 8, 2013 – Aug 12, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: drm_drv: Only call drm_agp_clear() in __OS_HAS_AGP case

From: Fabio Estevam <[email protected]>

Commit 28ec711 (drm/agp: move AGP cleanup paths to drm_agpsupport.c) causes the following link error on ARM (imx_v6_v7_defconfig):

drivers/built-in.o: In function `drm_lastclose':
:(.text+0x588a0): undefined reference to `drm_agp_clear'
make: *** [vmlinux] Error 1

drm_agp_clear() is defined only '#if __OS_HAS_AGP' is true, so add this 'if' logic when calling it.

---
 drivers/gpu/drm/drm_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_drv.c +2 -0
index dddd799..58f7f39 100644
@@ -195,7 +195,9 @@ int drm_lastclose(struct drm_device * dev)
 
 	mutex_lock(&dev->struct_mutex);
 
+#if __OS_HAS_AGP
 	drm_agp_clear(dev);
+#endif
 
 	if (drm_core_check_feature(dev, DRIVER_SG) && dev->sg &&
 	    !drm_core_check_feature(dev, DRIVER_MODESET)) {
Signature · 1 line
1.8.1.2
#1 lore raw

Hi

Quoted 5 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit 28ec711 (drm/agp: move AGP cleanup paths to drm_agpsupport.c) causes the following link error on ARM (imx_v6_v7_defconfig):

Quoted 8 lines

drivers/built-in.o: In function `drm_lastclose':
:(.text+0x588a0): undefined reference to `drm_agp_clear'
make: *** [vmlinux] Error 1

drm_agp_clear() is defined only '#if __OS_HAS_AGP' is true, so add this 'if' logic when calling it.

This has already been fixed 4 days ago in the drm-next tree. You can find the patch here:
http://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-next&id=00fd78e5279aec3aa504307ff2db892d3efb555d

Thanks
David

Quoted 21 lines
---
 drivers/gpu/drm/drm_drv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/drm_drv.c +2 -1
index dddd799..58f7f39 100644
@@ -195,7 +195,9 @@ int drm_lastclose(struct drm_device * dev)
 
        mutex_lock(&dev->struct_mutex);
 
+#if __OS_HAS_AGP
        drm_agp_clear(dev);
+#endif
 
        if (drm_core_check_feature(dev, DRIVER_SG) && dev->sg &&
            !drm_core_check_feature(dev, DRIVER_MODESET)) {
--

1.8.1.2