klogg / fl2000_drm

Linux kernel FL2000DX/IT66121FN dongle DRM driver
GNU General Public License v2.0
113 stars 30 forks source link

Image rendering issues around cursor #27

Closed klogg closed 4 years ago

klogg commented 4 years ago

When running driver natively with Ubuntu some weird artifacts appear around cursor - even on other connected monitors

klogg commented 4 years ago

also reported by @whydea

klogg commented 4 years ago

Similar issue was reported some time ago for xorg: https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/issues/107

klogg commented 4 years ago

Turns out that xorg issue was fixed by supporting HWCursor in PRIME and switching for SWCursor when HW does not support it https://lists.x.org/archives/xorg-devel/2015-June/046634.html

klogg commented 4 years ago

Forced SWCursor on my system without FL2000 driver with xorg.conf.d addition to 10-nvidia.conf:

Section "Device"
    Identifier "Screen 0"
    Driver "nvidia"
    Option "HWCursor" "false"
    Option "SWCursor" "true"
EndSection

and got same artifacts.

Basically the issue is a defect in xorg with enabled software cursor which is unavoidable when using USB dongle without separate plane for cursor

klogg commented 4 years ago

xorg issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/828

klogg commented 4 years ago

xorg fix was merged for 1.20.9 release: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/447

klogg commented 4 years ago

Strangely enough, I see this issue persist with Ubuntu 20.10 based on xorg-server-core 1.20.9 Left a comment in corresponding issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/828#note_679764

klogg commented 4 years ago

Just to make sure everything is captured: FL2000 has only one plane, so driver cannot support DRM_PLANE_TYPE_CURSOR for DRM_PLANE_TYPE_CURSOR / DRM_PLANE_TYPE_CURSOR2 ioctls that ensure HWCursor xorg operation