Quoting Ville Syrjala (2017-11-13 13:36:22) > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > We have plenty of global registers and whatnot programmed without > any further locking by the modeset code. Currently non-bocking > modesets are allowed to execute in parallel which could corrupt > said registers. > > To avoid the problem let's run all non-blocking modesets on an > ordered workqueue. We still put page flips etc. to system_unbound_wq > allowing page flips on one pipe to execute in parallel with page flips > or a modeset on a another pipe (assuming no known state is shared > between them, at which point they would have been added to the same > atomic commit and serialized that way). > > Blocking modesets are already serialized with each other by > connection_mutex, and thus are safe. To serialize them with > non-blocking modesets we just flush the workqueue before executing > blocking modesets. I did something very similar in my patches for tracking concurrent modesets using plane granularity. I used a fence to impose a barrier for each level of registers (plane, crtc, global) and tracking the dependencies/ordering via those barrier fences. In effect, it gives the same barrier as switching between an ordered-wq, but I feel using fences should be easier to extend down to finer granularity. (What once was an easy patch is no more :-( -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx