[PATCH] gpu/drm/drm_framebuffer.c: Use Macro instead of actual number.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use Macro DRM_FORMAT_MAX_PLANES instead of 4, to improve modifiability.

Signed-off-by: Peng Hao <penghao@xxxxxxxxxxx>
---
 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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux