From: Sandy Huang Subject: [PATCH 27/36] drm/pl111: use bpp instead of cpp for drm_format_info Date: Mon, 23 Sep 2019 20:53:00 +0800 Message-ID: <1569243189-183445-2-git-send-email-hjc@rock-chips.com> References: <1569243189-183445-1-git-send-email-hjc@rock-chips.com> Return-path: In-Reply-To: <1569243189-183445-1-git-send-email-hjc@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org To: dri-devel@lists.freedesktop.org, Eric Anholt , David Airlie , Daniel Vetter Cc: hjc@rock-chips.com, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org cpp[BytePerPlane] can't describe the 10bit data format correctly, So we use bpp[BitPerPlane] to instead cpp. Signed-off-by: Sandy Huang --- drivers/gpu/drm/pl111/pl111_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c index 024771a4..9bc1664 100644 --- a/drivers/gpu/drm/pl111/pl111_display.c +++ b/drivers/gpu/drm/pl111/pl111_display.c @@ -103,7 +103,7 @@ static int pl111_display_check(struct drm_simple_display_pipe *pipe, /* There's no pitch register -- the mode's hdisplay * controls it. */ - if (fb->pitches[0] != mode->hdisplay * fb->format->cpp[0]) + if (fb->pitches[0] != mode->hdisplay * fb->format->bpp[0] / 8) return -EINVAL; /* We can't change the FB format in a flicker-free -- 2.7.4