]> Gentwo Git Trees - linux/.git/commit
drm/vkms: Add writeback encoders as possible clones
authorRobert Mader <robert.mader@collabora.com>
Fri, 18 Jul 2025 12:14:42 +0000 (14:14 +0200)
committerLouis Chauvet <louis.chauvet@bootlin.com>
Thu, 31 Jul 2025 14:29:59 +0000 (16:29 +0200)
commit934452cbb16e1e3609ba52acb48c503b9aaf3154
treef8d1a41b143678ffb59b6754ff296ca1310e0c1b
parent55023abe6a2921a8916b623c24208e1971b88729
drm/vkms: Add writeback encoders as possible clones

Since commit 41b4b11da0215 ("drm: Add valid clones check") setting
the `possible_clones` values is a hard requirement for cloning.
`vkms` supports cloning for writeback connectors in order to capture
CRTC content, however that broke with said commit.

Writeback connectors are created on a per-CRTC basis, thus mark
every non-writeback connector that is compatible with a given CRTC
as possible clone - and vice-versa.

Using a default configuration, the corresponding `drm_info` output
changes from:

├───Encoders
│   ├───Encoder 0
│   │   ├───Object ID: 40
│   │   ├───Type: virtual
│   │   ├───CRTCS: {0}
│   │   └───Clones: {0}
│   └───Encoder 1
│       ├───Object ID: 41
│       ├───Type: virtual
│       ├───CRTCS: {0}
│       └───Clones: {1}

into:

├───Encoders
│   ├───Encoder 0
│   │   ├───Object ID: 44
│   │   ├───Type: virtual
│   │   ├───CRTCS: {0}
│   │   └───Clones: {0, 1}
│   └───Encoder 1
│       ├───Object ID: 50
│       ├───Type: virtual
│       ├───CRTCS: {0}
│       └───Clones: {0, 1}

Fixes: dbd9d80c1b2e ("drm/vkms: Add support for writeback")
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Link: https://lore.kernel.org/r/20250718121442.490634-1-robert.mader@collabora.com
[fixed Fixes line and changed to: to into: to avoid checkpatch warnings]
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
drivers/gpu/drm/vkms/vkms_output.c
drivers/gpu/drm/vkms/vkms_writeback.c