drm: Compile out legacy chunks from struct drm_device
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 4 Nov 2020 10:04:21 +0000 (11:04 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 6 Nov 2020 09:31:26 +0000 (10:31 +0100)
commit57bb1ee6034046be70aed33fd6d447bb2b7261fa
tree6b81c1b0fbd03cbe1667077bce6502242ade5a09
parent384bc5e059d4ce8856d650f24d75b8083c0f68d6
drm: Compile out legacy chunks from struct drm_device

This means some very few #ifdef in code, but it allows us to
enlist the compiler to make sure this stuff isn't used anymore.

More important, only legacy drivers change drm_device (for the
legacy_dev_list shadow attach management), therefore this is
prep to allow modern drivers to have a const driver struct. Which
is nice, because there's a ton of function pointers in there.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Review-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-2-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_file.c
drivers/gpu/drm/drm_vblank.c
include/drm/drm_drv.h