Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Large gamma size reported for headless outputs #2349

Open
CameronNemo opened this issue Jul 26, 2020 · 10 comments
Open

Large gamma size reported for headless outputs #2349

CameronNemo opened this issue Jul 26, 2020 · 10 comments
Labels

Comments

@CameronNemo
Copy link

CameronNemo commented Jul 26, 2020

Like #1135, but now the gamma ramp is too big to fit on any reasonably sized tmpfs.

I have a user reporting that wlroots is returning a gamma ramp size of >billion (according to their trace): https://gitlab.com/chinstrap/gammastep/-/issues/3

Perhaps wlroots could automatically do a translation for outputs that have absurdly large gamma ramp sizes?


wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2349

@b0o
Copy link

b0o commented Jul 26, 2020

I am the reporting user - I am almost certain this is related to headless outputs (see the gitlab issue). I will re-test soon when I have a chance to restart sway (can't yet destroy them after creation - swaywm/sway#5522).

@b0o
Copy link

b0o commented Jul 26, 2020

Confirmed - I restarted sway and subsequently redshift/gammastep work as expected. I then created a single headless output and the issue returned. With a single headless output, the issue appears less often - but with each additional headless output, memory usage seems to increase substantially and the issue appears more often.

@emersion
Copy link
Member

Headless outputs don't support gamma. It's supposed to hit this path:

if (gamma_size == 0) {

@emersion emersion changed the title Gamma control not working when gamma size is absurdly large Large gamma size reported for headless outputs Aug 10, 2020
@jbaum98
Copy link

jbaum98 commented Sep 16, 2020

I think I'm experiencing a similar issue. I'm not using a headless display, but it's reporting a gamma size of 1632448306.

@emersion
Copy link
Member

Assuming you're running the DRM backend, can you run drm_info on your machine?

@jbaum98
Copy link

jbaum98 commented Sep 16, 2020

I got that value by poking around gdb. The index in the for loop is also really big though, so maybe something funkier is going on.

Node: /dev/dri/card1
├───Driver: rockchip (RockChip Soc DRM) version 1.0.0 (20140818)
│   ├───DRM_CLIENT_CAP_STEREO_3D supported
│   ├───DRM_CLIENT_CAP_UNIVERSAL_PLANES supported
│   ├───DRM_CLIENT_CAP_ATOMIC supported
│   ├───DRM_CLIENT_CAP_ASPECT_RATIO supported
│   ├───DRM_CLIENT_CAP_WRITEBACK_CONNECTORS supported
│   ├───DRM_CAP_DUMB_BUFFER = 1
│   ├───DRM_CAP_VBLANK_HIGH_CRTC = 1
│   ├───DRM_CAP_DUMB_PREFERRED_DEPTH = 0
│   ├───DRM_CAP_DUMB_PREFER_SHADOW = 0
│   ├───DRM_CAP_PRIME = 3
│   ├───DRM_CAP_TIMESTAMP_MONOTONIC = 1
│   ├───DRM_CAP_ASYNC_PAGE_FLIP = 0
│   ├───DRM_CAP_CURSOR_WIDTH = 64
│   ├───DRM_CAP_CURSOR_HEIGHT = 64
│   ├───DRM_CAP_ADDFB2_MODIFIERS = 1
│   ├───DRM_CAP_PAGE_FLIP_TARGET = 0
│   ├───DRM_CAP_CRTC_IN_VBLANK_EVENT = 1
│   ├───DRM_CAP_SYNCOBJ = 0
│   └───DRM_CAP_SYNCOBJ_TIMELINE = 0
├───Device: platform rockchip,display-subsystem
├───Framebuffer size
│   ├───Width: [0, 4096]
│   └───Height: [0, 4096]
├───Connectors
│   ├───Connector 0
│   │   ├───Object ID: 49
│   │   ├───Type: eDP
│   │   ├───Status: connected
│   │   ├───Physical size: 309x174 mm
│   │   ├───Subpixel: unknown
│   │   ├───Encoders: {0}
│   │   ├───Modes
│   │   │   └───1920x1080@60.00 preferred driver 
│   │   └───Properties
│   │       ├───"EDID" (immutable): blob = 0
│   │       ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│   │       ├───"link-status": enum {Good, Bad} = Good
│   │       ├───"non-desktop" (immutable): range [0, 1] = 0
│   │       ├───"TILE" (immutable): blob = 0
│   │       └───"CRTC_ID" (atomic): object CRTC = 37
│   └───Connector 1
│       ├───Object ID: 51
│       ├───Type: DisplayPort
│       ├───Status: disconnected
│       ├───Encoders: {1}
│       └───Properties
│           ├───"EDID" (immutable): blob = 0
│           ├───"DPMS": enum {On, Standby, Suspend, Off} = Off
│           ├───"link-status": enum {Good, Bad} = Good
│           ├───"non-desktop" (immutable): range [0, 1] = 0
│           ├───"TILE" (immutable): blob = 0
│           └───"CRTC_ID" (atomic): object CRTC = 0
├───Encoders
│   ├───Encoder 0
│   │   ├───Object ID: 48
│   │   ├───Type: TMDS
│   │   ├───CRTCS: {0, 1}
│   │   └───Clones: {0}
│   └───Encoder 1
│       ├───Object ID: 50
│       ├───Type: TMDS
│       ├───CRTCS: {0, 1}
│       └───Clones: {1}
├───CRTCs
│   ├───CRTC 0
│   │   ├───Object ID: 37
│   │   ├───Mode: 1920x1080@60.00 preferred driver 
│   │   └───Properties
│   │       ├───"ACTIVE" (atomic): range [0, 1] = 1
│   │       ├───"MODE_ID" (atomic): blob = 54
│   │       │   └───1920x1080@60.00 preferred driver 
│   │       ├───"OUT_FENCE_PTR" (atomic): range [0, UINT64_MAX] = 0
│   │       └───"VRR_ENABLED": range [0, 1] = 0
│   └───CRTC 1
│       ├───Object ID: 43
│       └───Properties
│           ├───"ACTIVE" (atomic): range [0, 1] = 0
│           ├───"MODE_ID" (atomic): blob = 0
│           ├───"OUT_FENCE_PTR" (atomic): range [0, UINT64_MAX] = 0
│           └───"VRR_ENABLED": range [0, 1] = 0
└───Planes
    ├───Plane 0
    │   ├───Object ID: 31
    │   ├───CRTCs: {0}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   ├───BGR565 (0x36314742)
    │   │   ├───NV12 (0x3231564e)
    │   │   ├───NV16 (0x3631564e)
    │   │   └───NV24 (0x3432564e)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Primary
    │       ├───"FB_ID" (atomic): object framebuffer = 56
    │       │   ├───Object ID: 56
    │       │   ├───Size: 1920x1080
    │       │   ├───Pitch: 7680
    │       │   ├───Bits per pixel: 32
    │       │   └───Depth: 32
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 37
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 1920
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 1080
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 1920
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 1080
    │       ├───"IN_FORMATS" (immutable): blob = 32
    │       │   └───DRM_FORMAT_MOD_LINEAR (0x0)
    │       │       ├───XRGB8888 (0x34325258)
    │       │       ├───ARGB8888 (0x34325241)
    │       │       ├───XBGR8888 (0x34324258)
    │       │       ├───ABGR8888 (0x34324241)
    │       │       ├───RGB888 (0x34324752)
    │       │       ├───BGR888 (0x34324742)
    │       │       ├───RGB565 (0x36314752)
    │       │       ├───BGR565 (0x36314742)
    │       │       ├───NV12 (0x3231564e)
    │       │       ├───NV16 (0x3631564e)
    │       │       └───NV24 (0x3432564e)
    │       └───"rotation": bitmask {rotate-0, reflect-x, reflect-y} = (rotate-0)
    ├───Plane 1
    │   ├───Object ID: 34
    │   ├───CRTCs: {0}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   └───BGR565 (0x36314742)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Cursor
    │       ├───"FB_ID" (atomic): object framebuffer = 57
    │       │   ├───Object ID: 57
    │       │   ├───Size: 64x64
    │       │   ├───Pitch: 256
    │       │   ├───Bits per pixel: 32
    │       │   └───Depth: 32
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 37
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 798
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 760
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 64
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 64
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 64
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 64
    │       ├───"IN_FORMATS" (immutable): blob = 35
    │       │   └───DRM_FORMAT_MOD_LINEAR (0x0)
    │       │       ├───XRGB8888 (0x34325258)
    │       │       ├───ARGB8888 (0x34325241)
    │       │       ├───XBGR8888 (0x34324258)
    │       │       ├───ABGR8888 (0x34324241)
    │       │       ├───RGB888 (0x34324752)
    │       │       ├───BGR888 (0x34324742)
    │       │       ├───RGB565 (0x36314752)
    │       │       └───BGR565 (0x36314742)
    │       └───"rotation": bitmask {rotate-0, reflect-y} = (rotate-0)
    ├───Plane 2
    │   ├───Object ID: 38
    │   ├───CRTCs: {1}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   ├───BGR565 (0x36314742)
    │   │   ├───NV12 (0x3231564e)
    │   │   ├───NV16 (0x3631564e)
    │   │   └───NV24 (0x3432564e)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Primary
    │       ├───"FB_ID" (atomic): object framebuffer = 0
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 0
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"IN_FORMATS" (immutable): blob = 39
    │       │   ├───DRM_FORMAT_MOD_ARM_AFBC(SPARSE|BLOCK_SIZE_16x16) (0x800000000000041)
    │       │   │   ├───XRGB8888 (0x34325258)
    │       │   │   ├───ARGB8888 (0x34325241)
    │       │   │   ├───XBGR8888 (0x34324258)
    │       │   │   ├───ABGR8888 (0x34324241)
    │       │   │   ├───RGB888 (0x34324752)
    │       │   │   ├───BGR888 (0x34324742)
    │       │   │   ├───RGB565 (0x36314752)
    │       │   │   └───BGR565 (0x36314742)
    │       │   └───DRM_FORMAT_MOD_LINEAR (0x0)
    │       │       ├───XRGB8888 (0x34325258)
    │       │       ├───ARGB8888 (0x34325241)
    │       │       ├───XBGR8888 (0x34324258)
    │       │       ├───ABGR8888 (0x34324241)
    │       │       ├───RGB888 (0x34324752)
    │       │       ├───BGR888 (0x34324742)
    │       │       ├───RGB565 (0x36314752)
    │       │       ├───BGR565 (0x36314742)
    │       │       ├───NV12 (0x3231564e)
    │       │       ├───NV16 (0x3631564e)
    │       │       └───NV24 (0x3432564e)
    │       └───"rotation": bitmask {rotate-0, reflect-y} = (rotate-0)
    ├───Plane 3
    │   ├───Object ID: 41
    │   ├───CRTCs: {1}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   └───BGR565 (0x36314742)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Cursor
    │       ├───"FB_ID" (atomic): object framebuffer = 0
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 0
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
    │       └───"IN_FORMATS" (immutable): blob = 42
    │           └───DRM_FORMAT_MOD_LINEAR (0x0)
    │               ├───XRGB8888 (0x34325258)
    │               ├───ARGB8888 (0x34325241)
    │               ├───XBGR8888 (0x34324258)
    │               ├───ABGR8888 (0x34324241)
    │               ├───RGB888 (0x34324752)
    │               ├───BGR888 (0x34324742)
    │               ├───RGB565 (0x36314752)
    │               └───BGR565 (0x36314742)
    ├───Plane 4
    │   ├───Object ID: 44
    │   ├───CRTCs: {1}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   ├───BGR565 (0x36314742)
    │   │   ├───NV12 (0x3231564e)
    │   │   ├───NV16 (0x3631564e)
    │   │   └───NV24 (0x3432564e)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Overlay
    │       ├───"FB_ID" (atomic): object framebuffer = 0
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 0
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
    │       └───"IN_FORMATS" (immutable): blob = 45
    │           └───DRM_FORMAT_MOD_LINEAR (0x0)
    │               ├───XRGB8888 (0x34325258)
    │               ├───ARGB8888 (0x34325241)
    │               ├───XBGR8888 (0x34324258)
    │               ├───ABGR8888 (0x34324241)
    │               ├───RGB888 (0x34324752)
    │               ├───BGR888 (0x34324742)
    │               ├───RGB565 (0x36314752)
    │               ├───BGR565 (0x36314742)
    │               ├───NV12 (0x3231564e)
    │               ├───NV16 (0x3631564e)
    │               └───NV24 (0x3432564e)
    └───Plane 5
        ├───Object ID: 46
        ├───CRTCs: {1}
        ├───Formats:
        │   ├───XRGB8888 (0x34325258)
        │   ├───ARGB8888 (0x34325241)
        │   ├───XBGR8888 (0x34324258)
        │   ├───ABGR8888 (0x34324241)
        │   ├───RGB888 (0x34324752)
        │   ├───BGR888 (0x34324742)
        │   ├───RGB565 (0x36314752)
        │   └───BGR565 (0x36314742)
        └───Properties
            ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Overlay
            ├───"FB_ID" (atomic): object framebuffer = 0
            ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
            ├───"CRTC_ID" (atomic): object CRTC = 0
            ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
            ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
            ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
            ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
            ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
            ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
            ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
            ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
            └───"IN_FORMATS" (immutable): blob = 47
                └───DRM_FORMAT_MOD_LINEAR (0x0)
                    ├───XRGB8888 (0x34325258)
                    ├───ARGB8888 (0x34325241)
                    ├───XBGR8888 (0x34324258)
                    ├───ABGR8888 (0x34324241)
                    ├───RGB888 (0x34324752)
                    ├───BGR888 (0x34324742)
                    ├───RGB565 (0x36314752)
                    └───BGR565 (0x36314742)

@emersion
Copy link
Member

Hmm, it seems like this goes through the legacy path, because the driver doesn't expose GAMMA_LUT_SIZE. Unfortunately drm_info doesn't print the legacy field, can you try again with ascent12/drm_info#59?

@jbaum98
Copy link

jbaum98 commented Sep 16, 2020

Node: /dev/dri/card1
├───Driver: rockchip (RockChip Soc DRM) version 1.0.0 (20140818)
│   ├───DRM_CLIENT_CAP_STEREO_3D supported
│   ├───DRM_CLIENT_CAP_UNIVERSAL_PLANES supported
│   ├───DRM_CLIENT_CAP_ATOMIC supported
│   ├───DRM_CLIENT_CAP_ASPECT_RATIO supported
│   ├───DRM_CLIENT_CAP_WRITEBACK_CONNECTORS supported
│   ├───DRM_CAP_DUMB_BUFFER = 1
│   ├───DRM_CAP_VBLANK_HIGH_CRTC = 1
│   ├───DRM_CAP_DUMB_PREFERRED_DEPTH = 0
│   ├───DRM_CAP_DUMB_PREFER_SHADOW = 0
│   ├───DRM_CAP_PRIME = 3
│   ├───DRM_CAP_TIMESTAMP_MONOTONIC = 1
│   ├───DRM_CAP_ASYNC_PAGE_FLIP = 0
│   ├───DRM_CAP_CURSOR_WIDTH = 64
│   ├───DRM_CAP_CURSOR_HEIGHT = 64
│   ├───DRM_CAP_ADDFB2_MODIFIERS = 1
│   ├───DRM_CAP_PAGE_FLIP_TARGET = 0
│   ├───DRM_CAP_CRTC_IN_VBLANK_EVENT = 1
│   ├───DRM_CAP_SYNCOBJ = 0
│   └───DRM_CAP_SYNCOBJ_TIMELINE = 0
├───Device: platform rockchip,display-subsystem
├───Framebuffer size
│   ├───Width: [0, 4096]
│   └───Height: [0, 4096]
├───Connectors
│   ├───Connector 0
│   │   ├───Object ID: 49
│   │   ├───Type: eDP
│   │   ├───Status: connected
│   │   ├───Physical size: 309x174 mm
│   │   ├───Subpixel: unknown
│   │   ├───Encoders: {0}
│   │   ├───Modes
│   │   │   └───1920x1080@60.00 preferred driver 
│   │   └───Properties
│   │       ├───"EDID" (immutable): blob = 0
│   │       ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│   │       ├───"link-status": enum {Good, Bad} = Good
│   │       ├───"non-desktop" (immutable): range [0, 1] = 0
│   │       ├───"TILE" (immutable): blob = 0
│   │       └───"CRTC_ID" (atomic): object CRTC = 37
│   └───Connector 1
│       ├───Object ID: 51
│       ├───Type: DisplayPort
│       ├───Status: disconnected
│       ├───Encoders: {1}
│       └───Properties
│           ├───"EDID" (immutable): blob = 0
│           ├───"DPMS": enum {On, Standby, Suspend, Off} = Off
│           ├───"link-status": enum {Good, Bad} = Good
│           ├───"non-desktop" (immutable): range [0, 1] = 0
│           ├───"TILE" (immutable): blob = 0
│           └───"CRTC_ID" (atomic): object CRTC = 0
├───Encoders
│   ├───Encoder 0
│   │   ├───Object ID: 48
│   │   ├───Type: TMDS
│   │   ├───CRTCS: {0, 1}
│   │   └───Clones: {0}
│   └───Encoder 1
│       ├───Object ID: 50
│       ├───Type: TMDS
│       ├───CRTCS: {0, 1}
│       └───Clones: {1}
├───CRTCs
│   ├───CRTC 0
│   │   ├───Object ID: 37
│   │   ├───Mode: 1920x1080@60.00 preferred driver 
│   │   ├───Gamma size: 0
│   │   └───Properties
│   │       ├───"ACTIVE" (atomic): range [0, 1] = 1
│   │       ├───"MODE_ID" (atomic): blob = 55
│   │       │   └───1920x1080@60.00 preferred driver 
│   │       ├───"OUT_FENCE_PTR" (atomic): range [0, UINT64_MAX] = 0
│   │       └───"VRR_ENABLED": range [0, 1] = 0
│   └───CRTC 1
│       ├───Object ID: 43
│       ├───Gamma size: 0
│       └───Properties
│           ├───"ACTIVE" (atomic): range [0, 1] = 0
│           ├───"MODE_ID" (atomic): blob = 0
│           ├───"OUT_FENCE_PTR" (atomic): range [0, UINT64_MAX] = 0
│           └───"VRR_ENABLED": range [0, 1] = 0
└───Planes
    ├───Plane 0
    │   ├───Object ID: 31
    │   ├───CRTCs: {0}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   ├───BGR565 (0x36314742)
    │   │   ├───NV12 (0x3231564e)
    │   │   ├───NV16 (0x3631564e)
    │   │   └───NV24 (0x3432564e)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Primary
    │       ├───"FB_ID" (atomic): object framebuffer = 53
    │       │   ├───Object ID: 53
    │       │   ├───Size: 1920x1080
    │       │   ├───Format: ARGB8888 (0x34325241)
    │       │   └───Modifier: DRM_FORMAT_MOD_LINEAR (0x0)
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 37
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 1920
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 1080
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 1920
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 1080
    │       ├───"IN_FORMATS" (immutable): blob = 32
    │       │   └───DRM_FORMAT_MOD_LINEAR (0x0)
    │       │       ├───XRGB8888 (0x34325258)
    │       │       ├───ARGB8888 (0x34325241)
    │       │       ├───XBGR8888 (0x34324258)
    │       │       ├───ABGR8888 (0x34324241)
    │       │       ├───RGB888 (0x34324752)
    │       │       ├───BGR888 (0x34324742)
    │       │       ├───RGB565 (0x36314752)
    │       │       ├───BGR565 (0x36314742)
    │       │       ├───NV12 (0x3231564e)
    │       │       ├───NV16 (0x3631564e)
    │       │       └───NV24 (0x3432564e)
    │       └───"rotation": bitmask {rotate-0, reflect-x, reflect-y} = (rotate-0)
    ├───Plane 1
    │   ├───Object ID: 34
    │   ├───CRTCs: {0}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   └───BGR565 (0x36314742)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Cursor
    │       ├───"FB_ID" (atomic): object framebuffer = 59
    │       │   ├───Object ID: 59
    │       │   ├───Size: 64x64
    │       │   ├───Format: ARGB8888 (0x34325241)
    │       │   └───Modifier: DRM_FORMAT_MOD_LINEAR (0x0)
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 37
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 249
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 850
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 64
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 64
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 64
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 64
    │       ├───"IN_FORMATS" (immutable): blob = 35
    │       │   └───DRM_FORMAT_MOD_LINEAR (0x0)
    │       │       ├───XRGB8888 (0x34325258)
    │       │       ├───ARGB8888 (0x34325241)
    │       │       ├───XBGR8888 (0x34324258)
    │       │       ├───ABGR8888 (0x34324241)
    │       │       ├───RGB888 (0x34324752)
    │       │       ├───BGR888 (0x34324742)
    │       │       ├───RGB565 (0x36314752)
    │       │       └───BGR565 (0x36314742)
    │       └───"rotation": bitmask {rotate-0, reflect-y} = (rotate-0)
    ├───Plane 2
    │   ├───Object ID: 38
    │   ├───CRTCs: {1}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   ├───BGR565 (0x36314742)
    │   │   ├───NV12 (0x3231564e)
    │   │   ├───NV16 (0x3631564e)
    │   │   └───NV24 (0x3432564e)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Primary
    │       ├───"FB_ID" (atomic): object framebuffer = 0
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 0
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"IN_FORMATS" (immutable): blob = 39
    │       │   ├───DRM_FORMAT_MOD_ARM_AFBC(SPARSE|BLOCK_SIZE_16x16) (0x800000000000041)
    │       │   │   ├───XRGB8888 (0x34325258)
    │       │   │   ├───ARGB8888 (0x34325241)
    │       │   │   ├───XBGR8888 (0x34324258)
    │       │   │   ├───ABGR8888 (0x34324241)
    │       │   │   ├───RGB888 (0x34324752)
    │       │   │   ├───BGR888 (0x34324742)
    │       │   │   ├───RGB565 (0x36314752)
    │       │   │   └───BGR565 (0x36314742)
    │       │   └───DRM_FORMAT_MOD_LINEAR (0x0)
    │       │       ├───XRGB8888 (0x34325258)
    │       │       ├───ARGB8888 (0x34325241)
    │       │       ├───XBGR8888 (0x34324258)
    │       │       ├───ABGR8888 (0x34324241)
    │       │       ├───RGB888 (0x34324752)
    │       │       ├───BGR888 (0x34324742)
    │       │       ├───RGB565 (0x36314752)
    │       │       ├───BGR565 (0x36314742)
    │       │       ├───NV12 (0x3231564e)
    │       │       ├───NV16 (0x3631564e)
    │       │       └───NV24 (0x3432564e)
    │       └───"rotation": bitmask {rotate-0, reflect-y} = (rotate-0)
    ├───Plane 3
    │   ├───Object ID: 41
    │   ├───CRTCs: {1}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   └───BGR565 (0x36314742)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Cursor
    │       ├───"FB_ID" (atomic): object framebuffer = 0
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 0
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
    │       └───"IN_FORMATS" (immutable): blob = 42
    │           └───DRM_FORMAT_MOD_LINEAR (0x0)
    │               ├───XRGB8888 (0x34325258)
    │               ├───ARGB8888 (0x34325241)
    │               ├───XBGR8888 (0x34324258)
    │               ├───ABGR8888 (0x34324241)
    │               ├───RGB888 (0x34324752)
    │               ├───BGR888 (0x34324742)
    │               ├───RGB565 (0x36314752)
    │               └───BGR565 (0x36314742)
    ├───Plane 4
    │   ├───Object ID: 44
    │   ├───CRTCs: {1}
    │   ├───Formats:
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───RGB888 (0x34324752)
    │   │   ├───BGR888 (0x34324742)
    │   │   ├───RGB565 (0x36314752)
    │   │   ├───BGR565 (0x36314742)
    │   │   ├───NV12 (0x3231564e)
    │   │   ├───NV16 (0x3631564e)
    │   │   └───NV24 (0x3432564e)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Overlay
    │       ├───"FB_ID" (atomic): object framebuffer = 0
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 0
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
    │       └───"IN_FORMATS" (immutable): blob = 45
    │           └───DRM_FORMAT_MOD_LINEAR (0x0)
    │               ├───XRGB8888 (0x34325258)
    │               ├───ARGB8888 (0x34325241)
    │               ├───XBGR8888 (0x34324258)
    │               ├───ABGR8888 (0x34324241)
    │               ├───RGB888 (0x34324752)
    │               ├───BGR888 (0x34324742)
    │               ├───RGB565 (0x36314752)
    │               ├───BGR565 (0x36314742)
    │               ├───NV12 (0x3231564e)
    │               ├───NV16 (0x3631564e)
    │               └───NV24 (0x3432564e)
    └───Plane 5
        ├───Object ID: 46
        ├───CRTCs: {1}
        ├───Formats:
        │   ├───XRGB8888 (0x34325258)
        │   ├───ARGB8888 (0x34325241)
        │   ├───XBGR8888 (0x34324258)
        │   ├───ABGR8888 (0x34324241)
        │   ├───RGB888 (0x34324752)
        │   ├───BGR888 (0x34324742)
        │   ├───RGB565 (0x36314752)
        │   └───BGR565 (0x36314742)
        └───Properties
            ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Overlay
            ├───"FB_ID" (atomic): object framebuffer = 0
            ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
            ├───"CRTC_ID" (atomic): object CRTC = 0
            ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
            ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
            ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
            ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
            ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
            ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
            ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
            ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
            └───"IN_FORMATS" (immutable): blob = 47
                └───DRM_FORMAT_MOD_LINEAR (0x0)
                    ├───XRGB8888 (0x34325258)
                    ├───ARGB8888 (0x34325241)
                    ├───XBGR8888 (0x34324258)
                    ├───ABGR8888 (0x34324241)
                    ├───RGB888 (0x34324752)
                    ├───BGR888 (0x34324742)
                    ├───RGB565 (0x36314752)
                    └───BGR565 (0x36314742)

@jbaum98
Copy link

jbaum98 commented Sep 16, 2020

I recompiled with debugging, and I can confirm it's getting only one output, now with gamma_size = 1714775605, which causes a segfault when i = 66253718.

@emersion
Copy link
Member

OK. Your driver reports a zero gamma size (ie. gamma not supported), which is the same case as the headless output.

Something in wlroots misbehaves with a zero gamma size.

@emersion emersion added the bug label Oct 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants