[PATCH 35/36] drm/udl: use bpp instead of cpp for drm_format_info

Sandy Huang hjc at rock-chips.com
Mon Sep 23 12:53:49 UTC 2019


cpp[BytePerPlane] can't describe the 10bit data format correctly,
So we use bpp[BitPerPlane] to instead cpp.

Signed-off-by: Sandy Huang <hjc at rock-chips.com>
---
 drivers/gpu/drm/udl/udl_fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index ef3504d..33a42bd 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -88,8 +88,8 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y,
 	int aligned_x;
 	int log_bpp;
 
-	BUG_ON(!is_power_of_2(fb->base.format->cpp[0]));
-	log_bpp = __ffs(fb->base.format->cpp[0]);
+	BUG_ON(!is_power_of_2(fb->base.format->bpp[0] / 8));
+	log_bpp = __ffs(fb->base.format->bpp[0] / 8);
 
 	if (!fb->active_16)
 		return 0;
-- 
2.7.4





More information about the dri-devel mailing list