Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508960

[RFC PATCH v2 2/9] drm: mali-dp: Clear CVAL when leaving config mode

From Brian Starkey <brian.starkey@arm.com>
Newsgroups linux.kernel
Subject [RFC PATCH v2 2/9] drm: mali-dp: Clear CVAL when leaving config mode
Date 2016-10-26 11:00 +0200
Message-ID <swsdY-1ge-41@gated-at.bofh.it> (permalink)
References <swsdY-1ge-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


It's possible for CVAL to get set whilst we are in config mode. If this
happens, afer we leave config mode the HW will latch whatever
configuration is in the registers at the next vsync. Most likely this
will be a partial configuration, as we'll be racing against the ongoing
atomic_commit.

To avoid this, clear CVAL before leaving config mode.

Signed-off-by: Brian Starkey <brian.starkey@arm.com>
---
 drivers/gpu/drm/arm/malidp_hw.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c
index 7f4a0bd..65e667b 100644
--- a/drivers/gpu/drm/arm/malidp_hw.c
+++ b/drivers/gpu/drm/arm/malidp_hw.c
@@ -125,6 +125,7 @@ static void malidp500_leave_config_mode(struct malidp_hw_device *hwdev)
 {
 	u32 status, count = 100;
 
+	malidp_hw_clearbits(hwdev, MALIDP_CFG_VALID, MALIDP500_CONFIG_VALID);
 	malidp_hw_clearbits(hwdev, MALIDP500_DC_CONFIG_REQ, MALIDP500_DC_CONTROL);
 	while (count) {
 		status = malidp_hw_read(hwdev, hwdev->map.dc_base + MALIDP_REG_STATUS);
@@ -271,6 +272,7 @@ static void malidp550_leave_config_mode(struct malidp_hw_device *hwdev)
 {
 	u32 status, count = 100;
 
+	malidp_hw_clearbits(hwdev, MALIDP_CFG_VALID, MALIDP550_CONFIG_VALID);
 	malidp_hw_clearbits(hwdev, MALIDP550_DC_CONFIG_REQ, MALIDP550_DC_CONTROL);
 	while (count) {
 		status = malidp_hw_read(hwdev, hwdev->map.dc_base + MALIDP_REG_STATUS);
-- 
1.7.9.5

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH v2 0/9] Introduce writeback connectors Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:00 +0200
  [RFC PATCH v2 4/9] drm: mali-dp: Add RGB writeback formats for DP550/DP650 Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:00 +0200
  [RFC PATCH v2 3/9] drm: mali-dp: Rename malidp_input_format Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:00 +0200
  [RFC PATCH v2 2/9] drm: mali-dp: Clear CVAL when leaving config mode Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:00 +0200
  [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:10 +0200
    Re: [RFC PATCH v2 9/9] drm: mali-dp: Add writeback out-fence support Gustavo Padovan <gustavo@padovan.org> - 2016-10-26 23:50 +0200
  [RFC PATCH v2 5/9] drm: mali-dp: Add support for writeback on DP550/DP650 Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:10 +0200
  [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence operations Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:10 +0200
    Re: [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence  operations Daniel Vetter <daniel@ffwll.ch> - 2016-10-26 13:10 +0200
    Re: [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence  operations Gustavo Padovan <gustavo@padovan.org> - 2016-10-26 23:40 +0200
    Re: [RFC PATCH v2 7/9] drm: atomic: factor out common out-fence  operations Gustavo Padovan <gustavo@padovan.org> - 2016-10-26 23:50 +0200
  [RFC PATCH v2 6/9] drm: mali-dp: Add writeback connector Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:10 +0200
  [RFC PATCH v2 8/9] drm: writeback: Add out-fences for writeback connectors Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:10 +0200
    Re: [RFC PATCH v2 8/9] drm: writeback: Add out-fences for writeback  connectors Daniel Vetter <daniel@ffwll.ch> - 2016-10-26 13:10 +0200
    Re: [RFC PATCH v2 8/9] drm: writeback: Add out-fences for writeback  connectors Brian Starkey <brian.starkey@arm.com> - 2016-10-26 14:50 +0200
    Re: [RFC PATCH v2 8/9] drm: writeback: Add out-fences for writeback  connectors Gustavo Padovan <gustavo@padovan.org> - 2016-10-26 23:50 +0200
  [RFC PATCH v2 1/9] drm: Add writeback connector type Brian Starkey <brian.starkey@arm.com> - 2016-10-26 11:10 +0200
    Re: [RFC PATCH v2 1/9] drm: Add writeback connector type Daniel Vetter <daniel@ffwll.ch> - 2016-10-26 13:10 +0200
      Re: [RFC PATCH v2 1/9] drm: Add writeback connector type Brian Starkey <brian.starkey@arm.com> - 2016-10-26 14:50 +0200
        Re: [RFC PATCH v2 1/9] drm: Add writeback connector type Daniel Vetter <daniel@ffwll.ch> - 2016-10-26 15:10 +0200

csiph-web