10:28Vanfanel: 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:29Vanfanel: So, is there anything that should be done on CURSOR plane before setting it's CRTC?
10:30Vanfanel: Or any other information I may be missing... been hours making experiments on this
10:33Vanfanel: (Of course, the CURSOR plane I am trying to connect to the CRTC does support it)
10:49sravn: Vanfanel: 0xffffffea is -22, which is EINVAL. In case this is of some help
10:57Vanfanel: 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:58Vanfanel: DRM_CLIENT_CAP_ATOMIC is enabled (I can update primary plane props without any problem, things appear in screen, etc)
11:00Vanfanel: 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:01Vanfanel: and the atomic property ID is simply that, "CRTC_ID", which is among the properties of the cursor plane
11:03Vanfanel: so still no idea on what is failing here
11:43mlankhorst: you needto set FB_ID at same time as CRTC_ID
11:46emersion: you can use this to get DRM debug logs: https://github.com/swaywm/wlroots/wiki/DRM-Debugging
11:46emersion: and grep for "failed" in the dmesg output
11:46emersion: sometimes it isn't easy to understand why the kernel returns EINVAL
11:47Vanfanel: mlankhorst and emersion: thanks :)
11:50mlankhorst: also indeed use drm debugging
11:53emersion: i would love a "just tell me the cause of EINVAL" flag :P
12:06Vanfanel: 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:06Vanfanel: which one more does not tell me much :(
12:07Vanfanel: 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:07Vanfanel: but it fails the same
12:08Vanfanel: *one more = once more
12:44emersion: Vanfanel: messages before this line should tell you why it failed
12:44emersion: sometimes need to go quite a few pages up to see the cause
12:57Vanfanel: 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:02emersion: check which formats are supported by the cursor plane
13:02emersion: usually it's AR24, not XR24
13:03Vanfanel: emersion: thanks! I don't even remember why did I chose XR24...
17:17imirkin: who controls dri-logger? for some reason it has stopped auto-joining #nouveau...
17:17imirkin: i keep having to /invite it, which i often forget to do
17:18karolherbst: imirkin: use /invite
17:18karolherbst: only saw your first sentence :D
19:26Vanfanel: Where's the gbm_bo struct defined? I looked high and low in drm.h etc, but I can't see it anywhere
19:27Vanfanel: I saw that eglplatform defines it to "typedef struct gbm_bo *EGLNativePixmapType;"
19:29Vanfanel: but.. where can I find it's members?
19:29Vanfanel: It's member list, I mean
19:31jkqxz: Vanfanel: <https://cgit.freedesktop.org/mesa/mesa/tree/src/gbm/main/gbmint.h#n108>
19:31Vanfanel: jkqxz: gracias!
19:32Vanfanel: I mean thanks
19:45Vanfanel: 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:45sravn: Vanfanel: Elixir is always a good place to ask. In this case: https://elixir.bootlin.com/mesa/latest/A/ident/gbm_bo
19:45Vanfanel: sravn: good tip
19:47Vanfanel: 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:47Vanfanel: I mean, I get <incomplete type> in GDM when trying to print a gbm_bo struct
19:57Vanfanel: any clue on what type should I cast gbm_bo to, so I can see it from GBM?
20:01jkqxz: You should have a definition of gbm_bo if you built Mesa with debug info?