diff options
author | José Expósito <jose.exposito89@gmail.com> | 2022-01-07 19:28:08 +0100 |
---|---|---|
committer | Melissa Wen <melissa.srw@gmail.com> | 2022-01-09 16:14:35 -0100 |
commit | df2d385cb4132e945d5bc17d387d0fb6f5d4d66e (patch) | |
tree | 3fde08b9822b6c328e813eb8e47a39d8ade3c9ae /drivers | |
parent | 5edaa2b9748979b08fcdb2f65781aac39e6ae011 (diff) |
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 <jose.exposito89@gmail.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220107182809.141003-2-jose.exposito89@gmail.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/vkms/vkms_drv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/vkms/vkms_output.c | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h index d48c23d40ce5..9496fdc900b8 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.h +++ b/drivers/gpu/drm/vkms/vkms_drv.h @@ -20,6 +20,8 @@ #define XRES_MAX 8192 #define YRES_MAX 8192 +#define NUM_OVERLAY_PLANES 8 + struct vkms_writeback_job { struct dma_buf_map map[DRM_FORMAT_MAX_PLANES]; struct dma_buf_map data[DRM_FORMAT_MAX_PLANES]; diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c index 2e805b2d36ae..ba0e82ae549a 100644 --- a/drivers/gpu/drm/vkms/vkms_output.c +++ b/drivers/gpu/drm/vkms/vkms_output.c @@ -57,15 +57,18 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index) struct vkms_plane *primary, *cursor = NULL; int ret; int writeback; + unsigned int n; primary = vkms_plane_init(vkmsdev, DRM_PLANE_TYPE_PRIMARY, index); if (IS_ERR(primary)) return PTR_ERR(primary); if (vkmsdev->config->overlay) { - ret = vkms_add_overlay_plane(vkmsdev, index, crtc); - if (ret) - return ret; + for (n = 0; n < NUM_OVERLAY_PLANES; n++) { + ret = vkms_add_overlay_plane(vkmsdev, index, crtc); + if (ret) + return ret; + } } if (vkmsdev->config->cursor) { |