[PATCH 11/23] drm: omapdrm: Check DSS manager state in the enable/disable helpers

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jun 6 01:38:34 UTC 2016


Hi Tomi,

On Tuesday 10 May 2016 16:28:22 Tomi Valkeinen wrote:
> On 26/04/16 23:35, Laurent Pinchart wrote:
> > The omapdrm DSS manager enable/disable operations check the DSS manager
> > state to avoid double enabling/disabling. Move that code to the DSS
> > manager to decrease the dependency of the DRM layer to the DSS layer.
> 
> Shouldn't omapdrm know if the CRTC is enabled or not, and avoid
> double-enable/disable by just looking at its internal state?

Ideally yes, and more than that, we shouldn't look at any omapdrm-specific 
state for the CRTC, but only at the CRTC core state. However, given the driver 
design that enables/disables CRTCs through a complicated call stack starting 
from the encoder enable/disable functions instead of in the CRTC 
enable/disable handlers, this is hard to track at the moment. I'd like to 
clean this mess up, but that will be a separate (and likely quite large) patch 
series.

> If so, we could remove dispc_mgr_is_enabled() call as you do, and add a
> WARN_ON() to omapdss if the mgr is already enabled/disabled to catch
> bugs in omapdrm.

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list