Assumption that, if there is cursor plane provided by the DRM driver, mouse will work with using cursor plane is never satisfied. https://cgit.kde.org/kwin.git/tree/plugins/platforms/drm/drm_output.cpp#n645 is never hooked with anything else.
KWin doesn't use the cursor plane to draw the cursor. Instead it uses the high level api provided by DRM to draw the cursor.
Ah.. Sorry for wrong assumption. It is related to the https://mail.kde.org/pipermail/plasma-devel/2018-March/082150.html I wanted to investigate why it doesn't seem to fallback to software cursor correctly.
and perhaps the code pointed above in comment #0 should be removed to avoid confusion? :)
(In reply to Bhushan Shah from comment #2) > Ah.. Sorry for wrong assumption. > > It is related to the > https://mail.kde.org/pipermail/plasma-devel/2018-March/082150.html > > I wanted to investigate why it doesn't seem to fallback to software cursor > correctly. Afaik there is no fallback in the DRM platform.
Ah, so https://phabricator.kde.org/D6186 doesn't implement fallback? The hardware in question doesn't report hardware plane, but it doesn't use software cursor also..
kwin_wayland log kwin_core: Session path: "/org/freedesktop/login1/session/_322" kwin_core: "logind" seat: "seat0" / "/org/freedesktop/login1/seat/seat0" kwin_core: "logind" seat: "seat0" / "/org/freedesktop/login1/seat/seat0" kwin_core: Gained session control kwin_libinput: Libinput: event0 - gpio-keys: is tagged by udev as: Keyboard kwin_libinput: Libinput: event0 - gpio-keys: device is a keyboard kwin_libinput: Libinput: event1 - VISENTA V1 : is tagged by udev as: Keyboard kwin_libinput: Libinput: event1 - VISENTA V1 : device is a keyboard kwin_libinput: Libinput: event2 - VISENTA V1 : is tagged by udev as: Keyboard Mouse kwin_libinput: Libinput: event2 - VISENTA V1 : device is a pointer kwin_libinput: Libinput: event2 - VISENTA V1 : device is a keyboard kwin_wayland_drm: Using Atomic Mode Setting. kwin_wayland_drm: Number of planes: 6 kwin_wayland_drm: Atomic init for plane: 28 kwin_wayland_drm: 28: type' (id 7): 1 kwin_wayland_drm: "type" has enums: QVector("Primary", "Cursor", "Overlay") kwin_wayland_drm: Test all 3 possible enums: kwin_wayland_drm: Enum 'Overlay': runtime-value = 0 kwin_wayland_drm: Enum 'Primary': runtime-value = 1 kwin_wayland_drm: Enum 'Cursor': runtime-value = 2 kwin_wayland_drm: => "type" with mapped enum value "Primary" kwin_wayland_drm: 28: SRC_X' (id 8): 0 kwin_wayland_drm: 28: SRC_Y' (id 9): 0 kwin_wayland_drm: 28: SRC_W' (id 10): 70778880 kwin_wayland_drm: 28: SRC_H' (id 11): 125829120 kwin_wayland_drm: 28: CRTC_X' (id 12): 0 kwin_wayland_drm: 28: CRTC_Y' (id 13): 0 kwin_wayland_drm: 28: CRTC_W' (id 14): 1080 kwin_wayland_drm: 28: CRTC_H' (id 15): 1920 kwin_wayland_drm: 28: FB_ID' (id 16): 43 kwin_wayland_drm: 28: CRTC_ID' (id 19): 29 kwin_wayland_drm: Supported Transformations: QFlags() on plane 28 kwin_wayland_drm: Atomic init for plane: 30 kwin_wayland_drm: 30: type' (id 7): 0 kwin_wayland_drm: "type" has enums: QVector("Primary", "Cursor", "Overlay") kwin_wayland_drm: Test all 3 possible enums: kwin_wayland_drm: Enum 'Overlay': runtime-value = 0 kwin_wayland_drm: Enum 'Primary': runtime-value = 1 kwin_wayland_drm: Enum 'Cursor': runtime-value = 2 kwin_wayland_drm: => "type" with mapped enum value "Overlay" kwin_wayland_drm: 30: SRC_X' (id 8): 0 kwin_wayland_drm: 30: SRC_Y' (id 9): 0 kwin_wayland_drm: 30: SRC_W' (id 10): 0 kwin_wayland_drm: 30: SRC_H' (id 11): 0 kwin_wayland_drm: 30: CRTC_X' (id 12): 0 kwin_wayland_drm: 30: CRTC_Y' (id 13): 0 kwin_wayland_drm: 30: CRTC_W' (id 14): 0 kwin_wayland_drm: 30: CRTC_H' (id 15): 0 kwin_wayland_drm: 30: FB_ID' (id 16): 0 kwin_wayland_drm: 30: CRTC_ID' (id 19): 0 kwin_wayland_drm: Supported Transformations: QFlags() on plane 30 kwin_wayland_drm: Atomic init for plane: 31 kwin_wayland_drm: 31: type' (id 7): 1 kwin_wayland_drm: "type" has enums: QVector("Primary", "Cursor", "Overlay") kwin_wayland_drm: Test all 3 possible enums: kwin_wayland_drm: Enum 'Overlay': runtime-value = 0 kwin_wayland_drm: Enum 'Primary': runtime-value = 1 kwin_wayland_drm: Enum 'Cursor': runtime-value = 2 kwin_wayland_drm: => "type" with mapped enum value "Primary" kwin_wayland_drm: 31: SRC_X' (id 8): 0 kwin_wayland_drm: 31: SRC_Y' (id 9): 0 kwin_wayland_drm: 31: SRC_W' (id 10): 0 kwin_wayland_drm: 31: SRC_H' (id 11): 0 kwin_wayland_drm: 31: CRTC_X' (id 12): 0 kwin_wayland_drm: 31: CRTC_Y' (id 13): 0 kwin_wayland_drm: 31: CRTC_W' (id 14): 0 kwin_wayland_drm: 31: CRTC_H' (id 15): 0 kwin_wayland_drm: 31: FB_ID' (id 16): 0 kwin_wayland_drm: 31: CRTC_ID' (id 19): 0 kwin_wayland_drm: Supported Transformations: QFlags() on plane 31 kwin_wayland_drm: Atomic init for plane: 33 kwin_wayland_drm: 33: type' (id 7): 1 kwin_wayland_drm: "type" has enums: QVector("Primary", "Cursor", "Overlay") kwin_wayland_drm: Test all 3 possible enums: kwin_wayland_drm: Enum 'Overlay': runtime-value = 0 kwin_wayland_drm: Enum 'Primary': runtime-value = 1 kwin_wayland_drm: Enum 'Cursor': runtime-value = 2 kwin_wayland_drm: => "type" with mapped enum value "Primary" kwin_wayland_drm: 33: SRC_X' (id 8): 0 kwin_wayland_drm: 33: SRC_Y' (id 9): 0 kwin_wayland_drm: 33: SRC_W' (id 10): 0 kwin_wayland_drm: 33: SRC_H' (id 11): 0 kwin_wayland_drm: 33: CRTC_X' (id 12): 0 kwin_wayland_drm: 33: CRTC_Y' (id 13): 0 kwin_wayland_drm: 33: CRTC_W' (id 14): 0 kwin_wayland_drm: 33: CRTC_H' (id 15): 0 kwin_wayland_drm: 33: FB_ID' (id 16): 0 kwin_wayland_drm: 33: CRTC_ID' (id 19): 0 kwin_wayland_drm: Supported Transformations: QFlags() on plane 33 kwin_wayland_drm: Atomic init for plane: 35 kwin_wayland_drm: 35: type' (id 7): 0 kwin_wayland_drm: "type" has enums: QVector("Primary", "Cursor", "Overlay") kwin_wayland_drm: Test all 3 possible enums: kwin_wayland_drm: Enum 'Overlay': runtime-value = 0 kwin_wayland_drm: Enum 'Primary': runtime-value = 1 kwin_wayland_drm: Enum 'Cursor': runtime-value = 2 kwin_wayland_drm: => "type" with mapped enum value "Overlay" kwin_wayland_drm: 35: SRC_X' (id 8): 0 kwin_wayland_drm: 35: SRC_Y' (id 9): 0 kwin_wayland_drm: 35: SRC_W' (id 10): 0 kwin_wayland_drm: 35: SRC_H' (id 11): 0 kwin_wayland_drm: 35: CRTC_X' (id 12): 0 kwin_wayland_drm: 35: CRTC_Y' (id 13): 0 kwin_wayland_drm: 35: CRTC_W' (id 14): 0 kwin_wayland_drm: 35: CRTC_H' (id 15): 0 kwin_wayland_drm: 35: FB_ID' (id 16): 0 kwin_wayland_drm: 35: CRTC_ID' (id 19): 0 kwin_wayland_drm: Supported Transformations: QFlags() on plane 35 kwin_wayland_drm: Atomic init for plane: 36 kwin_wayland_drm: 36: type' (id 7): 1 kwin_wayland_drm: "type" has enums: QVector("Primary", "Cursor", "Overlay") kwin_wayland_drm: Test all 3 possible enums: kwin_wayland_drm: Enum 'Overlay': runtime-value = 0 kwin_wayland_drm: Enum 'Primary': runtime-value = 1 kwin_wayland_drm: Enum 'Cursor': runtime-value = 2 kwin_wayland_drm: => "type" with mapped enum value "Primary" kwin_wayland_drm: 36: SRC_X' (id 8): 0 kwin_wayland_drm: 36: SRC_Y' (id 9): 0 kwin_wayland_drm: 36: SRC_W' (id 10): 0 kwin_wayland_drm: 36: SRC_H' (id 11): 0 kwin_wayland_drm: 36: CRTC_X' (id 12): 0 kwin_wayland_drm: 36: CRTC_Y' (id 13): 0 kwin_wayland_drm: 36: CRTC_W' (id 14): 0 kwin_wayland_drm: 36: CRTC_H' (id 15): 0 kwin_wayland_drm: 36: FB_ID' (id 16): 0 kwin_wayland_drm: 36: CRTC_ID' (id 19): 0 kwin_wayland_drm: Supported Transformations: QFlags() on plane 36 kwin_wayland_drm: Creating connector 39 kwin_wayland_drm: 39: CRTC_ID' (id 19): 29 kwin_wayland_drm: Atomic init for CRTC: 0 id: 29 kwin_wayland_drm: 29: MODE_ID' (id 21): 55 kwin_wayland_drm: 29: ACTIVE' (id 20): 1 kwin_wayland_drm: Atomic init for CRTC: 1 id: 32 kwin_wayland_drm: 32: MODE_ID' (id 21): 0 kwin_wayland_drm: 32: ACTIVE' (id 20): 0 kwin_wayland_drm: Atomic init for CRTC: 2 id: 34 kwin_wayland_drm: 34: MODE_ID' (id 21): 0 kwin_wayland_drm: 34: ACTIVE' (id 20): 0 kwin_wayland_drm: Atomic init for CRTC: 3 id: 37 kwin_wayland_drm: 37: MODE_ID' (id 21): 0 kwin_wayland_drm: 37: ACTIVE' (id 20): 0 kwin_wayland_drm: For new output use mode 1080x1920 kwin_wayland_drm: Initialized primary plane 28 on CRTC 29 kwin_wayland_drm: Adding mode: 0 QSize(1080, 1920) kwin_wayland_drm: New DPMS mode equals old mode. DPMS unchanged. kwin_wayland_drm: Found new output with uuid "c43729dd27" kwin_wayland_drm: Reading output configuration for [ "c43729dd27" ] [ "c43729dd27" ]
(In reply to Bhushan Shah from comment #5) > Ah, so https://phabricator.kde.org/D6186 doesn't implement fallback? The > hardware in question doesn't report hardware plane, but it doesn't use > software cursor also.. No, it doesn't have any checks whether the DRM driver supports cursor. KWin just uses drmModeSetCursor - there is no check whether the driver supports that and no fallback to anything else. If drm is used, it is assumed that the driver supports that.
I need to slightly correct myself: if the initial mapping of a cursor fails, software rendering is enabled, see drm_backend.cpp:464