[PATCH] gpu/drm/drm_framebuffer.c: Use Macro instead of actual number.
Peng Hao
penghao at dingdao.com
Thu Nov 2 02:29:46 UTC 2023
Use Macro DRM_FORMAT_MAX_PLANES instead of 4, to improve modifiability.
Signed-off-by: Peng Hao <penghao at dingdao.com>
---
drivers/gpu/drm/drm_framebuffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 2dd97473ca10..bf283dae9090 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -254,7 +254,7 @@ static int framebuffer_check(struct drm_device *dev,
}
}
- for (i = info->num_planes; i < 4; i++) {
+ for (i = info->num_planes; i < DRM_FORMAT_MAX_PLANES; i++) {
if (r->modifier[i]) {
drm_dbg_kms(dev, "non-zero modifier for unused plane %d\n", i);
return -EINVAL;
--
2.37.1
More information about the dri-devel
mailing list