[PATCH v2 55/60] drm/omap: Pass pipe pointer to omap_crtc_init()

Sebastian Reichel sre at kernel.org
Mon Jun 11 12:00:07 UTC 2018


Hi,

On Sat, May 26, 2018 at 08:25:13PM +0300, Laurent Pinchart wrote:
> Replace the dss display device pointer by a pipe pointer that will allow
> the omap_crtc_init() function to access both the display and the DSS
> output. As a result we can remove the omapdss_device_get_dispc_channel()
> function that is now unneeded.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel at collabora.co.uk>

-- Sebastian

>  drivers/gpu/drm/omapdrm/dss/base.c    | 9 ---------
>  drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 -
>  drivers/gpu/drm/omapdrm/omap_crtc.c   | 7 ++++---
>  drivers/gpu/drm/omapdrm/omap_crtc.h   | 4 +++-
>  drivers/gpu/drm/omapdrm/omap_drv.c    | 2 +-
>  5 files changed, 8 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/base.c b/drivers/gpu/drm/omapdrm/dss/base.c
> index fbb600d49ad2..cce09a48d769 100644
> --- a/drivers/gpu/drm/omapdrm/dss/base.c
> +++ b/drivers/gpu/drm/omapdrm/dss/base.c
> @@ -247,15 +247,6 @@ void omapdss_device_disconnect(struct omap_dss_device *src,
>  }
>  EXPORT_SYMBOL_GPL(omapdss_device_disconnect);
>  
> -enum omap_channel omapdss_device_get_dispc_channel(struct omap_dss_device *dssdev)
> -{
> -	while (dssdev->src)
> -		dssdev = dssdev->src;
> -
> -	return dssdev->dispc_channel;
> -}
> -EXPORT_SYMBOL(omapdss_device_get_dispc_channel);
> -
>  /* -----------------------------------------------------------------------------
>   * Components Handling
>   */
> diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> index 672761b5b017..d7084ca36d0e 100644
> --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
> +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> @@ -509,7 +509,6 @@ int omapdss_device_connect(struct dss_device *dss,
>  			   struct omap_dss_device *dst);
>  void omapdss_device_disconnect(struct omap_dss_device *src,
>  			       struct omap_dss_device *dst);
> -enum omap_channel omapdss_device_get_dispc_channel(struct omap_dss_device *dssdev);
>  
>  int omap_dss_get_num_overlay_managers(void);
>  
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index f5bf553a862f..f5bdb8de98f4 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -693,7 +693,8 @@ void omap_crtc_pre_uninit(struct omap_drm_private *priv)
>  
>  /* initialize crtc */
>  struct drm_crtc *omap_crtc_init(struct drm_device *dev,
> -		struct drm_plane *plane, struct omap_dss_device *dssdev)
> +				struct omap_drm_pipeline *pipe,
> +				struct drm_plane *plane)
>  {
>  	struct omap_drm_private *priv = dev->dev_private;
>  	struct drm_crtc *crtc = NULL;
> @@ -701,7 +702,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
>  	enum omap_channel channel;
>  	int ret;
>  
> -	channel = omapdss_device_get_dispc_channel(dssdev);
> +	channel = pipe->output->dispc_channel;
>  
>  	DBG("%s", channel_names[channel]);
>  
> @@ -724,7 +725,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
>  					&omap_crtc_funcs, NULL);
>  	if (ret < 0) {
>  		dev_err(dev->dev, "%s(): could not init crtc for: %s\n",
> -			__func__, dssdev->name);
> +			__func__, pipe->display->name);
>  		kfree(omap_crtc);
>  		return ERR_PTR(ret);
>  	}
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.h b/drivers/gpu/drm/omapdrm/omap_crtc.h
> index 1c6530703855..d9de437ba9dd 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.h
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.h
> @@ -27,6 +27,7 @@ enum omap_channel;
>  struct drm_crtc;
>  struct drm_device;
>  struct drm_plane;
> +struct omap_drm_pipeline;
>  struct omap_dss_device;
>  struct videomode;
>  
> @@ -35,7 +36,8 @@ enum omap_channel omap_crtc_channel(struct drm_crtc *crtc);
>  void omap_crtc_pre_init(struct omap_drm_private *priv);
>  void omap_crtc_pre_uninit(struct omap_drm_private *priv);
>  struct drm_crtc *omap_crtc_init(struct drm_device *dev,
> -		struct drm_plane *plane, struct omap_dss_device *dssdev);
> +				struct omap_drm_pipeline *pipe,
> +				struct drm_plane *plane);
>  int omap_crtc_wait_pending(struct drm_crtc *crtc);
>  void omap_crtc_error_irq(struct drm_crtc *crtc, u32 irqstatus);
>  void omap_crtc_vblank_irq(struct drm_crtc *crtc);
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> index dc2f059f8f4d..6bc826515684 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -308,7 +308,7 @@ static int omap_modeset_init(struct drm_device *dev)
>  		if (!connector)
>  			return -ENOMEM;
>  
> -		crtc = omap_crtc_init(dev, priv->planes[i], display);
> +		crtc = omap_crtc_init(dev, pipe, priv->planes[i]);
>  		if (IS_ERR(crtc))
>  			return PTR_ERR(crtc);
>  
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180611/49a3e1fc/attachment.sig>


More information about the dri-devel mailing list