[PATCH 16/21] drm/omap: Merge HPD enable operation with HPD callback registration

Sebastian Reichel sre at kernel.org
Mon Jun 11 22:26:25 UTC 2018


Hi,

On Wed, Jun 06, 2018 at 12:36:45PM +0300, Laurent Pinchart wrote:
> The omap_dss_device .enable_hpd() and .disable_hpd() are used to enable
> and disable hot-plug detection at omapdrm probe and remove time. This is
> required to avoid reporting hot-plug detection events before the DRM
> infrastructure is ready to accept them, as that could result in crashes
> or other malfunction.
> 
> Hot-plug event reporting is conditioned by both HPD being enabled
> through the .enable_hpd() operation and by the HPD callback being
> registered though the .register_hpd_cb() operation. We thus don't need a
> separate enable operation if we can guarantee that callbacks won't be
> registered too early.
> 
> HPD callbacks are registered at connector initialization time, which is
> too early to start reporting HPD events. There's however nothing
> blocking a move of callback registration to a later time when the
> omapdrm driver calls the HPD enable operations. Do so, and remove the
> HPD enable operation completely from omap_dss_device drivers.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>
> [...]
>
> @@ -391,12 +387,8 @@ static void omap_modeset_disable_external_hpd(struct drm_device *ddev)
>  	struct omap_drm_private *priv = ddev->dev_private;
>  	int i;
>  
> -	for (i = 0; i < priv->num_pipes; i++) {
> -		struct omap_dss_device *display = priv->pipes[i].display;
> -
> -		if (display->ops->disable_hpd)
> -			display->ops->disable_hpd(display);
> -	}
> +	for (i = 0; i < priv->num_pipes; i++)
> +		omap_connector_enable_hpd(priv->pipes[i].connector);
>  }
>  
>  /*
> -- 

omap_connector_disable_hpd... Otherwise:

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

-- 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/20180612/236eb4e8/attachment.sig>


More information about the dri-devel mailing list