Finally I found the ability to enable wait_for_scan_line support on SandyBridge.
According to specs, we should use DE_LOAD_SL ("This register is used to initiate a display scan line compare on DevSNB:D2 and later steppings"). To load a value to this register it is needed to use MI_LOAD_REGISTER_IMM. So the algorithm should be the following:
1. Calculate start/end scan lines
2. Call MI_LOAD_REGISTER_IMM with DE_LOAD_SL address and parameter equals to (0x11x<<29 | (start_sl<<16) | end_sl), where x represents pipe (0 for A, 1 for B).
3. Call MI_WAIT_FOR_EVENT with corresponding bits set to true (wait for pipe A/B scan line). Notice, that these bits are changed since last docs version.
The above should work but I didn't succeed. The problem could be with MI_LOAD_REGISTER_IMM (no rights for changing register) or even with hardware version. Of course, I may be wrong with the algorithm above.
Finally I found the ability to enable wait_for_scan_line support on SandyBridge. REGISTER_ IMM. So the algorithm should be the following:
According to specs, we should use DE_LOAD_SL ("This register is used to initiate a display scan line compare on DevSNB:D2 and later steppings"). To load a value to this register it is needed to use MI_LOAD_
1. Calculate start/end scan lines REGISTER_ IMM with DE_LOAD_SL address and parameter equals to (0x11x<<29 | (start_sl<<16) | end_sl), where x represents pipe (0 for A, 1 for B).
2. Call MI_LOAD_
3. Call MI_WAIT_FOR_EVENT with corresponding bits set to true (wait for pipe A/B scan line). Notice, that these bits are changed since last docs version.
The above should work but I didn't succeed. The problem could be with MI_LOAD_ REGISTER_ IMM (no rights for changing register) or even with hardware version. Of course, I may be wrong with the algorithm above.