LKML Archive on 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: "H . Nikolaus Schaller" <hns@goldelico.com>,
	Paul Boddie <paul@boddie.org.uk>, Sam Ravnborg <sam@ravnborg.org>,
	list@opendingux.net, linux-mips@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH v2 4/6] drm/ingenic: Set DMA descriptor chain register when starting CRTC
Date: Wed, 11 Aug 2021 19:23:07 +0200	[thread overview]
Message-ID: <20210811172309.314287-5-paul@crapouillou.net> (raw)
In-Reply-To: <20210811172309.314287-1-paul@crapouillou.net>

Setting the DMA descriptor chain register in the probe function has been
fine until now, because we only ever had one descriptor per foreground.

As the driver will soon have real descriptor chains, and the DMA
descriptor chain register updates itself to point to the current
descriptor being processed, this register needs to be reset after a full
modeset to point to the first descriptor of the chain.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
index 5dbeca0f8f37..cbc76cede99e 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
@@ -186,6 +186,10 @@ static void ingenic_drm_crtc_atomic_enable(struct drm_crtc *crtc,
 
 	regmap_write(priv->map, JZ_REG_LCD_STATE, 0);
 
+	/* Set address of our DMA descriptor chain */
+	regmap_write(priv->map, JZ_REG_LCD_DA0, dma_hwdesc_addr(priv, 0));
+	regmap_write(priv->map, JZ_REG_LCD_DA1, dma_hwdesc_addr(priv, 1));
+
 	regmap_update_bits(priv->map, JZ_REG_LCD_CTRL,
 			   JZ_LCD_CTRL_ENABLE | JZ_LCD_CTRL_DISABLE,
 			   JZ_LCD_CTRL_ENABLE);
-- 
2.30.2


  parent reply	other threads:[~2021-08-11 17:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 17:23 [PATCH v2 0/6] drm/ingenic: Various improvements v2 Paul Cercueil
2021-08-11 17:23 ` [PATCH v2 1/6] drm/ingenic: Simplify code by using hwdescs array Paul Cercueil
2021-08-11 17:23 ` [PATCH v2 2/6] drm/ingenic: Add support for private objects Paul Cercueil
2021-08-11 17:23 ` [PATCH v2 3/6] drm/ingenic: Move IPU scale settings to private state Paul Cercueil
2021-08-11 17:23 ` Paul Cercueil [this message]
2021-08-11 17:23 ` [PATCH v2 5/6] drm/ingenic: Upload palette before frame Paul Cercueil
2021-08-11 17:23 ` [PATCH v2 6/6] drm/ingenic: Attach bridge chain to encoders Paul Cercueil

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=20210811172309.314287-5-paul@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hns@goldelico.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=list@opendingux.net \
    --cc=paul@boddie.org.uk \
    --cc=sam@ravnborg.org \
    --subject='Re: [PATCH v2 4/6] drm/ingenic: Set DMA descriptor chain register when starting CRTC' \
    /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

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