diff options
author | Igor Torrente <igormtorrente@gmail.com> | 2022-09-05 16:08:03 -0300 |
---|---|---|
committer | Melissa Wen <melissa.srw@gmail.com> | 2022-09-05 20:12:14 -0100 |
commit | 2a37630d0ddb8a0612b700635cf4827aeafe4142 (patch) | |
tree | f63126b51ba3c34a859d8034346b61e65c6951bc /drivers/gpu/drm/vkms | |
parent | 8fe444eb326869823f3788a4b4da5dca03339d10 (diff) | |
download | lwn-2a37630d0ddb8a0612b700635cf4827aeafe4142.tar.gz lwn-2a37630d0ddb8a0612b700635cf4827aeafe4142.zip |
drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES
The `map` vector at `vkms_composer` uses a hardcoded value to define its
size.
If someday the maximum number of planes increases, this hardcoded value
can be a problem.
This value is being replaced with the DRM_FORMAT_MAX_PLANES macro.
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Igor Torrente <igormtorrente@gmail.com>
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220905190811.25024-2-igormtorrente@gmail.com
Diffstat (limited to 'drivers/gpu/drm/vkms')
-rw-r--r-- | drivers/gpu/drm/vkms/vkms_drv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h index 1d60654b553b..ae6c5a3d356c 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.h +++ b/drivers/gpu/drm/vkms/vkms_drv.h @@ -31,7 +31,7 @@ struct vkms_writeback_job { struct vkms_composer { struct drm_framebuffer fb; struct drm_rect src, dst; - struct iosys_map map[4]; + struct iosys_map map[DRM_FORMAT_MAX_PLANES]; unsigned int offset; unsigned int pitch; unsigned int cpp; |