aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tilcdc/tilcdc_plane.c
diff options
context:
space:
mode:
authorMark Brown <[email protected]>2017-04-06 11:50:04 +0100
committerMark Brown <[email protected]>2017-04-06 11:50:04 +0100
commit3a37471551cd3b287ce7f02ed25bcf8ec37a191d (patch)
treef7bacf98400f55bed2737c9f7cf3b68f9a070c2b /drivers/gpu/drm/tilcdc/tilcdc_plane.c
parente0c4211854bfebd5507761a2bfddaa9e37074230 (diff)
parentfc99d23f6d3ec6b17772915114018444393e0ad1 (diff)
Merge branch 'fix/rcar' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar
Diffstat (limited to 'drivers/gpu/drm/tilcdc/tilcdc_plane.c')
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_plane.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_plane.c b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
index 74c65fa859b2..ba0d66c0d8ac 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_plane.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
@@ -39,7 +39,7 @@ static int tilcdc_plane_atomic_check(struct drm_plane *plane,
{
struct drm_crtc_state *crtc_state;
struct drm_plane_state *old_state = plane->state;
- unsigned int depth, bpp;
+ unsigned int pitch;
if (!state->crtc)
return 0;
@@ -68,15 +68,16 @@ static int tilcdc_plane_atomic_check(struct drm_plane *plane,
return -EINVAL;
}
- drm_fb_get_bpp_depth(state->fb->pixel_format, &depth, &bpp);
- if (state->fb->pitches[0] != crtc_state->mode.hdisplay * bpp / 8) {
+ pitch = crtc_state->mode.hdisplay *
+ state->fb->format->cpp[0];
+ if (state->fb->pitches[0] != pitch) {
dev_err(plane->dev->dev,
"Invalid pitch: fb and crtc widths must be the same");
return -EINVAL;
}
if (state->fb && old_state->fb &&
- state->fb->pixel_format != old_state->fb->pixel_format) {
+ state->fb->format != old_state->fb->format) {
dev_dbg(plane->dev->dev,
"%s(): pixel format change requires mode_change\n",
__func__);