cog icon indicating copy to clipboard operation
cog copied to clipboard

Rockchip-drm unsupported format modifier

Open B0b0A opened this issue 3 years ago • 5 comments

When I am trying to start cog with drm platform the browser does not render. Cog reports that the webpage has loaded successfully but the kernel reports: [61291.046925] rockchip-drm display-subsystem: [drm] *ERROR* Unsupported format modifier 0x810000000000001

I am using the latest rockchip VOP2 driver on the 5.18-rc4 kernel with mesa-21.3.5 panfrost.

Other people have also had this issue with other apps and the following conclusion is from their founding:

This message is correct. This corresponds to DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED and the VOP2 driver doesn't support this. The app [cog] seems to use DRM_FORMAT_XRGB8888 which ends up being PIPE_FORMAT_B8G8R8_UNORM in MESA. In panfrost_afbc_format() we have:

    /* Don't allow swizzled formats on v7 */
    switch (format) {
    case PIPE_FORMAT_B8G8R8A8_UNORM:
    case PIPE_FORMAT_B8G8R8X8_UNORM:
    case PIPE_FORMAT_A8R8G8B8_UNORM:
    case PIPE_FORMAT_X8R8G8B8_UNORM:
    case PIPE_FORMAT_X8B8G8R8_UNORM:
    case PIPE_FORMAT_A8B8G8R8_UNORM:
    case PIPE_FORMAT_B8G8R8_UNORM:
    case PIPE_FORMAT_B5G6R5_UNORM:
            if (dev->arch >= 7)
                    return PIPE_FORMAT_NONE;

            break;
    default:
            break;
    }

This means the driver won't do AFBC with that format and picks DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED instead.

When I use weston - wayland and cog with wl platform then it renders fine meaning weston is clever enough to not pass that into the VOP2 driver, but apparently cog isn't.

To fix this issue I would not like to patch the upper layers to do such translation but would like for cog to choose the correct format.

I am using cog 0.12.4 (WPE WebKit 2.34.6)

Thank you.

B0b0A avatar May 04 '22 08:05 B0b0A

have you resolved this issue ?

simonchen007 avatar Sep 11 '23 11:09 simonchen007

This issue still seems to be present with 0.18.2 (WPE WebKit 2.44.0) on RK3566.

In my case I am getting in dmesg:

[ 4084.842014] rockchip-drm display-subsystem: [drm] *ERROR* Unsupported format modifier 0x800000000000351
[ 4084.845327] rockchip-drm display-subsystem: [drm] *ERROR* Unsupported format modifier 0x800000000000351
[ 4084.847856] rockchip-drm display-subsystem: [drm] *ERROR* Unsupported format modifier 0x800000000000351
[ 4085.731582] rockchip-drm display-subsystem: [drm] *ERROR* Unsupported format modifier 0x800000000000351
[ 4085.735638] rockchip-drm display-subsystem: [drm] *ERROR* Unsupported format modifier 0x800000000000351
[ 4085.741012] rockchip-drm display-subsystem: [drm] *ERROR* Unsupported format modifier 0x800000000000351

macpijan avatar May 16 '24 15:05 macpijan

I have made the COG works with the RK3566 without this issue, but poor performance, so , gave up COG and back to chromium. @macpijan

simonchen007 avatar May 17 '24 02:05 simonchen007

Interesting @simonchen007 , can you please share some more details what you did to make it work?

macpijan avatar May 17 '24 08:05 macpijan

@macpijan it's so long, I remember I made some I use COG 0.18.0 + wpewebkit 2.38.6, and made some patchs for them.

simonchen007 avatar May 17 '24 10:05 simonchen007