devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: od@zcrc.me, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH 3/6] gpu/drm: ingenic: Use the plane's src_[x,y] to configure DMA length
Date: Tue, 19 Nov 2019 15:17:33 +0100	[thread overview]
Message-ID: <20191119141736.74607-3-paul@crapouillou.net> (raw)
In-Reply-To: <20191119141736.74607-1-paul@crapouillou.net>

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(-)

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);
-- 
2.24.0


  parent reply	other threads:[~2019-11-19 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 14:17 [PATCH 1/6] dt-bindings: display/ingenic: Add compatible string for JZ4770 Paul Cercueil
2019-11-19 14:17 ` [PATCH 2/6] gpu/drm: ingenic: Avoid null pointer deference in plane atomic update Paul Cercueil
2019-11-19 14:17 ` Paul Cercueil [this message]
2019-11-19 14:17 ` [PATCH 4/6] gpu/drm: ingenic: Set max FB height to 4095 Paul Cercueil
2019-11-19 14:17 ` [PATCH 5/6] gpu/drm: ingenic: Check for display size in CRTC atomic check Paul Cercueil
2019-11-19 14:17 ` [PATCH 6/6] gpu/drm: ingenic: Add support for the JZ4770 Paul Cercueil
2019-12-03 22:12 ` [PATCH 1/6] dt-bindings: display/ingenic: Add compatible string for JZ4770 Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191119141736.74607-3-paul@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=od@zcrc.me \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).