[PATCH v2 59/60] drm/omap: Set dispc_channel_connect from DSS output connect handlers
Sebastian Reichel
sre at kernel.org
Mon Jun 11 12:00:56 UTC 2018
Hi,
On Sat, May 26, 2018 at 08:25:17PM +0300, Laurent Pinchart wrote:
> The omap_dss_device.dispc_channel_connect field is used by DSS outputs
> to fail the .enable() operation if they're not connected. Set the field
> directly from the (dis)connect handlers of the DSS outputs instead of
> going through the CRTC dss_mgr operations.
>
> 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/dpi.c | 3 +++
> drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +++
> drivers/gpu/drm/omapdrm/dss/hdmi4.c | 3 +++
> drivers/gpu/drm/omapdrm/dss/hdmi5.c | 3 +++
> drivers/gpu/drm/omapdrm/dss/sdi.c | 3 +++
> drivers/gpu/drm/omapdrm/dss/venc.c | 3 +++
> drivers/gpu/drm/omapdrm/omap_crtc.c | 3 ---
> 7 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c
> index 4cf397c9300e..72d873c2abcc 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dpi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c
> @@ -626,12 +626,15 @@ static int dpi_connect(struct omap_dss_device *src,
> return r;
> }
>
> + dst->dispc_channel_connected = true;
> return 0;
> }
>
> static void dpi_disconnect(struct omap_dss_device *src,
> struct omap_dss_device *dst)
> {
> + dst->dispc_channel_connected = false;
> +
> omapdss_device_disconnect(dst, dst->next);
>
> dss_mgr_disconnect(dst);
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index bc470baa4f5c..bd5e463558be 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -4896,12 +4896,15 @@ static int dsi_connect(struct omap_dss_device *src,
> return r;
> }
>
> + dst->dispc_channel_connected = true;
> return 0;
> }
>
> static void dsi_disconnect(struct omap_dss_device *src,
> struct omap_dss_device *dst)
> {
> + dst->dispc_channel_connected = false;
> +
> omapdss_device_disconnect(dst, dst->next);
>
> dss_mgr_disconnect(dst);
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> index 6616530d5fe6..1e025a8b99c9 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> @@ -443,12 +443,15 @@ static int hdmi_connect(struct omap_dss_device *src,
> return r;
> }
>
> + dst->dispc_channel_connected = true;
> return 0;
> }
>
> static void hdmi_disconnect(struct omap_dss_device *src,
> struct omap_dss_device *dst)
> {
> + dst->dispc_channel_connected = false;
> +
> omapdss_device_disconnect(dst, dst->next);
>
> dss_mgr_disconnect(dst);
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> index f7e15edc05fc..d5860438ddd9 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
> @@ -448,12 +448,15 @@ static int hdmi_connect(struct omap_dss_device *src,
> return r;
> }
>
> + dst->dispc_channel_connected = true;
> return 0;
> }
>
> static void hdmi_disconnect(struct omap_dss_device *src,
> struct omap_dss_device *dst)
> {
> + dst->dispc_channel_connected = false;
> +
> omapdss_device_disconnect(dst, dst->next);
>
> dss_mgr_disconnect(dst);
> diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
> index 09c10ba4946b..ed2595a60984 100644
> --- a/drivers/gpu/drm/omapdrm/dss/sdi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
> @@ -264,12 +264,15 @@ static int sdi_connect(struct omap_dss_device *src,
> return r;
> }
>
> + dst->dispc_channel_connected = true;
> return 0;
> }
>
> static void sdi_disconnect(struct omap_dss_device *src,
> struct omap_dss_device *dst)
> {
> + dst->dispc_channel_connected = false;
> +
> omapdss_device_disconnect(dst, dst->next);
>
> dss_mgr_disconnect(dst);
> diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
> index 997c4aebd560..4f20183c7861 100644
> --- a/drivers/gpu/drm/omapdrm/dss/venc.c
> +++ b/drivers/gpu/drm/omapdrm/dss/venc.c
> @@ -706,12 +706,15 @@ static int venc_connect(struct omap_dss_device *src,
> return r;
> }
>
> + dst->dispc_channel_connected = true;
> return 0;
> }
>
> static void venc_disconnect(struct omap_dss_device *src,
> struct omap_dss_device *dst)
> {
> + dst->dispc_channel_connected = false;
> +
> omapdss_device_disconnect(dst, dst->next);
>
> dss_mgr_disconnect(dst);
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 90917d040ddb..7f837697e76c 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -114,8 +114,6 @@ static int omap_crtc_dss_connect(struct omap_drm_private *priv,
> enum omap_channel channel,
> struct omap_dss_device *dst)
> {
> - dst->dispc_channel_connected = true;
> -
> return 0;
> }
>
> @@ -123,7 +121,6 @@ static void omap_crtc_dss_disconnect(struct omap_drm_private *priv,
> enum omap_channel channel,
> struct omap_dss_device *dst)
> {
> - dst->dispc_channel_connected = false;
> }
>
> static void omap_crtc_dss_start_update(struct omap_drm_private *priv,
> --
> 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/e178006a/attachment.sig>
More information about the dri-devel
mailing list