]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
gpu/drm: ingenic: Use the plane's src_[x,y] to configure DMA length
authorPaul Cercueil <paul@crapouillou.net>
Tue, 10 Dec 2019 14:41:39 +0000 (15:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:26:51 +0000 (11:26 +0200)
[ Upstream commit 52e4607dace1eeeb2e012fca291dc4e6cb449bff ]

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>
drivers/gpu/drm/ingenic/ingenic-drm.c

index 376fca6ca9f47ec4a5b2fcf8308ca4504e68053e..e746b3a6f7cbcf845c98853adbf0492547b8b61b 100644 (file)
@@ -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;