Message ID | 20191119141736.74607-3-paul@crapouillou.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/6] dt-bindings: display/ingenic: Add compatible string for JZ4770 | expand |
diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c index 6dc4b06e7e68..7a172271bd63 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c @@ -374,8 +374,8 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane, struct drm_framebuffer *fb = state->fb; if (fb) { - width = state->crtc->state->adjusted_mode.hdisplay; - height = state->crtc->state->adjusted_mode.vdisplay; + width = state->src_w >> 16; + height = state->src_h >> 16; cpp = fb->format->cpp[plane->index]; priv->dma_hwdesc->addr = drm_fb_cma_get_gem_addr(fb, state, 0);
Instead of obtaining the width/height of the framebuffer from the CRTC state, obtain it from the current plane state. Signed-off-by: Paul Cercueil <paul@crapouillou.net> --- drivers/gpu/drm/ingenic/ingenic-drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)