drm: drop unused drm_display_mode.private
Subsystems (3)
PATCH 1/1 drm: drop unused drm_display_mode.private
drm_display_mode.private was only referenced in one place where is was copied but never assigned.
Drop the copy and drop the field in drm_display_mode. Adjust the comment of private_flags as is referred to the comment for private.
---
Again, something I just stumbled upon.
I also checked private_flags - it is used in a few modules. And it looked legit.
Build tested with allmodconfig, allyesconfig, allnoconfig for relevant architectures.
Sam
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 1 - include/drm/drm_modes.h | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +0 -1
@@ -516,7 +516,6 @@ static void _dpu_encoder_adjust_mode(struct drm_connector *connector,if (cur_mode->vdisplay == adj_mode->vdisplay && cur_mode->hdisplay == adj_mode->hdisplay &&drm_mode_vrefresh (cur_mode) ==drm_mode_vrefresh (adj_mode)) { - adj_mode->private = cur_mode->private; adj_mode->private_flags |= cur_mode->private_flags; } }
include/drm/drm_modes.h +2 -9
@@ -371,20 +371,13 @@ struct drm_display_mode {int crtc_vtotal;/** -* @private: +* @private_flags: * -* Pointer for driver private data. This can only be used for mode +* Driver private flags. private_flags can only be used for mode * objects passed to drivers in modeset operations. It shouldn't be used * by atomic drivers since they can store any additional data by * subclassing state structures. */ -int *private; - -/** -* @private_flags: -* -* Similar to @private, but just an integer. -*/ int private_flags;/**
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 12 lines · Sam Ravnborg
drm_display_mode.private was only referenced in one place where is was copied but never assigned.
Drop the copy and drop the field in
drm_display_mode. Adjust the comment ofprivate_flagsas is referred to the comment for private.Signed-off-by Sam Ravnborg <[email protected]>Cc Sean Paul <[email protected]>Cc Daniel Vetter <[email protected]>Cc Ville Syrjälä <[email protected]>
Quoted 8 lines
---
Again, something I just stumbled upon.
I also checkedprivate_flags- it is used in a few modules. And it looked legit.Build tested with allmodconfig, allyesconfig, allnoconfig for relevant architectures.
Iirc i915 used this, before we went full overdrive with entire atomic state structure subclassing :-)
Quoted 50 lines
Sam
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 1 - include/drm/drm_modes.h | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-)drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +0
-1@@ -516,7 +516,6 @@ static void _dpu_encoder_adjust_mode(struct drm_connector *connector,if (cur_mode->vdisplay == adj_mode->vdisplay && cur_mode->hdisplay == adj_mode->hdisplay &&drm_mode_vrefresh (cur_mode) ==drm_mode_vrefresh (adj_mode)) { - adj_mode->private = cur_mode->private; adj_mode->private_flags |= cur_mode->private_flags; } }include/drm/drm_modes.h +2
-10@@ -371,20 +371,13 @@ struct drm_display_mode {int crtc_vtotal;/** -* @private: +* @private_flags: * -* Pointer for driver private data. This can only be used for mode +* Driver private flags. private_flags can only be used for mode * objects passed to drivers in modeset operations. It shouldn't be used * by atomic drivers since they can store any additional data by * subclassing state structures. */ -int *private; - -/** -* @private_flags: -* -* Similar to @private, but just an integer. -*/ int private_flags;/** -- 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
Hi Daniel.
Quoted 5 lines
Quoted 3 lines
I also checked
private_flags- it is used in a few modules. And it looked legit.Iirc i915 used this, before we went full overdrive with entire atomic state structure subclassing :-)
$ git grep -l private_flags gma500/psb_intel_drv.h i915/display/intel_display.c i915/display/intel_display_types.h i915/display/intel_tv.c i915/display/vlv_dsi.c i915/i915_irq.c msm/disp/dpu1/dpu_encoder.c msm/disp/dpu1/dpu_trace.h <= false hit
i915 still has a few uses of private_flags.
Likewise msm and gma500
Looks doable to address this, but not on my TODO list.
Sam
Quoted 2 lines
Reviewed-by Daniel Vetter <[email protected]>
Thanks - applied.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 19 lines · Sam Ravnborg
Hi Daniel.
Quoted 5 lines
Quoted 3 lines
I also checked
private_flags- it is used in a few modules. And it looked legit.Iirc i915 used this, before we went full overdrive with entire atomic state structure subclassing :-)
$ git grep -l private_flags gma500/psb_intel_drv.h i915/display/intel_display.c i915/display/intel_display_types.h i915/display/intel_tv.c i915/display/vlv_dsi.c i915/i915_irq.c msm/disp/dpu1/dpu_encoder.c msm/disp/dpu1/dpu_trace.h <= false hit
Quoted 4 lines
i915 still has a few uses of
private_flags.
Likewise msm and gma500Looks doable to address this, but not on my TODO list.
Oh I meant the private pointer, not the flags stuff. And yeah maybe we could add this as a todo, at least for i915 and msm. For gma500 first step would be converting that driver over to atomic, which I don't think will happen.
-Daniel
Quoted 9 lines
Sam
Quoted 2 lines
Reviewed-by Daniel Vetter <[email protected]>Thanks - applied.
Sam
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