10:28 Vanfanel: Hi. Using the atomic interface, I can perfectly set CRTC_ID property on the primary plane (and any other property) without problems. However, trying to setup CRTC_ID property on the cursor plane invalidates my atomic commit: drmModeAtomicAddProperty() returns 0x1b or 0x9, and drmModeAtomicCommit() returns 0xffffffea.
10:29 Vanfanel: So, is there anything that should be done on CURSOR plane before setting it's CRTC?
10:30 Vanfanel: Or any other information I may be missing... been hours making experiments on this
10:33 Vanfanel: (Of course, the CURSOR plane I am trying to connect to the CRTC does support it)
10:49 sravn: Vanfanel: 0xffffffea is -22, which is EINVAL. In case this is of some help
10:57 Vanfanel: sravn: yes, it is. According to docs, drmModeAtomicCommit() returns EINVAL: "if DRM_CLIENT_CAP_ATOMIC is not enabled, the value of flags is illegal, or atomic property IDs in the request are not recognized."
10:58 Vanfanel: DRM_CLIENT_CAP_ATOMIC is enabled (I can update primary plane props without any problem, things appear in screen, etc)
11:00 Vanfanel: value of flags should be right: I am doing the drmModeAtomicAddProperty() that tries to set the CRTC_ID of the CURSOR PLANE in a batch of drmModeAtomicAddProperty() calls that succeed without it.
11:01 Vanfanel: and the atomic property ID is simply that, "CRTC_ID", which is among the properties of the cursor plane
11:03 Vanfanel: so still no idea on what is failing here
11:43 mlankhorst: you needto set FB_ID at same time as CRTC_ID
11:46 emersion: you can use this to get DRM debug logs: https://github.com/swaywm/wlroots/wiki/DRM-Debugging
11:46 emersion: and grep for "failed" in the dmesg output
11:46 emersion: sometimes it isn't easy to understand why the kernel returns EINVAL
11:47 Vanfanel: mlankhorst and emersion: thanks :)
11:50 mlankhorst: also indeed use drm debugging
11:53 emersion: i would love a "just tell me the cause of EINVAL" flag :P
12:06 Vanfanel: mlankhorst: I am using drm debugging. All I can see regarding "failed" after clearing dmesg and runnig my code is: [83752.701388] [drm:drm_atomic_check_only [drm]] [PLANE:42:plane-2] atomic core check failed
12:06 Vanfanel: which one more does not tell me much :(
12:07 Vanfanel: I am trying to update both the CRTC_ID and FB_ID props of the cursor plane at the same time, as you told me
12:07 Vanfanel: but it fails the same
12:08 Vanfanel: *one more = once more
12:44 emersion: Vanfanel: messages before this line should tell you why it failed
12:44 emersion: sometimes need to go quite a few pages up to see the cause
12:57 Vanfanel: emersion: like this line just before the "atomic core check failed"? -> [86799.718119] [drm:drm_atomic_plane_check [drm]] [PLANE:42:plane-2] invalid pixel format XR24 little-endian (0x34325258), modifier 0x0
13:01 emersion: yeah
13:02 emersion: check which formats are supported by the cursor plane
13:02 emersion: usually it's AR24, not XR24
13:03 Vanfanel: emersion: thanks! I don't even remember why did I chose XR24...
17:17 imirkin: who controls dri-logger? for some reason it has stopped auto-joining #nouveau...
17:17 imirkin: i keep having to /invite it, which i often forget to do
17:18 karolherbst: imirkin: use /invite
17:18 karolherbst: ohh
17:18 karolherbst: only saw your first sentence :D
19:26 Vanfanel: Where's the gbm_bo struct defined? I looked high and low in drm.h etc, but I can't see it anywhere
19:27 Vanfanel: I saw that eglplatform defines it to "typedef struct gbm_bo *EGLNativePixmapType;"
19:29 Vanfanel: but.. where can I find it's members?
19:29 Vanfanel: It's member list, I mean
19:31 jkqxz: Vanfanel: <https://cgit.freedesktop.org/mesa/mesa/tree/src/gbm/main/gbmint.h#n108>
19:31 Vanfanel: jkqxz: gracias!
19:32 Vanfanel: I mean thanks
19:45 Vanfanel: jkqxz: even so, I can't print gbm_bo members in GDB ("incomplete type"). Normally I would cast to a known pointer type to print them, but there's none that GDB knows about it seems.
19:45 sravn: Vanfanel: Elixir is always a good place to ask. In this case: https://elixir.bootlin.com/mesa/latest/A/ident/gbm_bo
19:45 Vanfanel: sravn: good tip
19:47 Vanfanel: but this gbm_bo struct defined in src/gbm/main/gbmint.h doesn't seem to be available from programs using libgbm, is it?
19:47 Vanfanel: I mean, I get <incomplete type> in GDM when trying to print a gbm_bo struct
19:57 Vanfanel: any clue on what type should I cast gbm_bo to, so I can see it from GBM?
20:01 jkqxz: You should have a definition of gbm_bo if you built Mesa with debug info?