drm: drop unused drm_crtc callback
Subsystems (2)
PATCH 1/1 drm: drop unused drm_crtc callback
struct drm_encoder_helper_funcs included a callback named drm_crtc.
There are no users left - so drop it.
There was one reference in drm_crtc_helper.c, which checked if the value was not NULL.
As it was never assigned this check could be dropped.
---
Stumbled upon this and dediced to check if it was used. Build tested with allyesconfig, allmodconfig for relevant architectures.
Sam
drivers/gpu/drm/drm_crtc_helper.c | 4 ---- include/drm/drm_modeset_helper_vtables.h | 16 ---------------- 2 files changed, 20 deletions(-)
drivers/gpu/drm/drm_crtc_helper.c +0 -4
@@ -244,10 +244,6 @@ drm_crtc_prepare_encoders(struct drm_device *dev)/* Disable unused encoders */ if (encoder->crtc ==NULL )drm_encoder_disable (encoder); -/* Disable encoders whose CRTC is about to change */ -if (encoder_funcs->get_crtc && - encoder->crtc != (*encoder_funcs->get_crtc)(encoder)) -drm_encoder_disable (encoder); } }
include/drm/drm_modeset_helper_vtables.h +0 -16
@@ -692,22 +692,6 @@ struct drm_encoder_helper_funcs {struct drm_crtc_state *crtc_state, struct drm_connector_state *conn_state); -/** -* @get_crtc: -* -* This callback is used by the legacy CRTC helpers to work around -* deficiencies in its own book-keeping. -* -* Do not use, use atomic helpers instead, which get the book keeping -* right. -* -* FIXME: -* -* Currently only nouveau is using this, and as soon as nouveau is -* atomic we can ditch this hook. -*/ -struct drm_crtc *(*get_crtc)(struct drm_encoder *encoder); -/** * @detect: *
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Sam Ravnborg
struct
drm_encoder_helper_funcsincluded a callback nameddrm_crtc.There are no users left - so drop it.
There was one reference indrm_crtc_helper.c, which checked if the value was not NULL.
As it was never assigned this check could be dropped.
Quoted 6 lines
Signed-off-by Sam Ravnborg <[email protected]>Cc Daniel Vetter <[email protected]>---
Stumbled upon this and dediced to check if it was used. Build tested with allyesconfig, allmodconfig for relevant architectures.
Nice catch!
Quoted 53 lines
Sam
drivers/gpu/drm/drm_crtc_helper.c | 4 ---- include/drm/drm_modeset_helper_vtables.h | 16 ---------------- 2 files changed, 20 deletions(-)drivers/gpu/drm/drm_crtc_helper.c +0
-4@@ -244,10 +244,6 @@ drm_crtc_prepare_encoders(struct drm_device *dev)/* Disable unused encoders */ if (encoder->crtc ==NULL )drm_encoder_disable (encoder); -/* Disable encoders whose CRTC is about to change */ -if (encoder_funcs->get_crtc && - encoder->crtc != (*encoder_funcs->get_crtc)(encoder)) -drm_encoder_disable (encoder); } }include/drm/drm_modeset_helper_vtables.h +0
-17@@ -692,22 +692,6 @@ struct drm_encoder_helper_funcs {struct drm_crtc_state *crtc_state, struct drm_connector_state *conn_state); -/** -* @get_crtc: -* -* This callback is used by the legacy CRTC helpers to work around -* deficiencies in its own book-keeping. -* -* Do not use, use atomic helpers instead, which get the book keeping -* right. -* -* FIXME: -* -* Currently only nouveau is using this, and as soon as nouveau is -* atomic we can ditch this hook. -*/ -struct drm_crtc *(*get_crtc)(struct drm_encoder *encoder); -/** * @detect: * -- 2.20.1
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 14 lines · Daniel Vetter
Quoted 13 lines · Sam Ravnborg
struct
drm_encoder_helper_funcsincluded a callback nameddrm_crtc.There are no users left - so drop it.
There was one reference indrm_crtc_helper.c, which checked if the value was not NULL.
As it was never assigned this check could be dropped.Signed-off-by Sam Ravnborg <[email protected]>Cc Daniel Vetter <[email protected]>---
Quoted 6 lines
Quoted 2 lines
Stumbled upon this and dediced to check if it was used. Build tested with allyesconfig, allmodconfig for relevant architectures.
Nice catch!
Reviewed-by Daniel Vetter <[email protected]>
Thanks for the quick review.
Applied and pushed out.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel