All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+kernel@armlinux.org.uk>
To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH 10/18] drm/armada: add and use definitions for RDREG4F
Date: Thu, 13 Jun 2019 16:02:33 +0100	[thread overview]
Message-ID: <E1hbRFJ-00007p-OS@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20190613150114.xqkyb7j7w4ve4yvr@shell.armlinux.org.uk>

Add and use bit definitions for RDREG4F on Dove Armada 510.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/gpu/drm/armada/armada_510.c |  9 +++++++--
 drivers/gpu/drm/armada/armada_hw.h  | 10 ++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_510.c b/drivers/gpu/drm/armada/armada_510.c
index 0e91d27921bd..370c422f64e3 100644
--- a/drivers/gpu/drm/armada/armada_510.c
+++ b/drivers/gpu/drm/armada/armada_510.c
@@ -24,8 +24,13 @@ static int armada510_crtc_init(struct armada_crtc *dcrtc, struct device *dev)
 
 	dcrtc->extclk[0] = clk;
 
-	/* Lower the watermark so to eliminate jitter at higher bandwidths */
-	armada_updatel(0x20, (1 << 11) | 0xff, dcrtc->base + LCD_CFG_RDREG4F);
+	/*
+	 * Lower the watermark so to eliminate jitter at higher bandwidths.
+	 * Disable SRAM read wait state to avoid system hang with external
+	 * clock.
+	 */
+	armada_updatel(CFG_DMA_WM(0x20), CFG_SRAM_WAIT | CFG_DMA_WM_MASK,
+		       dcrtc->base + LCD_CFG_RDREG4F);
 
 	/* Initialise SPU register */
 	writel_relaxed(ADV_HWC32ENABLE | ADV_HWC32ARGB | ADV_HWC32BLEND,
diff --git a/drivers/gpu/drm/armada/armada_hw.h b/drivers/gpu/drm/armada/armada_hw.h
index babfca71c4db..5b1af0cc9f50 100644
--- a/drivers/gpu/drm/armada/armada_hw.h
+++ b/drivers/gpu/drm/armada/armada_hw.h
@@ -88,6 +88,16 @@ enum {
 	ADV_VSYNC_H_OFF	= 0xfff << 0,
 };
 
+/* LCD_CFG_RDREG4F - Armada 510 only */
+enum {
+	CFG_SRAM_WAIT	= BIT(11),
+	CFG_SMPN_FASTTX	= BIT(10),
+	CFG_DMA_ARB	= BIT(9),
+	CFG_DMA_WM_EN	= BIT(8),
+	CFG_DMA_WM_MASK	= 0xff,
+#define CFG_DMA_WM(x)	((x) & CFG_DMA_WM_MASK)
+};
+
 enum {
 	CFG_565		= 0,
 	CFG_1555	= 1,
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Russell King <rmk+kernel@armlinux.org.uk>
To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Subject: [PATCH 10/18] drm/armada: add and use definitions for RDREG4F
Date: Thu, 13 Jun 2019 16:02:33 +0100	[thread overview]
Message-ID: <E1hbRFJ-00007p-OS@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20190613150114.xqkyb7j7w4ve4yvr@shell.armlinux.org.uk>

Add and use bit definitions for RDREG4F on Dove Armada 510.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/gpu/drm/armada/armada_510.c |  9 +++++++--
 drivers/gpu/drm/armada/armada_hw.h  | 10 ++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_510.c b/drivers/gpu/drm/armada/armada_510.c
index 0e91d27921bd..370c422f64e3 100644
--- a/drivers/gpu/drm/armada/armada_510.c
+++ b/drivers/gpu/drm/armada/armada_510.c
@@ -24,8 +24,13 @@ static int armada510_crtc_init(struct armada_crtc *dcrtc, struct device *dev)
 
 	dcrtc->extclk[0] = clk;
 
-	/* Lower the watermark so to eliminate jitter at higher bandwidths */
-	armada_updatel(0x20, (1 << 11) | 0xff, dcrtc->base + LCD_CFG_RDREG4F);
+	/*
+	 * Lower the watermark so to eliminate jitter at higher bandwidths.
+	 * Disable SRAM read wait state to avoid system hang with external
+	 * clock.
+	 */
+	armada_updatel(CFG_DMA_WM(0x20), CFG_SRAM_WAIT | CFG_DMA_WM_MASK,
+		       dcrtc->base + LCD_CFG_RDREG4F);
 
 	/* Initialise SPU register */
 	writel_relaxed(ADV_HWC32ENABLE | ADV_HWC32ARGB | ADV_HWC32BLEND,
diff --git a/drivers/gpu/drm/armada/armada_hw.h b/drivers/gpu/drm/armada/armada_hw.h
index babfca71c4db..5b1af0cc9f50 100644
--- a/drivers/gpu/drm/armada/armada_hw.h
+++ b/drivers/gpu/drm/armada/armada_hw.h
@@ -88,6 +88,16 @@ enum {
 	ADV_VSYNC_H_OFF	= 0xfff << 0,
 };
 
+/* LCD_CFG_RDREG4F - Armada 510 only */
+enum {
+	CFG_SRAM_WAIT	= BIT(11),
+	CFG_SMPN_FASTTX	= BIT(10),
+	CFG_DMA_ARB	= BIT(9),
+	CFG_DMA_WM_EN	= BIT(8),
+	CFG_DMA_WM_MASK	= 0xff,
+#define CFG_DMA_WM(x)	((x) & CFG_DMA_WM_MASK)
+};
+
 enum {
 	CFG_565		= 0,
 	CFG_1555	= 1,
-- 
2.7.4

  parent reply	other threads:[~2019-06-13 15:05 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13 15:01 [PATCH 00/18] Armada DRM updates Russell King - ARM Linux admin
2019-06-13 15:01 ` Russell King - ARM Linux admin
2019-06-13 15:01 ` [PATCH 01/18] drm/armada: fix crtc interlace Russell King
2019-06-13 15:01   ` Russell King
2019-06-13 15:01 ` [PATCH 02/18] drm/armada: use __drm_atomic_helper_plane_reset in overlay reset Russell King
2019-06-13 15:01   ` Russell King
2019-06-13 15:01 ` [PATCH 03/18] drm/armada: add plane size/location accessors Russell King
2019-06-13 15:01   ` Russell King
2019-06-13 15:02 ` [PATCH 04/18] drm/armada: fix plane location and size for interlace Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` [PATCH 05/18] drm/armada: add missing interlaced support for overlay frame Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` [PATCH 06/18] drm/armada: move plane address and pitch calculation to atomic_check Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` [PATCH 07/18] drm/armada: add support for setting gamma Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` [PATCH 08/18] drm/armada: add comments about HWC32 cursor colour format Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` [PATCH 09/18] drm/armada: add drm_mode_set_crtcinfo() mode fixup Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` Russell King [this message]
2019-06-13 15:02   ` [PATCH 10/18] drm/armada: add and use definitions for RDREG4F Russell King
2019-06-13 15:02 ` [PATCH 11/18] drm/armada: add drm_atomic_helper_shutdown() call in tear-down Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` [PATCH 12/18] drm/armada: add CRTC mode validation Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` [PATCH 13/18] drm/armada: improve Dove clock selection Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` [PATCH 14/18] drm/armada: use mode_valid to validate the adjusted mode Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:02 ` [PATCH 15/18] drm/armada: redo CRTC debugfs files Russell King
2019-06-13 15:02   ` Russell King
2019-06-13 15:03 ` [PATCH 16/18] drm/armada: replace the simple-framebuffer Russell King
2019-06-13 15:03   ` Russell King
2019-06-13 15:03 ` [PATCH 17/18] drm/armada: use for_each_endpoint_of_node() to walk crtc endpoints Russell King
2019-06-13 15:03   ` Russell King
2019-06-13 15:03 ` [PATCH 18/18] drm/armada: no need to check parent of remote Russell King
2019-06-13 15:03   ` Russell King

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=E1hbRFJ-00007p-OS@rmk-PC.armlinux.org.uk \
    --to=rmk+kernel@armlinux.org.uk \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.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.