On 23.12.2015 01:22, Keith Packard wrote: > Michel Dänzer <[email protected]> writes: > >> This series addresses two cases in which a HW cursor cannot be used: >> >> 1) When a transform is active on a CRTC. Patch 2 adds a CRTC hook >> use_hw_cursor_argb, which allows drivers to force SW cursor on a >> per-CRTC basis. However, this hook alone could only force SW cursor >> as of the next time a new cursor image is set. The >> xf86CursorResetCursor function added in patch 1 allows switching >> between HW cursor and SW cursor immediately. > > Hrm. This code is really hard to review because there are now two pairs > of functions checking whether software or hardware cursors should be > used -- the per-screen UseHWCursor/UseHWCursorARGB and the per-crtc ones > you're adding here. As a suggestion, would it be reasonable to use the > existing UseHWCursor/UseHWCursorARGB as proxies for the per-crtc > functions when the per-crtc ones don't exist?
Not sure what you're asking for. It's different layers: The new per-CRTC use_hw_cursor(_argb) hooks are used by xf86_use_hw_cursor(_argb), which are implementations of the per-screen UseHWCursor(ARGB) hooks. Without this patch, there's no way for a driver using the code in xf86Cursors.c to force an SW cursor. Of course, a driver could provide its own implementation of all per-screen HW cursor hooks for this purpose, but that seems overkill. > Would that let use remove all of the SW cursor checking code from > xf86Cursor.c, and simply use the code from xf86Cursors.c? I don't see how it could. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
