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

Signed-off-by: Sandy Huang <h...@rock-chips.com>
---
 drivers/gpu/drm/tve200/tve200_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tve200/tve200_display.c 
b/drivers/gpu/drm/tve200/tve200_display.c
index d733bbc..915f3b1 100644
--- a/drivers/gpu/drm/tve200/tve200_display.c
+++ b/drivers/gpu/drm/tve200/tve200_display.c
@@ -101,7 +101,7 @@ static int tve200_display_check(struct 
drm_simple_display_pipe *pipe,
                 * There's no pitch register, the mode's hdisplay
                 * controls this.
                 */
-               if (fb->pitches[0] != mode->hdisplay * fb->format->cpp[0]) {
+               if (fb->pitches[0] != mode->hdisplay * fb->format->bpp[0] / 8) {
                        DRM_DEBUG_KMS("can't handle pitches\n");
                        return -EINVAL;
                }
-- 
2.7.4



_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to