diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-11-17 22:40:29 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-11-18 22:47:45 +0100 |
commit | f9f92e7c583f9b120bbb09edae6a587b73feb3a9 (patch) | |
tree | ffdca977a8b38e5f57b6f537c05e42dfa424228c /drivers/char/agp/agp.h | |
parent | 58a74c6f1d6f3cf615c8f12281d42859ac7363a9 (diff) | |
download | linux-f9f92e7c583f9b120bbb09edae6a587b73feb3a9.tar.gz linux-f9f92e7c583f9b120bbb09edae6a587b73feb3a9.tar.bz2 linux-f9f92e7c583f9b120bbb09edae6a587b73feb3a9.zip |
char/agp: Disable frontend without CONFIG_DRM_LEGACY
It's probably full of bugs ready for exploiting by userspace. And
there's not going to be any userspace for this without any of the drm
legacy drivers enabled too. So just couple it together.
Note that the frontend is only the /dev/agp ioctl interface, which per
Adam is only used by the i810 userspace drivers. All other drivers go
through the drm bufmap agp handling abstraction apparently.
v2: Augment commit message a bit from m-l feedback.
Acked-by: Adam Jackson <ajax@redhat.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Adam Jackson <ajax@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201117214029.591896-1-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/char/agp/agp.h')
-rw-r--r-- | drivers/char/agp/agp.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h index 4eb1c772ded7..bb09d64cd51e 100644 --- a/drivers/char/agp/agp.h +++ b/drivers/char/agp/agp.h @@ -186,8 +186,13 @@ int agp_add_bridge(struct agp_bridge_data *bridge); void agp_remove_bridge(struct agp_bridge_data *bridge); /* Frontend routines. */ +#if IS_ENABLED(CONFIG_DRM_LEGACY) int agp_frontend_initialize(void); void agp_frontend_cleanup(void); +#else +static inline int agp_frontend_initialize(void) { return 0; } +static inline void agp_frontend_cleanup(void) {} +#endif /* Generic routines. */ void agp_generic_enable(struct agp_bridge_data *bridge, u32 mode); |