Message ID | 20240829-sm8650-v6-11-hmd-pocf-mdss-quad-upstream-8-v1-6-bdb05b4b5a2e@linaro.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | drm/msm: Support quad pipe with dual-DSI | expand |
On Thu, 29 Aug 2024 at 13:19, Jun Nie <jun.nie@linaro.org> wrote: > > Add utility to get mixer number via CRTC handler > > Signed-off-by: Jun Nie <jun.nie@linaro.org> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 7 +++++++ > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 5 +++++ > 2 files changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > index 7d0fff9472441..a27e39c525d1a 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > @@ -1306,6 +1306,13 @@ int dpu_crtc_vblank(struct drm_crtc *crtc, bool en) > return 0; > } > > +unsigned int dpu_crtc_get_lm_num(const struct drm_crtc_state *state) > +{ > + struct dpu_crtc_state *cstate = to_dpu_crtc_state(state); > + > + return cstate->num_mixers; > +} Merge with the user > + > #ifdef CONFIG_DEBUG_FS > static int _dpu_debugfs_status_show(struct seq_file *s, void *data) > { > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h > index b26d5fe40c721..701c35803633d 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h > @@ -301,5 +301,10 @@ static inline enum dpu_crtc_client_type dpu_crtc_get_client_type( > } > > void dpu_crtc_frame_event_cb(struct drm_crtc *crtc, u32 event); > +/** > + * dpu_crtc_get_lm_num - Get mixer number in this CRTC pipeline > + * @crtc: Pointer to drm crtc object > + */ Move kerneldoc before the function implementation so that W=1 can check it. > +unsigned int dpu_crtc_get_lm_num(const struct drm_crtc_state *state); > > #endif /* _DPU_CRTC_H_ */ > > -- > 2.34.1 >
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 于2024年8月29日周四 19:07写道: > > On Thu, 29 Aug 2024 at 13:19, Jun Nie <jun.nie@linaro.org> wrote: > > > > Add utility to get mixer number via CRTC handler > > > > Signed-off-by: Jun Nie <jun.nie@linaro.org> > > --- > > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 7 +++++++ > > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 5 +++++ > > 2 files changed, 12 insertions(+) > > > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > > index 7d0fff9472441..a27e39c525d1a 100644 > > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > > @@ -1306,6 +1306,13 @@ int dpu_crtc_vblank(struct drm_crtc *crtc, bool en) > > return 0; > > } > > > > +unsigned int dpu_crtc_get_lm_num(const struct drm_crtc_state *state) > > +{ > > + struct dpu_crtc_state *cstate = to_dpu_crtc_state(state); > > + > > + return cstate->num_mixers; > > +} > > Merge with the user OK. > > > + > > #ifdef CONFIG_DEBUG_FS > > static int _dpu_debugfs_status_show(struct seq_file *s, void *data) > > { > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h > > index b26d5fe40c721..701c35803633d 100644 > > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h > > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h > > @@ -301,5 +301,10 @@ static inline enum dpu_crtc_client_type dpu_crtc_get_client_type( > > } > > > > void dpu_crtc_frame_event_cb(struct drm_crtc *crtc, u32 event); > > +/** > > + * dpu_crtc_get_lm_num - Get mixer number in this CRTC pipeline > > + * @crtc: Pointer to drm crtc object > > + */ > > Move kerneldoc before the function implementation so that W=1 can check it. > > > +unsigned int dpu_crtc_get_lm_num(const struct drm_crtc_state *state); > > > > #endif /* _DPU_CRTC_H_ */ > > > > -- > > 2.34.1 > > > > > -- > With best wishes > Dmitry
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 7d0fff9472441..a27e39c525d1a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -1306,6 +1306,13 @@ int dpu_crtc_vblank(struct drm_crtc *crtc, bool en) return 0; } +unsigned int dpu_crtc_get_lm_num(const struct drm_crtc_state *state) +{ + struct dpu_crtc_state *cstate = to_dpu_crtc_state(state); + + return cstate->num_mixers; +} + #ifdef CONFIG_DEBUG_FS static int _dpu_debugfs_status_show(struct seq_file *s, void *data) { diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h index b26d5fe40c721..701c35803633d 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h @@ -301,5 +301,10 @@ static inline enum dpu_crtc_client_type dpu_crtc_get_client_type( } void dpu_crtc_frame_event_cb(struct drm_crtc *crtc, u32 event); +/** + * dpu_crtc_get_lm_num - Get mixer number in this CRTC pipeline + * @crtc: Pointer to drm crtc object + */ +unsigned int dpu_crtc_get_lm_num(const struct drm_crtc_state *state); #endif /* _DPU_CRTC_H_ */
Add utility to get mixer number via CRTC handler Signed-off-by: Jun Nie <jun.nie@linaro.org> --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 7 +++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 5 +++++ 2 files changed, 12 insertions(+)