<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi all,<div><br></div><div>I noticed ugly tearing when rotating the screen with modesetting.</div><div><br></div><div>I already noticed this thread</div><div><br></div><div><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98876">https://bugs.freedesktop.org/show_bug.cgi?id=98876</a><br></div><div><br></div><div>that suggests to implement the TearFree option into modesetting.</div><div><br></div><div>So I took a look on the amd and ati implementations</div><div><br></div><div><a href="https://cgit.freedesktop.org/xorg/driver/xf86-video-amdgpu/commit/?id=c57da33308a81fa575179238a0415abcb8b34908">https://cgit.freedesktop.org/xorg/driver/xf86-video-amdgpu/commit/?id=c57da33308a81fa575179238a0415abcb8b34908</a><br></div><div><br></div><div><a href="https://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=43159ef400c3b18b9f4d3e6fa1c4aef2d60d38fe">https://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=43159ef400c3b18b9f4d3e6fa1c4aef2d60d38fe</a><br></div><div><br></div><div>and compared it to modesetting and I found that pageflipping is already implemented since this patch:</div><div><br></div><div><a href="https://lists.x.org/archives/xorg-devel/2015-May/046271.html">https://lists.x.org/archives/xorg-devel/2015-May/046271.html</a><br></div><div><br></div><div>But:</div><div><br></div><div>1. The above stated Freedesktop bug is older and the modesetting pageflipping implementation is not mentioned there in the TearFree context. But e.g. AMD GPU is  doing a very similar thing for TearFree.</div><div>2. Modesettings pageflipping is disabled on rotation and I found just that comment in the above patch:</div><div>> Don't do pageflipping if CRTCs are rotated (caught by Jason Ekstrand).</div><div><br></div><div>So here are my questions:</div><div><br></div><div>1. What is the difference between flipping the scanout buffers in amdgpu/ati and the front buffer and back buffer flipping in modesetting?</div><div><br></div><div>2. I suppose in both cases that are real video buffers instead of shadow buffers for rotation. Right?</div><div><br></div><div>3. I did not found any background info about the limitation for pageflipping caught by Jason. Can anyone give me some more info? Since amdgpu does the nearly the same with its two scanout buffers it shouldn't be a big problem.</div><div><br></div><div>So if TearFree support or something else that makes more sense is still an issue I can add that feature. I just need a little help.</div><div><br></div><div>Best regards</div><div>-Carsten</div><div> <br></div><div><br></div></div></div></div></div></div></div>