Skip to content

Commit

Permalink
gpu/drm: ingenic: Use the plane's src_[x,y] to configure DMA length
Browse files Browse the repository at this point in the history
[ Upstream commit 52e4607 ]

Instead of obtaining the width/height of the framebuffer from the CRTC
state, obtain it from the current plane state.

v2: No change

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20191210144142.33143-3-paul@crapouillou.net
# *** extracted tags ***
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
pcercuei authored and gregkh committed Sep 3, 2020
1 parent 302b9e1 commit 8dc47d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/ingenic/ingenic-drm.c
Expand Up @@ -375,8 +375,8 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,

if (state && state->fb) {
addr = drm_fb_cma_get_gem_addr(state->fb, state, 0);
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 = state->fb->format->cpp[plane->index];

priv->dma_hwdesc->addr = addr;
Expand Down

0 comments on commit 8dc47d8

Please sign in to comment.