Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit df2d385

Browse files
JoseExpositomelissawen
authored andcommitted
drm/vkms: add support for multiple overlay planes
Create 8 overlay planes instead of 1 when the "enable_overlay" module parameter is set. The following igt-gpu-tools tests were executed without finding regressions. Notice than the numbers are identical: | master branch | this patch | | SUCCESS | SKIP | FAIL | SUCCESS | SKIP | FAIL | kms_atomic | 10 | 02 | 00 | 10 | 02 | 00 | kms_plane_cursor | 09 | 45 | 00 | 09 | 45 | 00 | kms_plane_multiple | 01 | 23 | 00 | 01 | 23 | 00 | kms_writeback | 04 | 00 | 00 | 04 | 00 | 00 | Signed-off-by: José Expósito <[email protected]> Reviewed-by: Melissa Wen <[email protected]> Signed-off-by: Melissa Wen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 5edaa2b commit df2d385

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

drivers/gpu/drm/vkms/vkms_drv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#define XRES_MAX 8192
2121
#define YRES_MAX 8192
2222

23+
#define NUM_OVERLAY_PLANES 8
24+
2325
struct vkms_writeback_job {
2426
struct dma_buf_map map[DRM_FORMAT_MAX_PLANES];
2527
struct dma_buf_map data[DRM_FORMAT_MAX_PLANES];

drivers/gpu/drm/vkms/vkms_output.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,18 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index)
5757
struct vkms_plane *primary, *cursor = NULL;
5858
int ret;
5959
int writeback;
60+
unsigned int n;
6061

6162
primary = vkms_plane_init(vkmsdev, DRM_PLANE_TYPE_PRIMARY, index);
6263
if (IS_ERR(primary))
6364
return PTR_ERR(primary);
6465

6566
if (vkmsdev->config->overlay) {
66-
ret = vkms_add_overlay_plane(vkmsdev, index, crtc);
67-
if (ret)
68-
return ret;
67+
for (n = 0; n < NUM_OVERLAY_PLANES; n++) {
68+
ret = vkms_add_overlay_plane(vkmsdev, index, crtc);
69+
if (ret)
70+
return ret;
71+
}
6972
}
7073

7174
if (vkmsdev->config->cursor) {

0 commit comments

Comments
 (0)