Hi Sebastian,
On Monday, 11 June 2018 14:59:13 EEST Sebastian Reichel wrote:
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@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.
Good catch. I'll replace this line with
dsicm_disconnect(dssdev->src, dssdev);