All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH v2 3/6] gpu/drm: ingenic: Use the plane's src_[x,y] to configure DMA length
Date: Tue, 10 Dec 2019 15:41:39 +0100	[thread overview]
Message-ID: <20191210144142.33143-3-paul@crapouillou.net> (raw)
In-Reply-To: <20191210144142.33143-1-paul@crapouillou.net>

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>
---
 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 f156f245fdec..8713f09df448 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -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;
-- 
2.24.0


WARNING: multiple messages have this Message-ID (diff)
From: Paul Cercueil <paul@crapouillou.net>
To: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: Paul Cercueil <paul@crapouillou.net>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH v2 3/6] gpu/drm: ingenic: Use the plane's src_[x, y] to configure DMA length
Date: Tue, 10 Dec 2019 15:41:39 +0100	[thread overview]
Message-ID: <20191210144142.33143-3-paul@crapouillou.net> (raw)
In-Reply-To: <20191210144142.33143-1-paul@crapouillou.net>

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>
---
 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 f156f245fdec..8713f09df448 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -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;
-- 
2.24.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-12-10 14:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 14:41 [PATCH v2 1/6] dt-bindings: display/ingenic: Add compatible string for JZ4770 Paul Cercueil
2019-12-10 14:41 ` Paul Cercueil
2019-12-10 14:41 ` [PATCH v2 2/6] gpu/drm: ingenic: Avoid null pointer deference in plane atomic update Paul Cercueil
2019-12-10 14:41   ` Paul Cercueil
2019-12-10 14:41 ` Paul Cercueil [this message]
2019-12-10 14:41   ` [PATCH v2 3/6] gpu/drm: ingenic: Use the plane's src_[x, y] to configure DMA length Paul Cercueil
2019-12-10 14:41 ` [PATCH v2 4/6] gpu/drm: ingenic: Set max FB height to 4095 Paul Cercueil
2019-12-10 14:41   ` Paul Cercueil
2019-12-10 14:41 ` [PATCH v2 5/6] gpu/drm: ingenic: Check for display size in CRTC atomic check Paul Cercueil
2019-12-10 14:41   ` Paul Cercueil
2019-12-10 14:41 ` [PATCH v2 6/6] gpu/drm: ingenic: Add support for the JZ4770 Paul Cercueil
2019-12-10 14:41   ` Paul Cercueil
2019-12-14 10:54 ` [PATCH v2 1/6] dt-bindings: display/ingenic: Add compatible string for JZ4770 Sam Ravnborg
2019-12-14 10:54   ` Sam Ravnborg
2019-12-16 13:15   ` Ville Syrjälä
2019-12-16 13:15     ` Ville Syrjälä
2019-12-16 13:39     ` Paul Cercueil
2019-12-16 13:39       ` Paul Cercueil
2019-12-16 14:43       ` Ville Syrjälä
2019-12-16 14:43         ` Ville Syrjälä

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=20191210144142.33143-3-paul@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.