Message ID | 20240228194730.619204-1-quic_abhinavk@quicinc.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [1/2] drm/msm/dpu: drop unused dpu_kms from interface initialization | expand |
On Wed, 28 Feb 2024 at 21:47, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > dpu_kms seems unused while initializing DSI, HDMI and DP through > their respective _dpu_kms_initialize_* functions. > > Hence lets drop the parameter altogether. > > Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-)
On Wed, 28 Feb 2024 at 21:47, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: > > dpu_kms seems unused while initializing DSI, HDMI and DP through > their respective _dpu_kms_initialize_* functions. > > Hence lets drop the parameter altogether. > > Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > index 2af62d8fa9a7..ab924ac78c9b 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c > @@ -494,8 +494,7 @@ static void dpu_kms_wait_flush(struct msm_kms *kms, unsigned crtc_mask) > } > > static int _dpu_kms_initialize_dsi(struct drm_device *dev, > - struct msm_drm_private *priv, > - struct dpu_kms *dpu_kms) > + struct msm_drm_private *priv) > { > struct drm_encoder *encoder = NULL; > struct msm_display_info info; > @@ -558,8 +557,7 @@ static int _dpu_kms_initialize_dsi(struct drm_device *dev, > } > > static int _dpu_kms_initialize_displayport(struct drm_device *dev, > - struct msm_drm_private *priv, > - struct dpu_kms *dpu_kms) > + struct msm_drm_private *priv) This breaks now on top of YUV patchset: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function '_dpu_kms_initialize_displayport': drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:583:35: error: 'dpu_kms' undeclared (first use in this function) 583 | yuv_supported = !!dpu_kms->catalog->cdm; As this requires adding of the yuv_supported argument, let's consider moving it backwards: for _dpu_kms_initialize_writeback() we can get format_list and n_formats from the dpu_kms. > { > struct drm_encoder *encoder = NULL; > struct msm_display_info info; > @@ -592,8 +590,7 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev, > } > > static int _dpu_kms_initialize_hdmi(struct drm_device *dev, > - struct msm_drm_private *priv, > - struct dpu_kms *dpu_kms) > + struct msm_drm_private *priv) > { > struct drm_encoder *encoder = NULL; > struct msm_display_info info; > @@ -671,19 +668,19 @@ static int _dpu_kms_setup_displays(struct drm_device *dev, > int rc = 0; > int i; > > - rc = _dpu_kms_initialize_dsi(dev, priv, dpu_kms); > + rc = _dpu_kms_initialize_dsi(dev, priv); > if (rc) { > DPU_ERROR("initialize_dsi failed, rc = %d\n", rc); > return rc; > } > > - rc = _dpu_kms_initialize_displayport(dev, priv, dpu_kms); > + rc = _dpu_kms_initialize_displayport(dev, priv); > if (rc) { > DPU_ERROR("initialize_DP failed, rc = %d\n", rc); > return rc; > } > > - rc = _dpu_kms_initialize_hdmi(dev, priv, dpu_kms); > + rc = _dpu_kms_initialize_hdmi(dev, priv); > if (rc) { > DPU_ERROR("initialize HDMI failed, rc = %d\n", rc); > return rc; > -- > 2.34.1 > -- With best wishes Dmitry
On 3/4/2024 5:06 AM, Dmitry Baryshkov wrote: > On Wed, 28 Feb 2024 at 21:47, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote: >> >> dpu_kms seems unused while initializing DSI, HDMI and DP through >> their respective _dpu_kms_initialize_* functions. >> >> Hence lets drop the parameter altogether. >> >> Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> >> --- >> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 ++++++--------- >> 1 file changed, 6 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c >> index 2af62d8fa9a7..ab924ac78c9b 100644 >> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c >> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c >> @@ -494,8 +494,7 @@ static void dpu_kms_wait_flush(struct msm_kms *kms, unsigned crtc_mask) >> } >> >> static int _dpu_kms_initialize_dsi(struct drm_device *dev, >> - struct msm_drm_private *priv, >> - struct dpu_kms *dpu_kms) >> + struct msm_drm_private *priv) >> { >> struct drm_encoder *encoder = NULL; >> struct msm_display_info info; >> @@ -558,8 +557,7 @@ static int _dpu_kms_initialize_dsi(struct drm_device *dev, >> } >> >> static int _dpu_kms_initialize_displayport(struct drm_device *dev, >> - struct msm_drm_private *priv, >> - struct dpu_kms *dpu_kms) >> + struct msm_drm_private *priv) > > This breaks now on top of YUV patchset: > > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function > '_dpu_kms_initialize_displayport': > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:583:35: error: 'dpu_kms' > undeclared (first use in this function) > 583 | yuv_supported = !!dpu_kms->catalog->cdm; > > As this requires adding of the yuv_supported argument, let's consider > moving it backwards: for _dpu_kms_initialize_writeback() we can get > format_list and n_formats from the dpu_kms. > Yes, my bad, I realized after sending this that my branch did not have CDM changes yet. Let me rework and post this on top of the latest tree. > >> { >> struct drm_encoder *encoder = NULL; >> struct msm_display_info info; >> @@ -592,8 +590,7 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev, >> } >> >> static int _dpu_kms_initialize_hdmi(struct drm_device *dev, >> - struct msm_drm_private *priv, >> - struct dpu_kms *dpu_kms) >> + struct msm_drm_private *priv) >> { >> struct drm_encoder *encoder = NULL; >> struct msm_display_info info; >> @@ -671,19 +668,19 @@ static int _dpu_kms_setup_displays(struct drm_device *dev, >> int rc = 0; >> int i; >> >> - rc = _dpu_kms_initialize_dsi(dev, priv, dpu_kms); >> + rc = _dpu_kms_initialize_dsi(dev, priv); >> if (rc) { >> DPU_ERROR("initialize_dsi failed, rc = %d\n", rc); >> return rc; >> } >> >> - rc = _dpu_kms_initialize_displayport(dev, priv, dpu_kms); >> + rc = _dpu_kms_initialize_displayport(dev, priv); >> if (rc) { >> DPU_ERROR("initialize_DP failed, rc = %d\n", rc); >> return rc; >> } >> >> - rc = _dpu_kms_initialize_hdmi(dev, priv, dpu_kms); >> + rc = _dpu_kms_initialize_hdmi(dev, priv); >> if (rc) { >> DPU_ERROR("initialize HDMI failed, rc = %d\n", rc); >> return rc; >> -- >> 2.34.1 >> > > > -- > With best wishes > Dmitry
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 2af62d8fa9a7..ab924ac78c9b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -494,8 +494,7 @@ static void dpu_kms_wait_flush(struct msm_kms *kms, unsigned crtc_mask) } static int _dpu_kms_initialize_dsi(struct drm_device *dev, - struct msm_drm_private *priv, - struct dpu_kms *dpu_kms) + struct msm_drm_private *priv) { struct drm_encoder *encoder = NULL; struct msm_display_info info; @@ -558,8 +557,7 @@ static int _dpu_kms_initialize_dsi(struct drm_device *dev, } static int _dpu_kms_initialize_displayport(struct drm_device *dev, - struct msm_drm_private *priv, - struct dpu_kms *dpu_kms) + struct msm_drm_private *priv) { struct drm_encoder *encoder = NULL; struct msm_display_info info; @@ -592,8 +590,7 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev, } static int _dpu_kms_initialize_hdmi(struct drm_device *dev, - struct msm_drm_private *priv, - struct dpu_kms *dpu_kms) + struct msm_drm_private *priv) { struct drm_encoder *encoder = NULL; struct msm_display_info info; @@ -671,19 +668,19 @@ static int _dpu_kms_setup_displays(struct drm_device *dev, int rc = 0; int i; - rc = _dpu_kms_initialize_dsi(dev, priv, dpu_kms); + rc = _dpu_kms_initialize_dsi(dev, priv); if (rc) { DPU_ERROR("initialize_dsi failed, rc = %d\n", rc); return rc; } - rc = _dpu_kms_initialize_displayport(dev, priv, dpu_kms); + rc = _dpu_kms_initialize_displayport(dev, priv); if (rc) { DPU_ERROR("initialize_DP failed, rc = %d\n", rc); return rc; } - rc = _dpu_kms_initialize_hdmi(dev, priv, dpu_kms); + rc = _dpu_kms_initialize_hdmi(dev, priv); if (rc) { DPU_ERROR("initialize HDMI failed, rc = %d\n", rc); return rc;
dpu_kms seems unused while initializing DSI, HDMI and DP through their respective _dpu_kms_initialize_* functions. Hence lets drop the parameter altogether. Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)