Re: [PATCH 1/2] drm/msm/dpu: drop unused dpu_kms from interface initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 28 Feb 2024 at 21:47, Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx> 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@xxxxxxxxxxx>
> ---
>  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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux