drm/i915: Pile of display related patches
Subsystems (2)
cover drm/i915: Pile of display related patches
From: Ville Syrjälä <[email protected]>
These are mostly prep work for some future stuff.
Rafael Barbalho (1):
drm/i915: Fix framecount offset
Ville Syrjälä (6):
drm/i915: Refactor gmch hpd irq handling
drm/i915: Move DP M/N setup from update_pll to mode_set for gmch
platforms
drm/i915: Split dp post_disable hooks
drm/i915: Warn when DPIO read returns 0xffffffff drm/i915: Provide a bit more info when pipestat bits are wrong drm/i915: Use enum plane instaad of numbers
drivers/gpu/drm/i915/i915_irq.c | 83 +++++++++++++++++------------------ drivers/gpu/drm/i915/i915_reg.h | 6 +-- drivers/gpu/drm/i915/intel_display.c | 23 +++++----- drivers/gpu/drm/i915/intel_dp.c | 23 ++++++---- drivers/gpu/drm/i915/intel_sideband.c | 4 ++ 5 files changed, 72 insertions(+), 67 deletions(-)
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/7 drm/i915: Refactor gmch hpd irq handling
From: Ville Syrjälä <[email protected]>
Pull all the gmch platform hotplug interrupt handling into one function.
--- drivers/gpu/drm/i915/i915_irq.c | 71 +++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 39 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +32 -39
@@ -1647,6 +1647,34 @@ static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir)gmbus_irq_handler (dev); } +static void i9xx_hpd_irq_handler (struct drm_device *dev,u32 iir) +{ +drm_i915_private_t *dev_priv = dev->dev_private; +u32 hotplug_status; + +if ((iir &I915_DISPLAY_PORT_INTERRUPT ) ==0 ) +return ; + + hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); + +if (IS_G4X (dev)) { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_G4X ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_g4x); + }else { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); + } + +if ((IS_G4X (dev) ||IS_VALLEYVIEW (dev)) && + hotplug_status &DP_AUX_CHANNEL_MASK_INT_STATUS_G4X ) +dp_aux_irq_handler (dev); + +I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); +POSTING_READ (PORT_HOTPLUG_STAT ); +} +static irqreturn_t valleyview_irq_handler (int irq,void *arg) {struct drm_device *dev = (struct drm_device *) arg;
@@ -1669,19 +1697,7 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)valleyview_pipestat_irq_handler (dev, iir);/* Consume port. Then clear IIR or we'll miss events */ -if (iir &I915_DISPLAY_PORT_INTERRUPT ) { -u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); -u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; - -intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); - -if (hotplug_status &DP_AUX_CHANNEL_MASK_INT_STATUS_G4X ) -dp_aux_irq_handler (dev); - -I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); -I915_READ (PORT_HOTPLUG_STAT ); - } - +i9xx_hpd_irq_handler (dev, iir);if (pm_iir)gen6_rps_irq_handler (dev_priv, pm_iir);
@@ -3713,16 +3729,8 @@ static irqreturn_t i915_irq_handler(int irq, void *arg)break ;/* Consume port. Then clear IIR or we'll miss events */ -if ((I915_HAS_HOTPLUG (dev)) && - (iir &I915_DISPLAY_PORT_INTERRUPT )) { -u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); -u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; - -intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); - -I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); -POSTING_READ (PORT_HOTPLUG_STAT ); - } +if (I915_HAS_HOTPLUG (dev)) +i9xx_hpd_irq_handler (dev, iir);I915_WRITE (IIR , iir & ~flip_mask); new_iir =I915_READ (IIR );/* Flush posted writes */
@@ -3956,22 +3964,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) ret =IRQ_HANDLED ;/* Consume port. Then clear IIR or we'll miss events */ -if (iir &I915_DISPLAY_PORT_INTERRUPT ) { -u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); -u32 hotplug_trigger = hotplug_status & (IS_G4X (dev) ? -HOTPLUG_INT_STATUS_G4X : -HOTPLUG_INT_STATUS_I915 ); - -intel_hpd_irq_handler (dev, hotplug_trigger, -IS_G4X (dev) ? hpd_status_g4x : hpd_status_i915); - -if (IS_G4X (dev) && - (hotplug_status &DP_AUX_CHANNEL_MASK_INT_STATUS_G4X )) -dp_aux_irq_handler (dev); - -I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); -I915_READ (PORT_HOTPLUG_STAT ); - } +i9xx_hpd_irq_handler (dev, iir);I915_WRITE (IIR , iir & ~flip_mask); new_iir =I915_READ (IIR );/* Flush posted writes */
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/7] drm/i915: Refactor gmch hpd irq handling
Quoted 35 lines · On Mon, Mar 31, 2014 at 06:21:24PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Pull all the gmch platform hotplug interrupt handling into one function.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 71 +++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 39 deletions(-)drivers/gpu/drm/i915/i915_irq.c +17
-0@@ -1647,6 +1647,34 @@ static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir)gmbus_irq_handler (dev); } +static void i9xx_hpd_irq_handler (struct drm_device *dev,u32 iir) +{ +drm_i915_private_t *dev_priv = dev->dev_private; +u32 hotplug_status; + +if ((iir &I915_DISPLAY_PORT_INTERRUPT ) ==0 ) +return ; + + hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); + +if (IS_G4X (dev)) { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_G4X ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_g4x); + }else { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; +
drivers/gpu/drm/i915/i915_irq.c static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir) · line 1676
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +10
-0+intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); + } + +if ((IS_G4X (dev) ||IS_VALLEYVIEW (dev)) && + hotplug_status &DP_AUX_CHANNEL_MASK_INT_STATUS_G4X ) +dp_aux_irq_handler (dev); + +I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); +POSTING_READ (PORT_HOTPLUG_STAT ); +}
Hmm, after some thought I am in favour of the function as a readibility improvement. However, I would prefer to have the iir check inlined into the caller.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 1/7] drm/i915: Refactor gmch hpd irq handling
Quoted 42 lines · Chris Wilson
Quoted 41 lines · On Mon, Mar 31, 2014 at 06:21:24PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Pull all the gmch platform hotplug interrupt handling into one function.
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 71 +++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 39 deletions(-)drivers/gpu/drm/i915/i915_irq.c +23
-0@@ -1647,6 +1647,34 @@ static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir)gmbus_irq_handler (dev); } +static void i9xx_hpd_irq_handler (struct drm_device *dev,u32 iir) +{ +drm_i915_private_t *dev_priv = dev->dev_private; +u32 hotplug_status; + +if ((iir &I915_DISPLAY_PORT_INTERRUPT ) ==0 ) +return ; + + hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); + +if (IS_G4X (dev)) { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_G4X ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_g4x); + }else { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); + } + +if ((IS_G4X (dev) ||IS_VALLEYVIEW (dev)) && + hotplug_status &DP_AUX_CHANNEL_MASK_INT_STATUS_G4X ) +dp_aux_irq_handler (dev);
Quoted 8 lines
drivers/gpu/drm/i915/i915_irq.c static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir) · line 1676
Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c +4
-0+ +I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); +POSTING_READ (PORT_HOTPLUG_STAT ); +}Hmm, after some thought I am in favour of the function as a readibility improvement. However, I would prefer to have the iir check inlined into the caller.
I had it like that originally, but I moved it into the function when I realized all the callers have the exact same check, and it looked a bit out of place next to the other "sub" irq handlers which do the IIR checks themselves.
But I'm not really attached to the idea, so I can change it back if that's the consensus.
Signature · 2 lines
Ville Syrjälä Intel OTC
Re: [PATCH 1/7] drm/i915: Refactor gmch hpd irq handling
Quoted 11 lines · Ville Syrjälä
Quoted 3 lines
Hmm, after some thought I am in favour of the function as a readibility improvement. However, I would prefer to have the iir check inlined into the caller.
I had it like that originally, but I moved it into the function when I realized all the callers have the exact same check, and it looked a bit out of place next to the other "sub" irq handlers which do the IIR checks themselves.
But I'm not really attached to the idea, so I can change it back if that's the consensus.
In our shared interrupt handling code we have both cases, where either the helper function itself of the caller checks for the bits. Or sometimes both even. I'm ok with whatever approach makes sense most. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Re: [PATCH 1/7] drm/i915: Refactor gmch hpd irq handling
Quoted 11 lines · Daniel Vetter
Quoted 9 lines · Ville Syrjälä
Quoted 3 lines
Hmm, after some thought I am in favour of the function as a readibility improvement. However, I would prefer to have the iir check inlined into the caller.
I had it like that originally, but I moved it into the function when I realized all the callers have the exact same check, and it looked a bit out of place next to the other "sub" irq handlers which do the IIR checks themselves.
Quoted 6 lines
Quoted 2 lines
But I'm not really attached to the idea, so I can change it back if that's the consensus.
In our shared interrupt handling code we have both cases, where either the helper function itself of the caller checks for the bits. Or sometimes both even. I'm ok with whatever approach makes sense most.
I'm working on the theory that we get thousands more interrupts for breadcrumbs and vblanks than we do hpd and so we should focus on keeping those pathways short.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
PATCH v2 1/7 drm/i915: Refactor gmch hpd irq handling
In reply to Chris WilsonFrom: Ville Syrjälä <[email protected]>
Pull all the gmch platform hotplug interrupt handling into one function.
v2: Move the IIR check to the caller
s/drm_i915_private_t/struct drm_i915_private/
--- drivers/gpu/drm/i915/i915_irq.c | 69 ++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 39 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +30 -39
@@ -1647,6 +1647,29 @@ static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir)gmbus_irq_handler (dev); } +static void i9xx_hpd_irq_handler (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; +u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); + +if (IS_G4X (dev)) { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_G4X ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_g4x); + }else { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); + } + +if ((IS_G4X (dev) ||IS_VALLEYVIEW (dev)) && + hotplug_status &DP_AUX_CHANNEL_MASK_INT_STATUS_G4X ) +dp_aux_irq_handler (dev); + +I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); +POSTING_READ (PORT_HOTPLUG_STAT ); +} +static irqreturn_t valleyview_irq_handler (int irq,void *arg) {struct drm_device *dev = (struct drm_device *) arg;
@@ -1669,19 +1692,8 @@ static irqreturn_t valleyview_irq_handler(int irq, void *arg)valleyview_pipestat_irq_handler (dev, iir);/* Consume port. Then clear IIR or we'll miss events */ -if (iir &I915_DISPLAY_PORT_INTERRUPT ) { -u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); -u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; - -intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); - -if (hotplug_status &DP_AUX_CHANNEL_MASK_INT_STATUS_G4X ) -dp_aux_irq_handler (dev); - -I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); -I915_READ (PORT_HOTPLUG_STAT ); - } - +if (iir &I915_DISPLAY_PORT_INTERRUPT ) +i9xx_hpd_irq_handler (dev);if (pm_iir)gen6_rps_irq_handler (dev_priv, pm_iir);
@@ -3713,16 +3725,9 @@ static irqreturn_t i915_irq_handler(int irq, void *arg)break ;/* Consume port. Then clear IIR or we'll miss events */ -if ((I915_HAS_HOTPLUG (dev)) && - (iir &I915_DISPLAY_PORT_INTERRUPT )) { -u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); -u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; - -intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); - -I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); -POSTING_READ (PORT_HOTPLUG_STAT ); - } +if (I915_HAS_HOTPLUG (dev) && + iir &I915_DISPLAY_PORT_INTERRUPT ) +i9xx_hpd_irq_handler (dev);I915_WRITE (IIR , iir & ~flip_mask); new_iir =I915_READ (IIR );/* Flush posted writes */
@@ -3956,22 +3961,8 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) ret =IRQ_HANDLED ;/* Consume port. Then clear IIR or we'll miss events */ -if (iir &I915_DISPLAY_PORT_INTERRUPT ) { -u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); -u32 hotplug_trigger = hotplug_status & (IS_G4X (dev) ? -HOTPLUG_INT_STATUS_G4X : -HOTPLUG_INT_STATUS_I915 ); - -intel_hpd_irq_handler (dev, hotplug_trigger, -IS_G4X (dev) ? hpd_status_g4x : hpd_status_i915); - -if (IS_G4X (dev) && - (hotplug_status &DP_AUX_CHANNEL_MASK_INT_STATUS_G4X )) -dp_aux_irq_handler (dev); - -I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status); -I915_READ (PORT_HOTPLUG_STAT ); - } +if (iir &I915_DISPLAY_PORT_INTERRUPT ) +i9xx_hpd_irq_handler (dev);I915_WRITE (IIR , iir & ~flip_mask); new_iir =I915_READ (IIR );/* Flush posted writes */
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2 1/7] drm/i915: Refactor gmch hpd irq handling
Quoted 9 lines · On Tue, Apr 01, 2014 at 10:54:36AM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Pull all the gmch platform hotplug interrupt handling into one function.
v2: Move the IIR check to the caller
s/drm_i915_private_t/struct drm_i915_private/Signed-off-by Ville Syrjälä <[email protected]>
With the addition of the comment before the posting-read,
Quoted 22 lines
--- drivers/gpu/drm/i915/i915_irq.c | 69 ++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 39 deletions(-)drivers/gpu/drm/i915/i915_irq.c +10
-0@@ -1647,6 +1647,29 @@ static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir)gmbus_irq_handler (dev); } +static void i9xx_hpd_irq_handler (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; +u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); + +if (IS_G4X (dev)) { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_G4X ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_g4x); + }else {
drivers/gpu/drm/i915/i915_irq.c static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir) · line 1669
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +10
-0+u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); + } + +if ((IS_G4X (dev) ||IS_VALLEYVIEW (dev)) && + hotplug_status &DP_AUX_CHANNEL_MASK_INT_STATUS_G4X ) +dp_aux_irq_handler (dev); + +I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status);
/* Make sure hotplug status is cleared before we clear IIR,
* or else we may miss hotplug events.
*/
drivers/gpu/drm/i915/i915_irq.c static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir) · line 1671
Quoted 2 lines
drivers/gpu/drm/i915/i915_irq.c +2
-0+POSTING_READ (PORT_HOTPLUG_STAT ); +}
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH v2 1/7] drm/i915: Refactor gmch hpd irq handling
Quoted 42 lines · Chris Wilson
Quoted 9 lines · On Tue, Apr 01, 2014 at 10:54:36AM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Pull all the gmch platform hotplug interrupt handling into one function.
v2: Move the IIR check to the caller
s/drm_i915_private_t/struct drm_i915_private/Signed-off-by Ville Syrjälä <[email protected]>With the addition of the comment before the posting-read,
Reviewed-by Chris Wilson <[email protected]>Quoted 28 lines
--- drivers/gpu/drm/i915/i915_irq.c | 69 ++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 39 deletions(-)drivers/gpu/drm/i915/i915_irq.c +16
-0@@ -1647,6 +1647,29 @@ static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir)gmbus_irq_handler (dev); } +static void i9xx_hpd_irq_handler (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv = dev->dev_private; +u32 hotplug_status =I915_READ (PORT_HOTPLUG_STAT ); + +if (IS_G4X (dev)) { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_G4X ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_g4x); + }else { +u32 hotplug_trigger = hotplug_status &HOTPLUG_INT_STATUS_I915 ; + +intel_hpd_irq_handler (dev, hotplug_trigger, hpd_status_i915); + } + + if ((IS_G4X(dev) || IS_VALLEYVIEW(dev)) &&
Quoted 8 lines
drivers/gpu/drm/i915/i915_irq.c static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir) · line 1669
Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c +4
-0+ hotplug_status & DP_AUX_CHANNEL_MASK_INT_STATUS_G4X) +dp_aux_irq_handler (dev); + +I915_WRITE (PORT_HOTPLUG_STAT , hotplug_status);/* Make sure hotplug status is cleared before we clear IIR,
* or else we may miss hotplug events.
*/
Done&merged, thanks for the patch&review.
-Daniel
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c static void valleyview_pipestat_irq_handler(struct drm_device *dev, u32 iir) · line 1671
Quoted 2 lines
drivers/gpu/drm/i915/i915_irq.c +2
-0+POSTING_READ (PORT_HOTPLUG_STAT ); +}-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 2/7 drm/i915: Move DP M/N setup from update_pll to mode_set for gmch platforms
In reply to [email protected]From: Ville Syrjälä <[email protected]>
There's no point in hiding the DP M/N setup in the update_pll functions. Just move it to the mode_set function.
--- drivers/gpu/drm/i915/intel_display.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_display.c +3 -6
@@ -5245,9 +5245,6 @@ static void vlv_update_pll(struct intel_crtc *crtc) << DPLL_MD_UDI_MULTIPLIER_SHIFT; crtc->config.dpll_hw_state.dpll_md = dpll_md; -if (crtc->config.has_dp_encoder) -intel_dp_set_m_n (crtc); -mutex_unlock (&dev_priv->dpio_lock); }
@@ -5325,9 +5322,6 @@ static void i9xx_update_pll(struct intel_crtc *crtc, << DPLL_MD_UDI_MULTIPLIER_SHIFT; crtc->config.dpll_hw_state.dpll_md = dpll_md; } - -if (crtc->config.has_dp_encoder) -intel_dp_set_m_n (crtc); } static void i8xx_update_pll(struct intel_crtc *crtc,
@@ -5656,6 +5650,9 @@ skip_dpll: dspcntr |=DISPPLANE_SEL_PIPE_B ; } +if (intel_crtc->config.has_dp_encoder) +intel_dp_set_m_n (intel_crtc); +intel_set_pipe_timings (intel_crtc);/* pipesrc and dspsize control the size that is scaled from,
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/7] drm/i915: Move DP M/N setup from update_pll to mode_set for gmch platforms
Quoted 35 lines · On Mon, 31 Mar 2014 18:21:25 +0300 [email protected] wrote:
From: Ville Syrjälä <[email protected]>
There's no point in hiding the DP M/N setup in the
update_pllfunctions. Just move it to themode_setfunction.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-6@@ -5245,9 +5245,6 @@ static void vlv_update_pll(struct intel_crtc *crtc) << DPLL_MD_UDI_MULTIPLIER_SHIFT; crtc->config.dpll_hw_state.dpll_md = dpll_md; -if (crtc->config.has_dp_encoder) -intel_dp_set_m_n (crtc); -mutex_unlock (&dev_priv->dpio_lock); }@@ -5325,9 +5322,6 @@ static void i9xx_update_pll(struct intel_crtc *crtc, << DPLL_MD_UDI_MULTIPLIER_SHIFT; crtc->config.dpll_hw_state.dpll_md = dpll_md; } - -if (crtc->config.has_dp_encoder) -intel_dp_set_m_n (crtc); } static void i8xx_update_pll(struct intel_crtc *crtc,
drivers/gpu/drm/i915/intel_display.c skip_dpll: · line 5658
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.c +3
-0@@ -5656,6 +5650,9 @@ skip_dpll: dspcntr |=DISPPLANE_SEL_PIPE_B ; } +if (intel_crtc->config.has_dp_encoder) +intel_dp_set_m_n (intel_crtc); +intel_set_pipe_timings (intel_crtc);/* pipesrc and dspsize control the size that is scaled from,
Yeah I like it.
Signature · 5 lines
Jesse Barnes, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/7 drm/i915: Split dp post_disable hooks
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Split the post_disable hooks for DP to g4x and vlv variants. We'll need another variant soon, so this should make it look a bit cleaner.
--- drivers/gpu/drm/i915/intel_dp.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +15 -8
@@ -1782,17 +1782,23 @@ static void intel_disable_dp(struct intel_encoder *encoder)intel_dp_link_down (intel_dp); } -static void intel_post_disable_dp (struct intel_encoder *encoder) +static void g4x_post_disable_dp (struct intel_encoder *encoder) {struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);enum port port =dp_to_dig_port (intel_dp)->port; -struct drm_device *dev = encoder->base.dev; -if (port ==PORT_A ||IS_VALLEYVIEW (dev)) { -intel_dp_link_down (intel_dp); -if (!IS_VALLEYVIEW (dev)) -ironlake_edp_pll_off (intel_dp); - } +if (port !=PORT_A ) +return ; + +intel_dp_link_down (intel_dp); +ironlake_edp_pll_off (intel_dp); +} + +static void vlv_post_disable_dp (struct intel_encoder *encoder) +{ +struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base); + +intel_dp_link_down (intel_dp); }static void intel_enable_dp (struct intel_encoder *encoder)
@@ -3836,16 +3842,17 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port) intel_encoder->compute_config = intel_dp_compute_config; intel_encoder->mode_set = intel_dp_mode_set; intel_encoder->disable = intel_disable_dp; - intel_encoder->post_disable = intel_post_disable_dp; intel_encoder->get_hw_state = intel_dp_get_hw_state; intel_encoder->get_config = intel_dp_get_config;if (IS_VALLEYVIEW (dev)) { intel_encoder->pre_pll_enable = vlv_dp_pre_pll_enable; intel_encoder->pre_enable = vlv_pre_enable_dp; intel_encoder->enable = vlv_enable_dp; + intel_encoder->post_disable = vlv_post_disable_dp; }else { intel_encoder->pre_enable = g4x_pre_enable_dp; intel_encoder->enable = g4x_enable_dp; + intel_encoder->post_disable = g4x_post_disable_dp; } intel_dig_port->port = port;
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/7] drm/i915: Split dp post_disable hooks
Quoted 4 lines · On Mon, 31 Mar 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Split the
post_disablehooks for DP to g4x and vlv variants. We'll need another variant soon, so this should make it look a bit cleaner.
Quoted 66 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-)drivers/gpu/drm/i915/intel_dp.c +15
-8@@ -1782,17 +1782,23 @@ static void intel_disable_dp(struct intel_encoder *encoder)intel_dp_link_down (intel_dp); } -static void intel_post_disable_dp (struct intel_encoder *encoder) +static void g4x_post_disable_dp (struct intel_encoder *encoder) {struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base);enum port port =dp_to_dig_port (intel_dp)->port; -struct drm_device *dev = encoder->base.dev; -if (port ==PORT_A ||IS_VALLEYVIEW (dev)) { -intel_dp_link_down (intel_dp); -if (!IS_VALLEYVIEW (dev)) -ironlake_edp_pll_off (intel_dp); - } +if (port !=PORT_A ) +return ; + +intel_dp_link_down (intel_dp); +ironlake_edp_pll_off (intel_dp); +} + +static void vlv_post_disable_dp (struct intel_encoder *encoder) +{ +struct intel_dp *intel_dp =enc_to_intel_dp (&encoder->base); + +intel_dp_link_down (intel_dp); }static void intel_enable_dp (struct intel_encoder *encoder)@@ -3836,16 +3842,17 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port) intel_encoder->compute_config = intel_dp_compute_config; intel_encoder->mode_set = intel_dp_mode_set; intel_encoder->disable = intel_disable_dp; - intel_encoder->post_disable = intel_post_disable_dp; intel_encoder->get_hw_state = intel_dp_get_hw_state; intel_encoder->get_config = intel_dp_get_config;if (IS_VALLEYVIEW (dev)) { intel_encoder->pre_pll_enable = vlv_dp_pre_pll_enable; intel_encoder->pre_enable = vlv_pre_enable_dp; intel_encoder->enable = vlv_enable_dp; + intel_encoder->post_disable = vlv_post_disable_dp; }else { intel_encoder->pre_enable = g4x_pre_enable_dp; intel_encoder->enable = g4x_enable_dp; + intel_encoder->post_disable = g4x_post_disable_dp; } intel_dig_port->port = port;Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedRe: [PATCH 3/7] drm/i915: Split dp post_disable hooks
Quoted 7 lines · Jani Nikula
Quoted 4 lines · On Mon, 31 Mar 2014, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Split the
post_disablehooks for DP to g4x and vlv variants. We'll need another variant soon, so this should make it look a bit cleaner.Reviewed-by Jani Nikula <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 4/7 drm/i915: Warn when DPIO read returns 0xffffffff
In reply to [email protected]From: Ville Syrjälä <[email protected]>
DPIO reads from groups/broadcast register offsets for PCS and TX return all 1's. If that result gets used for something we'll probably end up doing something wrong. So warn when that happens.
FIXME there might be some registers where all 1's is a valid value, so ideally we should check the register offset instead...
--- drivers/gpu/drm/i915/intel_sideband.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/intel_sideband.c +4 -0
@@ -182,6 +182,10 @@ u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum pipe pipe, int reg)vlv_sideband_rw (dev_priv,DPIO_DEVFN ,DPIO_PHY_IOSF_PORT (DPIO_PHY (pipe)),DPIO_OPCODE_REG_READ , reg, &val); + +WARN (val ==0xffffffff ,"DPIO read pipe %c reg 0x%x == 0x%x\n" , +pipe_name (pipe), reg, val); +return val; }
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/7] drm/i915: Warn when DPIO read returns 0xffffffff
Quoted 20 lines · On Mon, 31 Mar 2014 18:21:27 +0300 [email protected] wrote:
From: Ville Syrjälä <[email protected]>
DPIO reads from groups/broadcast register offsets for PCS and TX return all 1's. If that result gets used for something we'll probably end up doing something wrong. So warn when that happens.
FIXME there might be some registers where all 1's is a valid value, so ideally we should check the register offset instead...
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_sideband.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/i915/intel_sideband.c +0
-0
drivers/gpu/drm/i915/intel_sideband.c u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum pipe pipe, int reg) · line 191
Quoted 10 lines
drivers/gpu/drm/i915/intel_sideband.c +4
-0@@ -182,6 +182,10 @@ u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum pipe pipe, int reg)vlv_sideband_rw (dev_priv,DPIO_DEVFN ,DPIO_PHY_IOSF_PORT (DPIO_PHY (pipe)),DPIO_OPCODE_REG_READ , reg, &val); + +WARN (val ==0xffffffff ,"DPIO read pipe %c reg 0x%x == 0x%x\n" , +pipe_name (pipe), reg, val); +return val; }
Signature · 5 lines
Jesse Barnes, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 4/7] drm/i915: Warn when DPIO read returns 0xffffffff
In reply to [email protected]Quoted 9 lines · On Mon, Mar 31, 2014 at 06:21:27PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
DPIO reads from groups/broadcast register offsets for PCS and TX return all 1's. If that result gets used for something we'll probably end up doing something wrong. So warn when that happens.
FIXME there might be some registers where all 1's is a valid value, so ideally we should check the register offset instead...
FIXMEs like this look better in the code, I've pasted it there, too. -Daniel
Quoted 28 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_sideband.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/i915/intel_sideband.c +4
-0@@ -182,6 +182,10 @@ u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum pipe pipe, int reg)vlv_sideband_rw (dev_priv,DPIO_DEVFN ,DPIO_PHY_IOSF_PORT (DPIO_PHY (pipe)),DPIO_OPCODE_REG_READ , reg, &val); + +WARN (val ==0xffffffff ,"DPIO read pipe %c reg 0x%x == 0x%x\n" , +pipe_name (pipe), reg, val); +return val; }Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 5/7 drm/i915: Provide a bit more info when pipestat bits are wrong
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Print the enable_mask and status_mask from __i915_{enable,disable}_pipestat() when the called has messed them up somehow.
--- drivers/gpu/drm/i915/i915_irq.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +8 -4
@@ -503,8 +503,10 @@ __i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock); -if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , + pipe, enable_mask, status_mask))return ;if ((pipestat & enable_mask) == enable_mask)
@@ -527,8 +529,10 @@ __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock); -if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , + pipe, enable_mask, status_mask))return ;if ((pipestat & enable_mask) ==0 )
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/7] drm/i915: Provide a bit more info when pipestat bits are wrong
Quoted 31 lines · On Mon, 31 Mar 2014 18:21:28 +0300 [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Print the
enable_maskandstatus_maskfrom __i915_{enable,disable}_pipestat() when the called has messed them up somehow.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_irq.c +4
-2@@ -503,8 +503,10 @@ __i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock); -if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , + pipe, enable_mask, status_mask))return ;if ((pipestat & enable_mask) == enable_mask)@@ -527,8 +529,10 @@ __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock);
drivers/gpu/drm/i915/i915_irq.c __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe, · line 538
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +4
-2-if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , + pipe, enable_mask, status_mask))return ;if ((pipestat & enable_mask) ==0 )
Signature · 5 lines
Jesse Barnes, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 5/7] drm/i915: Provide a bit more info when pipestat bits are wrong
In reply to [email protected]Quoted 16 lines · On Mon, Mar 31, 2014 at 06:21:28PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Print the
enable_maskandstatus_maskfrom __i915_{enable,disable}_pipestat() when the called has messed them up somehow.Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_irq.c +0
-0
drivers/gpu/drm/i915/i915_irq.c __i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe, · line 509
Quoted 9 lines
drivers/gpu/drm/i915/i915_irq.c +4
-2@@ -503,8 +503,10 @@ __i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock); -if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , + pipe, enable_mask, status_mask))
pipe_name(pipe)?
Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c +0
-0return ;if ((pipestat & enable_mask) == enable_mask)
drivers/gpu/drm/i915/i915_irq.c __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe, · line 536
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +4
-2@@ -527,8 +529,10 @@ __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock); -if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , + pipe, enable_mask, status_mask))return ;
Ditto.
Quoted 9 lines
drivers/gpu/drm/i915/i915_irq.c +0
-0if ((pipestat & enable_mask) ==0 )Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 5/7 drm/i915: Provide a bit more info when pipestat bits are wrong
From: Ville Syrjälä <[email protected]>
Print the enable_mask and status_mask from __i915_{enable,disable}_pipestat() when the caller has messed them up somehow.
v2: Use pipe_name() (Damien)
Fix a typo in the commit message
--- drivers/gpu/drm/i915/i915_irq.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +8 -4
@@ -503,8 +503,10 @@ __i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock); -if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , +pipe_name (pipe), enable_mask, status_mask))return ;if ((pipestat & enable_mask) == enable_mask)
@@ -527,8 +529,10 @@ __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock); -if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , +pipe_name (pipe), enable_mask, status_mask))return ;if ((pipestat & enable_mask) ==0 )
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v2 5/7] drm/i915: Provide a bit more info when pipestat bits are wrong
Quoted 11 lines · On Thu, Apr 03, 2014 at 01:28:33PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Print the
enable_maskandstatus_maskfrom __i915_{enable,disable}_pipestat() when the caller has messed them up somehow.v2: Use
pipe_name()(Damien)
Fix a typo in the commit messageReviewed-by Jesse Barnes <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
Quoted 37 lines
--- drivers/gpu/drm/i915/i915_irq.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/i915_irq.c +8
-4@@ -503,8 +503,10 @@ __i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock); -if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , +pipe_name (pipe), enable_mask, status_mask))return ;if ((pipestat & enable_mask) == enable_mask)@@ -527,8 +529,10 @@ __i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,assert_spin_locked (&dev_priv->irq_lock); -if (WARN_ON_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || - status_mask & ~PIPESTAT_INT_STATUS_MASK )) +if (WARN_ONCE (enable_mask & ~PIPESTAT_INT_ENABLE_MASK || + status_mask & ~PIPESTAT_INT_STATUS_MASK , +"pipe %c: enable_mask=0x%x, status_mask=0x%x\n" , +pipe_name (pipe), enable_mask, status_mask))return ;if ((pipestat & enable_mask) ==0 )Signature · 1 line
1.8.3.2
Daniel Vetter
AppliedRe: [PATCH v2 5/7] drm/i915: Provide a bit more info when pipestat bits are wrong
Quoted 7 lines · Damien Lespiau
Quoted 6 lines · On Thu, Apr 03, 2014 at 01:28:33PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Print the
enable_maskandstatus_maskfrom __i915_{enable,disable}_pipestat() when the caller has messed them up somehow.
Quoted 7 lines
Quoted 5 lines
v2: Use
pipe_name()(Damien)
Fix a typo in the commit messageReviewed-by Jesse Barnes <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>Reviewed-by Damien Lespiau <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 6/7 drm/i915: Fix framecount offset
In reply to [email protected]From: Rafael Barbalho <[email protected]>
The framecount register was still using the old PIPE macro instead of the new PIPE2 macro
--- drivers/gpu/drm/i915/i915_reg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +3 -3
@@ -3623,9 +3623,9 @@ enum punit_power_well {#define PIPE_PIXEL_MASK 0x00ffffff#define PIPE_PIXEL_SHIFT 0/* GM45+ just has to be different */ -#define _PIPEA_FRMCOUNT_GM45 (dev_priv->info.display_mmio_offset + 0x70040) -#define _PIPEA_FLIPCOUNT_GM45 (dev_priv->info.display_mmio_offset + 0x70044) -#define PIPE_FRMCOUNT_GM45 (pipe) _PIPE(pipe, _PIPEA_FRMCOUNT_GM45, _PIPEB_FRMCOUNT_GM45) +#define _PIPEA_FRMCOUNT_GM45 0x70040 +#define _PIPEA_FLIPCOUNT_GM45 0x70044 +#define PIPE_FRMCOUNT_GM45 (pipe) _PIPE2(pipe, _PIPEA_FRMCOUNT_GM45)/* Cursor A & B regs */ #define _CURACNTR (dev_priv->info.display_mmio_offset + 0x70080)
Signature · 1 line
1.8.3.2
Re: [PATCH 6/7] drm/i915: Fix framecount offset
Quoted 17 lines · On Mon, 31 Mar 2014 18:21:29 +0300 [email protected] wrote:
From: Rafael Barbalho <[email protected]>
The framecount register was still using the old PIPE macro instead of the new PIPE2 macro
Signed-off-by Rafael Barbalho <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -3623,9 +3623,9 @@ enum punit_power_well {#define PIPE_PIXEL_MASK 0x00ffffff#define PIPE_PIXEL_SHIFT 0
drivers/gpu/drm/i915/i915_reg.h enum punit_power_well { · line 3631
Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +3
-3/* GM45+ just has to be different */ -#define _PIPEA_FRMCOUNT_GM45 (dev_priv->info.display_mmio_offset + 0x70040) -#define _PIPEA_FLIPCOUNT_GM45 (dev_priv->info.display_mmio_offset + 0x70044) -#define PIPE_FRMCOUNT_GM45 (pipe) _PIPE(pipe, _PIPEA_FRMCOUNT_GM45, _PIPEB_FRMCOUNT_GM45) +#define _PIPEA_FRMCOUNT_GM45 0x70040 +#define _PIPEA_FLIPCOUNT_GM45 0x70044 +#define PIPE_FRMCOUNT_GM45 (pipe) _PIPE2(pipe, _PIPEA_FRMCOUNT_GM45)/* Cursor A & B regs */ #define _CURACNTR (dev_priv->info.display_mmio_offset + 0x70080)
Oh fun.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Re: [PATCH 6/7] drm/i915: Fix framecount offset
Quoted 28 lines · Jesse Barnes
Quoted 25 lines · On Mon, 31 Mar 2014 18:21:29 +0300 [email protected] wrote:
From: Rafael Barbalho <[email protected]>
The framecount register was still using the old PIPE macro instead of the new PIPE2 macro
Signed-off-by Rafael Barbalho <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_reg.h +3
-3@@ -3623,9 +3623,9 @@ enum punit_power_well {#define PIPE_PIXEL_MASK 0x00ffffff#define PIPE_PIXEL_SHIFT 0/* GM45+ just has to be different */ -#define _PIPEA_FRMCOUNT_GM45 (dev_priv->info.display_mmio_offset + 0x70040) -#define _PIPEA_FLIPCOUNT_GM45 (dev_priv->info.display_mmio_offset + 0x70044) -#define PIPE_FRMCOUNT_GM45 (pipe) _PIPE(pipe, _PIPEA_FRMCOUNT_GM45, _PIPEB_FRMCOUNT_GM45) +#define _PIPEA_FRMCOUNT_GM45 0x70040 +#define _PIPEA_FLIPCOUNT_GM45 0x70044 +#define PIPE_FRMCOUNT_GM45 (pipe) _PIPE2(pipe, _PIPEA_FRMCOUNT_GM45)
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h enum punit_power_well { · line 3631
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0/* Cursor A & B regs */ #define _CURACNTR (dev_priv->info.display_mmio_offset + 0x70080)Oh fun.
Reviewed-by Jesse Barnes <[email protected]>
I've merged all the patches Jesse reviewed from this series, expect the one Damien has a bikeshed pending.
Thanks, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Re: [PATCH 6/7] drm/i915: Fix framecount offset
Quoted 2 lines · Daniel Vetter
I've merged all the patches Jesse reviewed from this series, expect the one Damien has a bikeshed pending.
It wasn't bikeshedding, we were printing "%c",0 instead of "%c",'A' :)
Signature · 1 line
Damien
Re: [PATCH 6/7] drm/i915: Fix framecount offset
Quoted 5 lines · Damien Lespiau
Quoted 2 lines · Daniel Vetter
I've merged all the patches Jesse reviewed from this series, expect the one Damien has a bikeshed pending.
It wasn't bikeshedding, we were printing "%c",0 instead of "%c",'A' :)
Oh, didn't spot that finesse, thought it was a %i, pipe. That's indeed not a bikeshed, sorry for tacking the wrong label onto your review ;-)
Cheers, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 7/7 drm/i915: Use enum plane instaad of numbers
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Change the update_plane() plane checks to use enum plane, and also fix up the error message to say something that's not total nonsense.
FIXME killing the checks entirely is probably a better idea
--- drivers/gpu/drm/i915/intel_display.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +7 -7
@@ -2167,11 +2167,11 @@ static int i9xx_update_primary_plane(struct drm_crtc *crtc,u32 reg;switch (plane) { -case 0 : -case 1 : +case PLANE_A : +case PLANE_B :break ;default : -DRM_ERROR ("Can't update plane %c in SAREA\n" ,plane_name (plane)); +DRM_ERROR ("Can't update plane %c\n" ,plane_name (plane));return -EINVAL ; }
@@ -2268,12 +2268,12 @@ static int ironlake_update_primary_plane(struct drm_crtc *crtc,u32 reg;switch (plane) { -case 0 : -case 1 : -case 2 : +case PLANE_A : +case PLANE_B : +case PLANE_C :break ;default : -DRM_ERROR ("Can't update plane %c in SAREA\n" ,plane_name (plane)); +DRM_ERROR ("Can't update plane %c\n" ,plane_name (plane));return -EINVAL ; }
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 7/7] drm/i915: Use enum plane instaad of numbers
Quoted 7 lines · On Mon, Mar 31, 2014 at 06:21:30PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Change the
update_plane()plane checks to use enum plane, and also fix up the error message to say something that's not total nonsense.FIXME killing the checks entirely is probably a better idea
At least killing the totally outdated SAREA comment would be good ;-) But yeah I really don't see much point in this, especially since we'll happily frob plane C on ilk/snb despite that we're only supporting it on ivb+ really.
Looking through git history with git blame it seems like this went defunct somewhere in the large modesetting rewrite. Or even earlier ... in any case very confusing history and ripe for the bin.
-Daniel
Quoted 49 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/intel_display.c +7
-7@@ -2167,11 +2167,11 @@ static int i9xx_update_primary_plane(struct drm_crtc *crtc,u32 reg;switch (plane) { -case 0 : -case 1 : +case PLANE_A : +case PLANE_B :break ;default : -DRM_ERROR ("Can't update plane %c in SAREA\n" ,plane_name (plane)); +DRM_ERROR ("Can't update plane %c\n" ,plane_name (plane));return -EINVAL ; }@@ -2268,12 +2268,12 @@ static int ironlake_update_primary_plane(struct drm_crtc *crtc,u32 reg;switch (plane) { -case 0 : -case 1 : -case 2 : +case PLANE_A : +case PLANE_B : +case PLANE_C :break ;default : -DRM_ERROR ("Can't update plane %c in SAREA\n" ,plane_name (plane)); +DRM_ERROR ("Can't update plane %c\n" ,plane_name (plane));return -EINVAL ; }Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Re: [PATCH 7/7] drm/i915: Use enum plane instaad of numbers
Quoted 9 lines · Daniel Vetter
Quoted 7 lines · On Mon, Mar 31, 2014 at 06:21:30PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Change the
update_plane()plane checks to use enum plane, and also fix up the error message to say something that's not total nonsense.FIXME killing the checks entirely is probably a better idea
Quoted 8 lines
At least killing the totally outdated SAREA comment would be good ;-) But yeah I really don't see much point in this, especially since we'll happily frob plane C on ilk/snb despite that we're only supporting it on ivb+ really.
Looking through git history with git blame it seems like this went defunct somewhere in the large modesetting rewrite. Or even earlier ... in any case very confusing history and ripe for the bin.
Forgotten to add: The actually still working "can we update SAREA?" test is in intel_crtc_update_sarea. That should be mentioned in the commit message.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 1/1 drm/i915: Kill crtc->plane checks from the primary plane update hooks
From: Ville Syrjälä <[email protected]>
These were apparently meant to protect the SAREA which only has room for two pipes, but things clearly went a bit wonky when first the .update_plane() hooks were split up and then pipe C got introduced.
The checks actually protecting the SAREA live in intel_crtc_update_sarea() these days, so the checks in the primary plane update hooks are just historical leftovers which are to be eliminated.
--- drivers/gpu/drm/i915/intel_display.c | 19 ------------------- 1 file changed, 19 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -19
@@ -2166,15 +2166,6 @@ static int i9xx_update_primary_plane(struct drm_crtc *crtc,u32 dspcntr;u32 reg; -switch (plane) { -case 0 : -case 1 : -break ; -default : -DRM_ERROR ("Can't update plane %c in SAREA\n" ,plane_name (plane)); -return -EINVAL ; - } - intel_fb =to_intel_framebuffer (fb); obj = intel_fb->obj;
@@ -2267,16 +2258,6 @@ static int ironlake_update_primary_plane(struct drm_crtc *crtc,u32 dspcntr;u32 reg; -switch (plane) { -case 0 : -case 1 : -case 2 : -break ; -default : -DRM_ERROR ("Can't update plane %c in SAREA\n" ,plane_name (plane)); -return -EINVAL ; - } - intel_fb =to_intel_framebuffer (fb); obj = intel_fb->obj;
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedRe: [PATCH] drm/i915: Kill crtc->plane checks from the primary plane update hooks
Quoted 7 lines · On Mon, Mar 31, 2014 at 09:29:41PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
These were apparently meant to protect the SAREA which only has room for two pipes, but things clearly went a bit wonky when first the .update_plane() hooks were split up and then pipe C got introduced.
Quoted 6 lines
The checks actually protecting the SAREA live in
intel_crtc_update_sarea()these days, so the checks in the primary plane update hooks are just historical leftovers which are to be eliminated.Signed-off-by Ville Syrjälä <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch