All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+kernel@arm.linux.org.uk>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 14/20] drm/armada: move write to dma_ctrl0 to armada_drm_crtc_plane_disable()
Date: Tue, 29 Sep 2015 19:10:41 +0100	[thread overview]
Message-ID: <E1ZgzMP-0003ls-3a@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20150929180843.GP21513@n2100.arm.linux.org.uk>

Move the write to clear the DMA enable bit, and augment it with clearing
the graphics enable bit for the primary plane.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/gpu/drm/armada/armada_crtc.c    | 12 ++++++++++--
 drivers/gpu/drm/armada/armada_overlay.c |  1 -
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c
index 007fc5d3eb54..89decc5bdcd4 100644
--- a/drivers/gpu/drm/armada/armada_crtc.c
+++ b/drivers/gpu/drm/armada/armada_crtc.c
@@ -703,7 +703,7 @@ static int armada_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
 void armada_drm_crtc_plane_disable(struct armada_crtc *dcrtc,
 	struct drm_plane *plane)
 {
-	u32 sram_para1;
+	u32 sram_para1, dma_ctrl0_mask;
 
 	/*
 	 * Drop our reference on any framebuffer attached to this plane.
@@ -719,9 +719,17 @@ void armada_drm_crtc_plane_disable(struct armada_crtc *dcrtc,
 	sram_para1 = CFG_PDWN16x66 | CFG_PDWN32x66;
 
 	/* Power down most RAMs and FIFOs if this is the primary plane */
-	if (plane->type == DRM_PLANE_TYPE_PRIMARY)
+	if (plane->type == DRM_PLANE_TYPE_PRIMARY) {
 		sram_para1 |= CFG_PDWN256x32 | CFG_PDWN256x24 | CFG_PDWN256x8 |
 			      CFG_PDWN32x32 | CFG_PDWN64x66;
+		dma_ctrl0_mask = CFG_GRA_ENA;
+	} else {
+		dma_ctrl0_mask = CFG_DMA_ENA;
+	}
+
+	spin_lock_irq(&dcrtc->irq_lock);
+	armada_updatel(0, dma_ctrl0_mask, dcrtc->base + LCD_SPU_DMA_CTRL0);
+	spin_unlock_irq(&dcrtc->irq_lock);
 
 	armada_updatel(sram_para1, 0, dcrtc->base + LCD_SPU_SRAM_PARA1);
 }
diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c
index 1032f9b3d5f1..9686d79335a0 100644
--- a/drivers/gpu/drm/armada/armada_overlay.c
+++ b/drivers/gpu/drm/armada/armada_overlay.c
@@ -275,7 +275,6 @@ static int armada_ovl_plane_disable(struct drm_plane *plane)
 
 	spin_lock_irq(&dcrtc->irq_lock);
 	armada_drm_vbl_event_remove(dcrtc, &dplane->vbl.update);
-	armada_updatel(0, CFG_DMA_ENA, dcrtc->base + LCD_SPU_DMA_CTRL0);
 	dplane->ctrl0 = 0;
 	spin_unlock_irq(&dcrtc->irq_lock);
 
-- 
2.1.0

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

  parent reply	other threads:[~2015-09-29 18:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 18:08 [PATCH 00/20] Armada DRM updates for 4.4 Russell King - ARM Linux
2015-09-29 18:09 ` [PATCH 01/20] drm/armada: remove non-component support Russell King
2015-09-29 18:09 ` [PATCH 02/20] drm/armada: move vbl code into armada_crtc Russell King
2015-09-29 18:09 ` [PATCH 03/20] drm/armada: use drm_plane_force_disable() to disable the overlay plane Russell King
2015-09-29 18:09 ` [PATCH 04/20] drm/armada: disable CRTC clock during DPMS Russell King
2015-09-29 18:09 ` [PATCH 05/20] drm/armada: redo locking and atomics for armada_drm_crtc_complete_frame_work() Russell King
2015-09-29 18:09 ` [PATCH 06/20] drm/armada: rename overlay identifiers Russell King
2015-09-29 18:10 ` [PATCH 07/20] drm/armada: factor out retirement of old fb Russell King
2015-09-29 18:10 ` [PATCH 08/20] drm/armada: use xchg() to atomically update dplane->old_fb Russell King
2015-09-30 10:49   ` Emil Velikov
2015-10-01 13:34     ` Russell King - ARM Linux
2015-09-29 18:10 ` [PATCH 09/20] drm/armada: update armada overlay to use drm_universal_plane_init() Russell King
2015-09-29 18:10 ` [PATCH 10/20] drm/armada: introduce generic armada_plane struct Russell King
2015-09-29 18:10 ` [PATCH 11/20] drm/armada: add primary plane creation Russell King
2015-09-29 18:10 ` [PATCH 12/20] drm/armada: allocate primary plane ourselves Russell King
2015-09-29 18:10 ` [PATCH 13/20] drm/armada: provide a common helper to disable a plane Russell King
2015-09-29 18:10 ` Russell King [this message]
2015-09-29 18:10 ` [PATCH 15/20] drm/armada: move the update of dplane->ctrl0 out of spinlock Russell King
2015-09-29 18:10 ` [PATCH 16/20] drm/armada: move the locking for armada_drm_vbl_event_remove() Russell King
2015-09-29 18:10 ` [PATCH 17/20] drm/armada: move frame wait into armada_frame Russell King
2015-09-29 18:11 ` [PATCH 18/20] drm/armada: move CRTC flip work to primary plane work Russell King
2015-09-29 18:11 ` [PATCH 19/20] drm/armada: convert overlay plane vbl worker to a armada plane worker Russell King
2015-09-29 18:11 ` [PATCH 20/20] drm/armada: move frame wait wakeup into plane work Russell King
2015-10-09 13:24 ` [PATCH 00/20] Armada DRM updates for 4.4 Russell King - ARM Linux

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=E1ZgzMP-0003ls-3a@rmk-PC.arm.linux.org.uk \
    --to=rmk+kernel@arm.linux.org.uk \
    --cc=dri-devel@lists.freedesktop.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.