00:34 kisak: eric_engestrom: we might have a problem with mesa !46169 going into mesa 26.2.8 with it being the last of the series. Apparently GTK3/4 + EGL (Wayland apps) derped on it (mesa#16834)
01:09 orowith2os: kisak: you mean 16934?
01:10 kisak: looks like I typo'd, yes.
01:12 orowith2os: I'll poke GTK folks and see if I can't move the GTK patch along
01:12 orowith2os: no guarantees, but I'll try
01:13 kisak: making it right for the future isn't really relevant for this context. Mesa gets shoved onto older distro releases.
01:13 orowith2os: well aware, still going to try moving GTK along here
01:15 kisak: For now, I'm going to back it out of my PPA builds, which should give until mesa 27.0 to ponder it.
02:36 orowith2os: @kisak GTK3 PR is merged, so it won't be forever :)
07:11 Daanct12: not sure if this is the right channel but can i have a review on https://lore.kernel.org/all/20261109-pro1x-display-pixelclock-v2-1-670b1eeed6a9@mainlining.org/ ?
07:14 HdkR: Daanct12: You might get more traction in #aarch64-laptop
10:25 jani: agd5f: drm-tip build broken for me with
10:25 jani: ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_backlight.c:196:6: error: ‘convert_custom_brightness’ defined but not used [-Werror=unused-function]
10:25 jani: 196 | void convert_custom_brightness(const struct amdgpu_dm_backlight_caps *caps,
10:25 jani: | ^~~~~~~~~~~~~~~~~~~~~~~~~
12:07 jannau: tzimmermann: any thoughts on how to use ARGB8888 for fbdev emulation. For Apple M3 devices and or a specific display controller firmware version I either can't or don't know how to support XRGB8888
12:09 jannau: my plan is to replace preferred_bpp with preferred_4cc in drm_fb_helper and pass that via drm_fb_helper_prepare() from drm_fbdev_client_setup()
12:11 jannau: and derive the format there from mode_config.preferred_depth if drm_fbdev_client_setup() is called with a NULL drm_format_info*
12:12 eric_engestrom: kisak, orowith2os: this is an app bug, so mesa should keep this fix and the app/toolkit should be fixed, and distros have the solution of no disabling gles1 anymore when it turns out they were doing it incorrectly, so I don't really think anything should be reverted in mesa, main or release branch
12:13 eric_engestrom: I agree that it's unfortunate that the mesa fix got picked up for backporting to 26.2.x as it would have given apps/toolkits more time to fix their bugs though
12:14 jannau: I've seen the comment that legacy applications might be broken if the format is not XRGB8888 but working fbdev emulation + broken legacy apps is strictly better than both broken
12:14 mripard: jannau: I think the change you're suggesting is good, but supporting XRGB8888 is a requirement
12:14 eric_engestrom: and as I commented on the issue, if the spec allows drivers to pick another default, we can do that too, to hopefully help broken apps, but at the risk of maybe breaking other apps (unconfirmed, just something that might happen)
12:16 jannau: mripard: what can I say. XRGB8888 either does not work or I don't know how
12:16 eric_engestrom: (taking that last comment back, see the discussion on the issue)
12:19 jannau: on M1 / M2 I can emulate XRGB8888 by blending premultiplied alpha with an opaque black background on the primary plane. That unfortunately does not work anymore
12:20 mripard: jannau: it's not really a problem though, we have plenty of drivers for HW that do not support XRGB8888 and still expose it through conversion helpers
12:20 mripard: see https://elixir.bootlin.com/linux/v7.3.1/source/drivers/gpu/drm/drm_format_helper.c#L841 for example
12:27 tzimmermann: jannau, can you emulate xrgb8888 in the driver?
12:28 tzimmermann: or which other formats does the HW support?
12:29 jannau: I'd prefer not to touch the pixel data on the CPU
12:30 jannau: ARGB8888, ARGB2101010, ABGR16161616F and YCrCb formats
12:30 jannau: https://drmdb.emersion.fr/snapshots/8119d77d17e3 on a device which can support X-formats on the primary plane
12:31 orowith2os: @eric_engestrom I'm not as concerned here, since I've already helped move things along in GTK (which seems to be where most of the clients here were having issues). Anything else is out of my hands since I don't have any say here :v
12:33 mripard: jannau: I think we'd all prefer not to care about compatibility with weird / ancient software :)
12:35 jannau: my concern with emulating XRGB is that non-ancient software which could use ARGB starts using the emulated XRGB
12:35 tzimmermann: jannau, yes that will be slower
12:36 tzimmermann: what happens if you simply pass an ARGB format to drm_client_setup()?
12:38 jannau: it selects XRGB anyway because the format is derived via drm_driver_color_mode_format() which returns drm_driver_legacy_fb_format(dev, 32, 24); for color_mode == 32
12:41 tzimmermann: somewhere here, i think. https://elixir.bootlin.com/linux/v7.3.1/source/drivers/gpu/drm/drm_fb_helper.c#L1426
12:41 tzimmermann: your idea of replacing preferred_bpp is good.
12:41 tzimmermann: but please don't use 4cc codes. rather pass a drm_format_info
12:42 tzimmermann: 'preferred_format'
12:45 tzimmermann: jannau, i think you'd also have to replace surface_bpp and surface_depth with the surface_format. https://elixir.bootlin.com/linux/v7.3.1/source/include/drm/drm_fb_helper.h#L62
12:47 tzimmermann: those values are used to get the surface format for allocating a graphics buffer for fbdev in places like https://elixir.bootlin.com/linux/v7.3.1/source/drivers/gpu/drm/drm_fbdev_shmem.c#L150 . but if you know the format, you can skip that lookup.
12:52 tzimmermann: jannau, the whole font rendering is in fbdev code. once you have the correct surface, we'll see if rendering works
12:53 jannau: yes, I've implemented my idea and it works
12:53 tzimmermann: the fbdev code is essentially spagetti and unmainaintainable. but it should work if it sets the alpha bits to 0xff
12:53 tzimmermann: is you have it already, maybe send a series for review
12:54 tzimmermann: jannau, if you specify the bpp value on the kernel command line, does it pick the correct format?
12:54 tzimmermann: IIRC that code only handles xrgb
12:56 jannau: switching now to drm_format_info pointers. I'll annotate them to come from drm_format_info(), i.e. they remain valid
12:57 jannau: from code inspection the cmdline code uses the same code paths to derive XRGB from bpp == 32
12:59 tzimmermann: yes, the cmdline handling is here: https://elixir.bootlin.com/linux/v7.3.1/source/drivers/gpu/drm/drm_fb_helper.c#L1406
13:00 tzimmermann: and the impl is at https://elixir.bootlin.com/linux/v7.3.1/source/drivers/gpu/drm/drm_fb_helper.c#L1355
13:00 tzimmermann: i think it would work if you compute the color mode for each given format until you find one that matches the given color_mode
13:03 jannau: thanks, I think I can handle it from here. I was primarily asking if replacing bpp with fourcc or drm_fromat_info in drm_fb_helper is the right direction
13:04 tzimmermann: jannau, i cannot find a helper for this, but it's the logic in the if branch at https://elixir.bootlin.com/linux/v7.3.1/source/drivers/gpu/drm/clients/drm_fbdev_client.c#L142
13:04 tzimmermann: jannau, great. let's do the details in the review. i'm glad to see some of that fbdev misery being replaced.
13:54 agd5f: jani, sorry about that. fixed.