[PATCH v2 51/60] drm/omap: Reverse direction of DSS device (dis)connect operations

Sebastian Reichel sre at kernel.org
Mon Jun 11 11:59:13 UTC 2018


Hi,

On Sat, May 26, 2018 at 08:25:09PM +0300, Laurent Pinchart wrote:
> The omapdrm and omapdss drivers are architectured based on display
> pipelines made of multiple components handled from sink (display) to
> source (DSS output). This is incompatible with the DRM bridge and panel
> APIs that handle components from source to sink.
> 
> To reconcile the omapdrm and omapdss drivers with the DRM bridge and
> panel model, we need to reverse the direction of the DSS device
> operations. Start with the connect and disconnect operations.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---

Looks mostly good, but I found one issue:

[...]

> -static void dsicm_disconnect(struct omap_dss_device *dssdev)
> +static void dsicm_disconnect(struct omap_dss_device *src,
> +			     struct omap_dss_device *dst)
>  {
> -	struct panel_drv_data *ddata = to_panel_data(dssdev);
> -	struct omap_dss_device *src = dssdev->src;
> +	struct panel_drv_data *ddata = to_panel_data(dst);
>  
>  	src->ops->dsi.release_vc(src, ddata->channel);

^^^ using src in dsicm_disconnect()

> -	omapdss_device_disconnect(src, dssdev);
> -
> -	omapdss_device_put(src);
>  }
>  
>  static int dsicm_enable(struct omap_dss_device *dssdev)
> @@ -1404,7 +1382,7 @@ static int __exit dsicm_remove(struct platform_device *pdev)
>  	omapdss_device_unregister(dssdev);
>  
>  	dsicm_disable(dssdev);
> -	dsicm_disconnect(dssdev);
> +	dsicm_disconnect(NULL, dssdev);

^^^ calling dsicm_disconnect() with src=NULL

This will execute dsi_release_vc(NULL, channel), which will try to
dereference NULL.

-- Sebastian
-------------- 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/3225e1cb/attachment.sig>


More information about the dri-devel mailing list