On Tue, May 10, 2016 at 04:28:22PM +0300, 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? > > 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. Yeah, atomic helpers guarantees you that it'll never screw this up and disable/enable twice. The only tricky bit to consider is boot-up, where the firmware might have left something enabled, but by default the reset helpers assume everything is off, and just reset sw state to all off. Either patch up that state to match (you only need to set very few things, no need to recover all the details about the mode), or manually shut things down. But you need to make sure that at driver load sw matches hw state. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel