Platforms without AGP don't provide the AGP header. Only include it if CONFIG_AGP is set. Signed-off-by: Thomas Zimmermann <tzimmermann@suse. Fixes: 04dfe19a5ed6 ("drm: Mark AGP implementation and ioctls as legacy") Cc: Thomas Zimmermann <tzimmermann@xxxxxxx> Cc: Alex Deucher <alexander.deucher@xxxxxxx> Cc: Christian König <christian.koenig@xxxxxxx> Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> Cc: Maxime Ripard <mripard@xxxxxxxxxx> Cc: David Airlie <airlied@xxxxxxxx> Cc: Daniel Vetter <daniel@xxxxxxxx> Cc: "Christian König" <christian.koenig@xxxxxxx> Cc: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Cc: Jason Yan <yanaijie@xxxxxxxxxx> Cc: Lee Jones <lee.jones@xxxxxxxxxx> Cc: Sam Ravnborg <sam@xxxxxxxxxxxx> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx --- drivers/gpu/drm/drm_agpsupport.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index 07c10443770e..a4ad6fd13abc 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c @@ -35,7 +35,9 @@ #include <linux/pci.h> #include <linux/slab.h> +#if IS_ENABLED(CONFIG_AGP) #include <asm/agp.h> +#endif #include <drm/drm_device.h> #include <drm/drm_drv.h> -- 2.31.1