Messages in this thread Patch in this message | | | From | Sandy Huang <> | Subject | [PATCH 35/36] drm/udl: use bpp instead of cpp for drm_format_info | Date | Mon, 23 Sep 2019 20:53:49 +0800 |
| |
cpp[BytePerPlane] can't describe the 10bit data format correctly, So we use bpp[BitPerPlane] to instead cpp.
Signed-off-by: Sandy Huang <hjc@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
| |