On Sun, Jul 27, 2014 at 11:41:29PM +0200, Daniel Vetter wrote: > - I've added a new set of plane helpers. Mostly this was motivated to make the > atomic helpers work on less stellar hardware where you can't just stream the > state and then atomically commit with some GO bits. But those helpers should > also be useful for more gradual transitions of drivers to the atomic > interface. Since a requirement for atomic is to have universal plane support > they can be used bare-bones just for that, without all the other atomic > baggage (i.e. all the state tracking for crtcs/connectors). Maybe a short elaboration on how to smoothly transition to atomic is in order: 1. Implement the plane helpers for the primary plane, use the with the crtc helper set_config function through the provided ->mode_set_base and ->mode_set callbacks. 2. Expose a proper primary plane with the plan helpers and test it a bit (since with primary planes we now allow an enabled crtc with the primary plane off). 3. Convert all other planes (cursor, overlay) over to the primary plane helpers. You should move any constraint checking for planes into the atomic_check callback. 4. Roll out your atomic state handling functions for crtc/plane. Using the provided default handlers in the helper library is probably the best. Plane/crtc helpers will automatically switch to those when available. From here on you can also start to track plane/crtc state in your own subclassed structures. 5. Audit all your ->mode_fixup functions to make sure they don't depend upon the connector->encoder and encoder->crtc links. That's the big difference between atomic and crtc helpers. 6. Wire up the set_config implementation from the atomic helpers and test it. 7. Go through all the connectors individually and convert them to atomic state handling. If a connector has no driver-private properties then you can just wire up the default functions and the atomic set_prop implementation from the helpers. Otherwise you need to subclass the state structure. 8. Add ->atomic_check functions for crtcs to check additional constraints that need checking for global modesets. If you have global/shared resources (e.g. plls) add a modeset_lock for them and grab it if you need to change anything. Make sure you wire up the backoff logic correctly (CONFIG_DEBUG_WW_MUTEX_SLOWPATH is your friend). That's all - each step is fairly well-contained and can be tested on its own. Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel