@@ -705,7 +705,7 @@ static void tegra_plane_atomic_update(struct drm_plane *plane,
window.dst.y = plane->state->dst.y1;
window.dst.w = drm_rect_width(&plane->state->dst);
window.dst.h = drm_rect_height(&plane->state->dst);
- window.bits_per_pixel = fb->format->cpp[0] * 8;
+ window.bits_per_pixel = fb->format->bpp[0];
window.bottom_up = tegra_fb_is_bottom_up(fb) || state->bottom_up;
/* copy from state */
@@ -973,7 +973,7 @@ static int tegra_debugfs_framebuffers(struct seq_file *s, void *data)
seq_printf(s, "%3d: user size: %d x %d, depth %d, %d bpp, refcount %d\n",
fb->base.id, fb->width, fb->height,
fb->format->depth,
- fb->format->cpp[0] * 8,
+ fb->format->bpp[0],
drm_framebuffer_read_refcount(fb));
}
@@ -148,7 +148,7 @@ struct drm_framebuffer *tegra_fb_create(struct drm_device *drm,
goto unreference;
}
- bpp = info->cpp[i];
+ bpp = info->bpp[i] / 8;
size = (height - 1) * cmd->pitches[i] +
width * bpp + cmd->offsets[i];
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/tegra/dc.c | 2 +- drivers/gpu/drm/tegra/drm.c | 2 +- drivers/gpu/drm/tegra/fb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)