Skip to contentSkip to conversation

drm/i915: fix panel unlock register mask

PATCH In review Jani Nikula 4 participants 9 messages Aug 21, 2014 – Aug 26, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: fix panel unlock register mask

Use the correct mask for the unlock bits. In theory this could have lead to incorrect asserts but this is unlikely in practise.

---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 0b327ebb2d9e..fe1d00dc9ef5 100644
@@ -1208,7 +1208,7 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
 
 	val = I915_READ(pp_reg);
 	if (!(val & PANEL_POWER_ON) ||
-	    ((val & PANEL_UNLOCK_REGS) == PANEL_UNLOCK_REGS))
+	    ((val & PANEL_UNLOCK_MASK) == PANEL_UNLOCK_REGS))
 		locked = false;
 
 	if (I915_READ(lvds_reg) & LVDS_PIPEB_SELECT)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 drm/i915: improve assert_panel_unlocked

Fix assert_panel_unlocked for vlv/chv, and improve it a bit for non-LVDS. Also don't pretend it works for DDI. There's still work to do to get this right for eDP on PCH platforms, but this is a start.

---

So I wanted to quickly fix assert_panel_unlocked, but for such a short piece of code it's too involved to _quickly_ get right across all platforms. I think this is a worthwhile improvement though.

---
 drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +20 -7
index fe1d00dc9ef5..d6b48496d7f4 100644
@@ -1193,17 +1193,33 @@ void assert_fdi_rx_pll(struct drm_i915_private *dev_priv,
 static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
 				  enum pipe pipe)
 {
-	int pp_reg, lvds_reg;
+	struct drm_device *dev = dev_priv->dev;
+	int pp_reg;
 	u32 val;
 	enum pipe panel_pipe = PIPE_A;
 	bool locked = true;
 
-	if (HAS_PCH_SPLIT(dev_priv->dev)) {
+	if (HAS_DDI(dev)) {
+		/* XXX: this neither works nor gets called for DDI */
+		return;
+	} else if (HAS_PCH_SPLIT(dev)) {
+		u32 port_sel;
+
 		pp_reg = PCH_PP_CONTROL;
-		lvds_reg = PCH_LVDS;
+		port_sel = I915_READ(PCH_PP_ON_DELAYS) & PANEL_PORT_SELECT_MASK;
+
+		if (port_sel == PANEL_PORT_SELECT_LVDS &&
+		    I915_READ(PCH_LVDS) & LVDS_PIPEB_SELECT)
+			panel_pipe = PIPE_B;
+		/* XXX: else fix for eDP */
+	} else if (IS_VALLEYVIEW(dev)) {
+		/* presumably write lock depends on pipe, not port select */
+		pp_reg = VLV_PIPE_PP_CONTROL(pipe);
+		panel_pipe = pipe;
 	} else {
 		pp_reg = PP_CONTROL;
-		lvds_reg = LVDS;
+		if (I915_READ(LVDS) & LVDS_PIPEB_SELECT)
+			panel_pipe = PIPE_B;
 	}
 
 	val = I915_READ(pp_reg);
@@ -1211,9 +1227,6 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
 	    ((val & PANEL_UNLOCK_MASK) == PANEL_UNLOCK_REGS))
 		locked = false;
 
-	if (I915_READ(lvds_reg) & LVDS_PIPEB_SELECT)
-		panel_pipe = PIPE_B;
-
 	WARN(panel_pipe == pipe && locked,
 	     "panel assertion failure, pipe %c regs locked\n",
 	     pipe_name(pipe));
Signature · 1 line
1.9.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/i915: improve assert_panel_unlocked

Quoted 23 lines · Jani Nikula

Fix assert_panel_unlocked for vlv/chv, and improve it a bit for non-LVDS. Also don't pretend it works for DDI. There's still work to do to get this right for eDP on PCH platforms, but this is a start.

---

So I wanted to quickly fix assert_panel_unlocked, but for such a short piece of code it's too involved to _quickly_ get right across all platforms. I think this is a worthwhile improvement though.

---
 drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index fe1d00dc9ef5..d6b48496d7f4 100644
@@ -1193,17 +1193,33 @@ void assert_fdi_rx_pll(struct drm_i915_private *dev_priv,
 static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
 				  enum pipe pipe)
 {

drivers/gpu/drm/i915/intel_display.c void assert_fdi_rx_pll(struct drm_i915_private *dev_priv, · line 1203

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +4 -2
-	int pp_reg, lvds_reg;
+	struct drm_device *dev = dev_priv->dev;
+	int pp_reg;
 	u32 val;
 	enum pipe panel_pipe = PIPE_A;
 	bool locked = true;
 
-	if (HAS_PCH_SPLIT(dev_priv->dev)) {
+	if (HAS_DDI(dev)) {
+		/* XXX: this neither works nor gets called for DDI */

Not sure why the XXX here. Seems to me there's nothing to fix here for DDI. Maybe just make that a WARN_ON(HAS_DDI()) or just remove the check entirely.

Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +4 -0
+		return;
+	} else if (HAS_PCH_SPLIT(dev)) {
+		u32 port_sel;
+

drivers/gpu/drm/i915/intel_display.c void assert_fdi_rx_pll(struct drm_i915_private *dev_priv, · line 1216

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +8 -1
 		pp_reg = PCH_PP_CONTROL;
-		lvds_reg = PCH_LVDS;
+		port_sel = I915_READ(PCH_PP_ON_DELAYS) & PANEL_PORT_SELECT_MASK;
+
+		if (port_sel == PANEL_PORT_SELECT_LVDS &&
+		    I915_READ(PCH_LVDS) & LVDS_PIPEB_SELECT)
+			panel_pipe = PIPE_B;
+		/* XXX: else fix for eDP */
+	} else if (IS_VALLEYVIEW(dev)) {
+		/* presumably write lock depends on pipe, not port select */

Hmm. This is a good question. Needs a bit if testing I suppose. In the worst case it somehow gets tied in with how the power sequencer gets locked to the port. For that we'd probably just have to check both power sequencers here and complain if either has the registers locked. Or maybe we should just do that anyway because it's such a simple solution? But we could do that simply by calling assert_panel_unlocked() twice (once for each pipe) from VLV specific code, so this patch seems to be exactly what we need as a first step.

Apart from the XXX in the comment:

Quoted 27 lines
drivers/gpu/drm/i915/intel_display.c +4 -4
+		pp_reg = VLV_PIPE_PP_CONTROL(pipe);
+		panel_pipe = pipe;
 	} else {
 		pp_reg = PP_CONTROL;
-		lvds_reg = LVDS;
+		if (I915_READ(LVDS) & LVDS_PIPEB_SELECT)
+			panel_pipe = PIPE_B;
 	}
 
 	val = I915_READ(pp_reg);
@@ -1211,9 +1227,6 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
 	    ((val & PANEL_UNLOCK_MASK) == PANEL_UNLOCK_REGS))
 		locked = false;
 
-	if (I915_READ(lvds_reg) & LVDS_PIPEB_SELECT)
-		panel_pipe = PIPE_B;
-
 	WARN(panel_pipe == pipe && locked,
 	     "panel assertion failure, pipe %c regs locked\n",
 	     pipe_name(pipe));
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC
#3 lore raw

Re: [PATCH 2/2] drm/i915: improve assert_panel_unlocked

2014-08-21 11:56 GMT-03:00 Ville Syrjälä <[email protected]>:

Quoted 31 lines · Jani Nikula
Quoted 30 lines

Fix assert_panel_unlocked for vlv/chv, and improve it a bit for non-LVDS. Also don't pretend it works for DDI. There's still work to do to get this right for eDP on PCH platforms, but this is a start.

---

So I wanted to quickly fix assert_panel_unlocked, but for such a short piece of code it's too involved to _quickly_ get right across all platforms. I think this is a worthwhile improvement though.

---
 drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -1
index fe1d00dc9ef5..d6b48496d7f4 100644
@@ -1193,17 +1193,33 @@ void assert_fdi_rx_pll(struct drm_i915_private *dev_priv,
 static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
                                enum pipe pipe)
 {
-     int pp_reg, lvds_reg;
+     struct drm_device *dev = dev_priv->dev;
+     int pp_reg;
      u32 val;
      enum pipe panel_pipe = PIPE_A;
      bool locked = true;
 
Quoted 7 lines

drivers/gpu/drm/i915/intel_display.c void assert_fdi_rx_pll(struct drm_i915_private *dev_priv, · line 1203

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +2 -1
-     if (HAS_PCH_SPLIT(dev_priv->dev)) {
+     if (HAS_DDI(dev)) {
+             /* XXX: this neither works nor gets called for DDI */

Not sure why the XXX here. Seems to me there's nothing to fix here for DDI. Maybe just make that a WARN_ON(HAS_DDI()) or just remove the check entirely.

As far as I remember, the "abcd" stuff is not even used/needed on DDI. But this is just what my memory tells me, it may be wrong. Someone needs to double-check.

Quoted 63 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +4 -0
+             return;
+     } else if (HAS_PCH_SPLIT(dev)) {
+             u32 port_sel;
+

drivers/gpu/drm/i915/intel_display.c void assert_fdi_rx_pll(struct drm_i915_private *dev_priv, · line 1216

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +8 -1
              pp_reg = PCH_PP_CONTROL;
-             lvds_reg = PCH_LVDS;
+             port_sel = I915_READ(PCH_PP_ON_DELAYS) & PANEL_PORT_SELECT_MASK;
+
+             if (port_sel == PANEL_PORT_SELECT_LVDS &&
+                 I915_READ(PCH_LVDS) & LVDS_PIPEB_SELECT)
+                     panel_pipe = PIPE_B;
+             /* XXX: else fix for eDP */
+     } else if (IS_VALLEYVIEW(dev)) {
+             /* presumably write lock depends on pipe, not port select */

Hmm. This is a good question. Needs a bit if testing I suppose. In the worst case it somehow gets tied in with how the power sequencer gets locked to the port. For that we'd probably just have to check both power sequencers here and complain if either has the registers locked. Or maybe we should just do that anyway because it's such a simple solution? But we could do that simply by calling assert_panel_unlocked() twice (once for each pipe) from VLV specific code, so this patch seems to be exactly what we need as a first step.

Apart from the XXX in the comment:

Quoted 23 lines
drivers/gpu/drm/i915/intel_display.c +4 -5
+             pp_reg = VLV_PIPE_PP_CONTROL(pipe);
+             panel_pipe = pipe;
      } else {
              pp_reg = PP_CONTROL;
-             lvds_reg = LVDS;
+             if (I915_READ(LVDS) & LVDS_PIPEB_SELECT)
+                     panel_pipe = PIPE_B;
      }
 
      val = I915_READ(pp_reg);
@@ -1211,9 +1227,6 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
          ((val & PANEL_UNLOCK_MASK) == PANEL_UNLOCK_REGS))
              locked = false;
 
-     if (I915_READ(lvds_reg) & LVDS_PIPEB_SELECT)
-             panel_pipe = PIPE_B;
-
      WARN(panel_pipe == pipe && locked,
           "panel assertion failure, pipe %c regs locked\n",
           pipe_name(pipe));
--

1.9.1

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Paulo Zanoni
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

Re: [PATCH 2/2] drm/i915: improve assert_panel_unlocked

Quoted 40 lines · Paulo Zanoni

2014-08-21 11:56 GMT-03:00 Ville Syrjälä <[email protected]>:

Quoted 31 lines · Jani Nikula
Quoted 30 lines

Fix assert_panel_unlocked for vlv/chv, and improve it a bit for non-LVDS. Also don't pretend it works for DDI. There's still work to do to get this right for eDP on PCH platforms, but this is a start.

---

So I wanted to quickly fix assert_panel_unlocked, but for such a short piece of code it's too involved to _quickly_ get right across all platforms. I think this is a worthwhile improvement though.

---
 drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -1
index fe1d00dc9ef5..d6b48496d7f4 100644
@@ -1193,17 +1193,33 @@ void assert_fdi_rx_pll(struct drm_i915_private *dev_priv,
 static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
                                enum pipe pipe)
 {
-     int pp_reg, lvds_reg;
+     struct drm_device *dev = dev_priv->dev;
+     int pp_reg;
      u32 val;
      enum pipe panel_pipe = PIPE_A;
      bool locked = true;
 
Quoted 7 lines

drivers/gpu/drm/i915/intel_display.c void assert_fdi_rx_pll(struct drm_i915_private *dev_priv, · line 1203

Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +2 -1
-     if (HAS_PCH_SPLIT(dev_priv->dev)) {
+     if (HAS_DDI(dev)) {
+             /* XXX: this neither works nor gets called for DDI */

Not sure why the XXX here. Seems to me there's nothing to fix here for DDI. Maybe just make that a WARN_ON(HAS_DDI()) or just remove the check entirely.

Quoted 3 lines

As far as I remember, the "abcd" stuff is not even used/needed on DDI. But this is just what my memory tells me, it may be wrong. Someone needs to double-check.

Bspec just says "spare" for those bits.

Quoted 69 lines
Quoted 64 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +4 -0
+             return;
+     } else if (HAS_PCH_SPLIT(dev)) {
+             u32 port_sel;
+

drivers/gpu/drm/i915/intel_display.c void assert_fdi_rx_pll(struct drm_i915_private *dev_priv, · line 1216

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +8 -1
              pp_reg = PCH_PP_CONTROL;
-             lvds_reg = PCH_LVDS;
+             port_sel = I915_READ(PCH_PP_ON_DELAYS) & PANEL_PORT_SELECT_MASK;
+
+             if (port_sel == PANEL_PORT_SELECT_LVDS &&
+                 I915_READ(PCH_LVDS) & LVDS_PIPEB_SELECT)
+                     panel_pipe = PIPE_B;
+             /* XXX: else fix for eDP */
+     } else if (IS_VALLEYVIEW(dev)) {
+             /* presumably write lock depends on pipe, not port select */

Hmm. This is a good question. Needs a bit if testing I suppose. In the worst case it somehow gets tied in with how the power sequencer gets locked to the port. For that we'd probably just have to check both power sequencers here and complain if either has the registers locked. Or maybe we should just do that anyway because it's such a simple solution? But we could do that simply by calling assert_panel_unlocked() twice (once for each pipe) from VLV specific code, so this patch seems to be exactly what we need as a first step.

Apart from the XXX in the comment:

Quoted 23 lines
drivers/gpu/drm/i915/intel_display.c +4 -5
+             pp_reg = VLV_PIPE_PP_CONTROL(pipe);
+             panel_pipe = pipe;
      } else {
              pp_reg = PP_CONTROL;
-             lvds_reg = LVDS;
+             if (I915_READ(LVDS) & LVDS_PIPEB_SELECT)
+                     panel_pipe = PIPE_B;
      }
 
      val = I915_READ(pp_reg);
@@ -1211,9 +1227,6 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
          ((val & PANEL_UNLOCK_MASK) == PANEL_UNLOCK_REGS))
              locked = false;
 
-     if (I915_READ(lvds_reg) & LVDS_PIPEB_SELECT)
-             panel_pipe = PIPE_B;
-
      WARN(panel_pipe == pipe && locked,
           "panel assertion failure, pipe %c regs locked\n",
           pipe_name(pipe));
--

1.9.1

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni
Signature · 2 lines
Ville Syrjälä
Intel OTC
#5 lore raw

Re: [PATCH 2/2] drm/i915: improve assert_panel_unlocked

Quoted 41 lines · Ville Syrjälä
Quoted 40 lines · Paulo Zanoni

2014-08-21 11:56 GMT-03:00 Ville Syrjälä <[email protected]>:

Quoted 38 lines · Jani Nikula
Quoted 23 lines

Fix assert_panel_unlocked for vlv/chv, and improve it a bit for non-LVDS. Also don't pretend it works for DDI. There's still work to do to get this right for eDP on PCH platforms, but this is a start.

---

So I wanted to quickly fix assert_panel_unlocked, but for such a short piece of code it's too involved to _quickly_ get right across all platforms. I think this is a worthwhile improvement though.

---
 drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index fe1d00dc9ef5..d6b48496d7f4 100644
@@ -1193,17 +1193,33 @@ void assert_fdi_rx_pll(struct drm_i915_private *dev_priv,
 static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
                                enum pipe pipe)
 {

drivers/gpu/drm/i915/intel_display.c void assert_fdi_rx_pll(struct drm_i915_private *dev_priv, · line 1203

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +4 -2
-     int pp_reg, lvds_reg;
+     struct drm_device *dev = dev_priv->dev;
+     int pp_reg;
      u32 val;
      enum pipe panel_pipe = PIPE_A;
      bool locked = true;
 
-     if (HAS_PCH_SPLIT(dev_priv->dev)) {
+     if (HAS_DDI(dev)) {
+             /* XXX: this neither works nor gets called for DDI */

Not sure why the XXX here. Seems to me there's nothing to fix here for DDI. Maybe just make that a WARN_ON(HAS_DDI()) or just remove the check entirely.

Quoted 5 lines
Quoted 3 lines

As far as I remember, the "abcd" stuff is not even used/needed on DDI. But this is just what my memory tells me, it may be wrong. Someone needs to double-check.

Bspec just says "spare" for those bits.

Iirc it's also not used for edp on older platforms, but only for lvds. There's definitely a lot of fun in this area ...
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#6 lore raw

PATCH v2 2/2 drm/i915: improve assert_panel_unlocked

In reply to Jani Nikula

Fix assert_panel_unlocked for vlv/chv, and improve it a bit for non-LVDS. Also don't pretend it works for DDI. There's still work to do to get this right for eDP on PCH platforms, but this is a start.

v2: WARN_ON(HAS_DDI)

---
 drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +20 -7
index fe1d00dc9ef5..51b4cd29f932 100644
@@ -1193,17 +1193,33 @@ void assert_fdi_rx_pll(struct drm_i915_private *dev_priv,
 static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
 				  enum pipe pipe)
 {
-	int pp_reg, lvds_reg;
+	struct drm_device *dev = dev_priv->dev;
+	int pp_reg;
 	u32 val;
 	enum pipe panel_pipe = PIPE_A;
 	bool locked = true;
 
-	if (HAS_PCH_SPLIT(dev_priv->dev)) {
+	if (WARN_ON(HAS_DDI(dev)))
+		return;
+
+	if (HAS_PCH_SPLIT(dev)) {
+		u32 port_sel;
+
 		pp_reg = PCH_PP_CONTROL;
-		lvds_reg = PCH_LVDS;
+		port_sel = I915_READ(PCH_PP_ON_DELAYS) & PANEL_PORT_SELECT_MASK;
+
+		if (port_sel == PANEL_PORT_SELECT_LVDS &&
+		    I915_READ(PCH_LVDS) & LVDS_PIPEB_SELECT)
+			panel_pipe = PIPE_B;
+		/* XXX: else fix for eDP */
+	} else if (IS_VALLEYVIEW(dev)) {
+		/* presumably write lock depends on pipe, not port select */
+		pp_reg = VLV_PIPE_PP_CONTROL(pipe);
+		panel_pipe = pipe;
 	} else {
 		pp_reg = PP_CONTROL;
-		lvds_reg = LVDS;
+		if (I915_READ(LVDS) & LVDS_PIPEB_SELECT)
+			panel_pipe = PIPE_B;
 	}
 
 	val = I915_READ(pp_reg);
@@ -1211,9 +1227,6 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
 	    ((val & PANEL_UNLOCK_MASK) == PANEL_UNLOCK_REGS))
 		locked = false;
 
-	if (I915_READ(lvds_reg) & LVDS_PIPEB_SELECT)
-		panel_pipe = PIPE_B;
-
 	WARN(panel_pipe == pipe && locked,
 	     "panel assertion failure, pipe %c regs locked\n",
 	     pipe_name(pipe));
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/2
#7 lore raw
In reply to Jani Nikula

2014-08-21 9:06 GMT-03:00 Jani Nikula <[email protected]>:

Quoted 4 lines

Use the correct mask for the unlock bits. In theory this could have lead to incorrect asserts but this is unlikely in practise.

Quoted 24 lines
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -2
index 0b327ebb2d9e..fe1d00dc9ef5 100644
@@ -1208,7 +1208,7 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
 
        val = I915_READ(pp_reg);
        if (!(val & PANEL_POWER_ON) ||
-           ((val & PANEL_UNLOCK_REGS) == PANEL_UNLOCK_REGS))
+           ((val & PANEL_UNLOCK_MASK) == PANEL_UNLOCK_REGS))
                locked = false;
 
        if (I915_READ(lvds_reg) & LVDS_PIPEB_SELECT)
--

1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni
Reviewed-by on v1 1/2
#8 lore raw
In reply to Jani Nikula
Quoted 4 lines · Jani Nikula

Use the correct mask for the unlock bits. In theory this could have lead to incorrect asserts but this is unlikely in practise.

Quoted 24 lines
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 0b327ebb2d9e..fe1d00dc9ef5 100644
@@ -1208,7 +1208,7 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
 
 	val = I915_READ(pp_reg);
 	if (!(val & PANEL_POWER_ON) ||
-	    ((val & PANEL_UNLOCK_REGS) == PANEL_UNLOCK_REGS))
+	    ((val & PANEL_UNLOCK_MASK) == PANEL_UNLOCK_REGS))
 		locked = false;
 
 	if (I915_READ(lvds_reg) & LVDS_PIPEB_SELECT)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC