-
Daniel Stone authored
Split repaint into two stages, as implied by the grouped-repaint interface: drm_output_repaint generates the repaint state only, and drm_repaint_flush applies it. This also moves DPMS into output state. Previously, the usual way to DPMS off was that repaint would be called and apply its state, followed by set_dpms being called afterwards to push the DPMS state separately. As this happens before the repaint_flush hook, with no change to DPMS we would set DPMS off, then immediately re-enable the output by posting the repaint. Not ideal. Moving DPMS application at the same time complicates this patch, but I couldn't find a way to split it; if we keep set_dpms before begin_flush then we break DPMS off, or if we try to move DPMS to output state before using the repaint flush, we get stuck as the repaint hook generates an asynchronous state update, followed immediately by set_dpms generating a synchronous state update. In drm_output_update_complete, the *_pending flags are cleared before any of the pending actions are taken; this ensures that the actions cannot recurse. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
a08512f4