All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port
@ 2014-04-04 23:12 Jesse Barnes
  2014-04-04 23:12 ` [PATCH 2/6] drm/i915: remove unnecessary delays in intel_dp_link_down Jesse Barnes
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Jesse Barnes @ 2014-04-04 23:12 UTC (permalink / raw)
  To: intel-gfx

Some platforms may not have it, and enumerating it is both confusing and
time consuming due to the hotplug and DDC probing.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3697433..6a6406f 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10678,7 +10678,7 @@ static void intel_setup_outputs(struct drm_device *dev)
 
 	intel_lvds_init(dev);
 
-	if (!IS_ULT(dev))
+	if (!IS_ULT(dev) && dev_priv->vbt.int_crt_support)
 		intel_crt_init(dev);
 
 	if (HAS_DDI(dev)) {
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/6] drm/i915: remove unnecessary delays in intel_dp_link_down
  2014-04-04 23:12 [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Jesse Barnes
@ 2014-04-04 23:12 ` Jesse Barnes
  2014-04-05  6:26   ` Chris Wilson
  2014-04-04 23:12 ` [PATCH 3/6] drm/i915: warn when a vblank wait times out Jesse Barnes
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Jesse Barnes @ 2014-04-04 23:12 UTC (permalink / raw)
  To: intel-gfx

The reason for these is lost in the mists of time, and they don't seem
to be necessary anymore, so drop them.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e48d47c..7642415 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2756,9 +2756,6 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 	}
 	POSTING_READ(intel_dp->output_reg);
 
-	/* We don't really know why we're doing this */
-	intel_wait_for_vblank(dev, intel_crtc->pipe);
-
 	if (HAS_PCH_IBX(dev) &&
 	    I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) {
 		struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
@@ -2790,7 +2787,6 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 	DP &= ~DP_AUDIO_OUTPUT_ENABLE;
 	I915_WRITE(intel_dp->output_reg, DP & ~DP_PORT_EN);
 	POSTING_READ(intel_dp->output_reg);
-	msleep(intel_dp->panel_power_down_delay);
 }
 
 static bool
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 3/6] drm/i915: warn when a vblank wait times out
  2014-04-04 23:12 [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Jesse Barnes
  2014-04-04 23:12 ` [PATCH 2/6] drm/i915: remove unnecessary delays in intel_dp_link_down Jesse Barnes
@ 2014-04-04 23:12 ` Jesse Barnes
  2014-04-05  6:29   ` Chris Wilson
  2014-04-04 23:12 ` [PATCH 4/6] drm/i915: don't set sink DPMS status on eDP Jesse Barnes
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Jesse Barnes @ 2014-04-04 23:12 UTC (permalink / raw)
  To: intel-gfx

This always indicates a bug somewhere.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6a6406f..c039f34 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -765,7 +765,7 @@ static void g4x_wait_for_vblank(struct drm_device *dev, int pipe)
 	frame = I915_READ(frame_reg);
 
 	if (wait_for(I915_READ_NOTRACE(frame_reg) != frame, 50))
-		DRM_DEBUG_KMS("vblank wait timed out\n");
+		WARN(1, "vblank wait timed out\n");
 }
 
 /**
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 4/6] drm/i915: don't set sink DPMS status on eDP
  2014-04-04 23:12 [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Jesse Barnes
  2014-04-04 23:12 ` [PATCH 2/6] drm/i915: remove unnecessary delays in intel_dp_link_down Jesse Barnes
  2014-04-04 23:12 ` [PATCH 3/6] drm/i915: warn when a vblank wait times out Jesse Barnes
@ 2014-04-04 23:12 ` Jesse Barnes
  2014-04-07  8:36   ` Jani Nikula
  2014-04-04 23:12 ` [PATCH 5/6] drm/i915/vlv: move DP enable after plane/pipe enable per latest spec Jesse Barnes
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Jesse Barnes @ 2014-04-04 23:12 UTC (permalink / raw)
  To: intel-gfx

This only applies to external sinks.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_dp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 7642415..df7cc11 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1783,7 +1783,8 @@ static void intel_disable_dp(struct intel_encoder *encoder)
 	 * ensure that we have vdd while we switch off the panel. */
 	intel_edp_panel_vdd_on(intel_dp);
 	intel_edp_backlight_off(intel_dp);
-	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
+	if (!is_edp(intel_dp))
+		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
 	intel_edp_panel_off(intel_dp);
 
 	/* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */
@@ -1821,7 +1822,8 @@ static void intel_enable_dp(struct intel_encoder *encoder)
 		return;
 
 	intel_edp_panel_vdd_on(intel_dp);
-	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
+	if (!is_edp(intel_dp))
+		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
 	intel_dp_start_link_train(intel_dp);
 	intel_edp_panel_on(intel_dp);
 	edp_panel_vdd_off(intel_dp, true);
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 5/6] drm/i915/vlv: move DP enable after plane/pipe enable per latest spec
  2014-04-04 23:12 [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Jesse Barnes
                   ` (2 preceding siblings ...)
  2014-04-04 23:12 ` [PATCH 4/6] drm/i915: don't set sink DPMS status on eDP Jesse Barnes
@ 2014-04-04 23:12 ` Jesse Barnes
  2014-04-04 23:12 ` [PATCH 6/6] drm/i915/vlv: re-order TX lane reset " Jesse Barnes
  2014-05-29 21:47 ` [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Ben Widawsky
  5 siblings, 0 replies; 20+ messages in thread
From: Jesse Barnes @ 2014-04-04 23:12 UTC (permalink / raw)
  To: intel-gfx

The spec changed the order awhile back to put the ports at the end
again, but we never updated.  Things seem to work ok either way, but
apparently there are some failures fixed by the new order, so let's just
go ahead and do it.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_dp.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index df7cc11..98cf24f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1842,7 +1842,23 @@ static void g4x_enable_dp(struct intel_encoder *encoder)
 static void vlv_enable_dp(struct intel_encoder *encoder)
 {
 	struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
+	struct intel_digital_port *dport = dp_to_dig_port(intel_dp);
+	struct drm_device *dev = encoder->base.dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	uint32_t dp_reg = I915_READ(intel_dp->output_reg);
+
+	if (WARN_ON(dp_reg & DP_PORT_EN))
+		return;
 
+	intel_edp_panel_vdd_on(intel_dp);
+	intel_dp_start_link_train(intel_dp);
+	if (!is_edp(intel_dp))
+		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
+	intel_edp_panel_on(intel_dp);
+	vlv_wait_port_ready(dev_priv, dport);
+	edp_panel_vdd_off(intel_dp, true);
+	intel_dp_complete_link_train(intel_dp);
+	intel_dp_stop_link_train(intel_dp);
 	intel_edp_backlight_on(intel_dp);
 }
 
@@ -1888,10 +1904,6 @@ static void vlv_pre_enable_dp(struct intel_encoder *encoder)
 		intel_dp_init_panel_power_sequencer_registers(dev, intel_dp,
 							      &power_seq);
 	}
-
-	intel_enable_dp(encoder);
-
-	vlv_wait_port_ready(dev_priv, dport);
 }
 
 static void vlv_dp_pre_pll_enable(struct intel_encoder *encoder)
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 6/6] drm/i915/vlv: re-order TX lane reset per latest spec
  2014-04-04 23:12 [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Jesse Barnes
                   ` (3 preceding siblings ...)
  2014-04-04 23:12 ` [PATCH 5/6] drm/i915/vlv: move DP enable after plane/pipe enable per latest spec Jesse Barnes
@ 2014-04-04 23:12 ` Jesse Barnes
  2014-05-29 21:47 ` [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Ben Widawsky
  5 siblings, 0 replies; 20+ messages in thread
From: Jesse Barnes @ 2014-04-04 23:12 UTC (permalink / raw)
  To: intel-gfx

This is supposed to fix some eDP PPS issues on some platforms.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_dp.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 98cf24f..34d01be 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1844,6 +1844,7 @@ static void vlv_enable_dp(struct intel_encoder *encoder)
 	struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
 	struct intel_digital_port *dport = dp_to_dig_port(intel_dp);
 	struct drm_device *dev = encoder->base.dev;
+	struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	uint32_t dp_reg = I915_READ(intel_dp->output_reg);
 
@@ -1855,6 +1856,11 @@ static void vlv_enable_dp(struct intel_encoder *encoder)
 	if (!is_edp(intel_dp))
 		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
 	intel_edp_panel_on(intel_dp);
+	mutex_lock(&dev_priv->dpio_lock);
+	vlv_dpio_write(dev_priv, intel_crtc->pipe, VLV_PCS_DW0(dport->port),
+			 DPIO_PCS_TX_LANE2_RESET |
+			 DPIO_PCS_TX_LANE1_RESET);
+	mutex_unlock(&dev_priv->dpio_lock);
 	vlv_wait_port_ready(dev_priv, dport);
 	edp_panel_vdd_off(intel_dp, true);
 	intel_dp_complete_link_train(intel_dp);
@@ -1918,9 +1924,6 @@ static void vlv_dp_pre_pll_enable(struct intel_encoder *encoder)
 
 	/* Program Tx lane resets to default */
 	mutex_lock(&dev_priv->dpio_lock);
-	vlv_dpio_write(dev_priv, pipe, VLV_PCS_DW0(port),
-			 DPIO_PCS_TX_LANE2_RESET |
-			 DPIO_PCS_TX_LANE1_RESET);
 	vlv_dpio_write(dev_priv, pipe, VLV_PCS_DW1(port),
 			 DPIO_PCS_CLK_CRI_RXEB_EIOS_EN |
 			 DPIO_PCS_CLK_CRI_RXDIGFILTSG_EN |
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/6] drm/i915: remove unnecessary delays in intel_dp_link_down
  2014-04-04 23:12 ` [PATCH 2/6] drm/i915: remove unnecessary delays in intel_dp_link_down Jesse Barnes
@ 2014-04-05  6:26   ` Chris Wilson
  2014-04-11 21:25     ` [PATCH 1/2] drm/i915: remove unexplained vblank wait in the DP off code Jesse Barnes
  0 siblings, 1 reply; 20+ messages in thread
From: Chris Wilson @ 2014-04-05  6:26 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Fri, Apr 04, 2014 at 04:12:08PM -0700, Jesse Barnes wrote:
> The reason for these is lost in the mists of time, and they don't seem
> to be necessary anymore, so drop them.

Separate these two. The first seems to indeed be a random wait, whereas
the second appears to be a misapplication of procedure. Either one may
turn out to be still required.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/6] drm/i915: warn when a vblank wait times out
  2014-04-04 23:12 ` [PATCH 3/6] drm/i915: warn when a vblank wait times out Jesse Barnes
@ 2014-04-05  6:29   ` Chris Wilson
  2014-04-05 15:22     ` Daniel Vetter
  0 siblings, 1 reply; 20+ messages in thread
From: Chris Wilson @ 2014-04-05  6:29 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Fri, Apr 04, 2014 at 04:12:09PM -0700, Jesse Barnes wrote:
> This always indicates a bug somewhere.

We keep turning this off because we hadn't fixed all the bugs - as we
try to wait on a dead pipe. Maybe this time we won't be inundated with
WARNs...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/6] drm/i915: warn when a vblank wait times out
  2014-04-05  6:29   ` Chris Wilson
@ 2014-04-05 15:22     ` Daniel Vetter
  2014-04-05 18:52       ` Jesse Barnes
  0 siblings, 1 reply; 20+ messages in thread
From: Daniel Vetter @ 2014-04-05 15:22 UTC (permalink / raw)
  To: Chris Wilson, Jesse Barnes, intel-gfx

On Sat, Apr 05, 2014 at 07:29:22AM +0100, Chris Wilson wrote:
> On Fri, Apr 04, 2014 at 04:12:09PM -0700, Jesse Barnes wrote:
> > This always indicates a bug somewhere.
> 
> We keep turning this off because we hadn't fixed all the bugs - as we
> try to wait on a dead pipe. Maybe this time we won't be inundated with
> WARNs...

We're really early in the 3.16 cycle. If Jesse promises to chase down all
the fallout I'll happily merge this - we really need to get this done
sometimes.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/6] drm/i915: warn when a vblank wait times out
  2014-04-05 15:22     ` Daniel Vetter
@ 2014-04-05 18:52       ` Jesse Barnes
  2014-04-07  6:20         ` Daniel Vetter
  0 siblings, 1 reply; 20+ messages in thread
From: Jesse Barnes @ 2014-04-05 18:52 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Sat, 5 Apr 2014 17:22:40 +0200
Daniel Vetter <daniel@ffwll.ch> wrote:

> On Sat, Apr 05, 2014 at 07:29:22AM +0100, Chris Wilson wrote:
> > On Fri, Apr 04, 2014 at 04:12:09PM -0700, Jesse Barnes wrote:
> > > This always indicates a bug somewhere.
> > 
> > We keep turning this off because we hadn't fixed all the bugs - as we
> > try to wait on a dead pipe. Maybe this time we won't be inundated with
> > WARNs...
> 
> We're really early in the 3.16 cycle. If Jesse promises to chase down all
> the fallout I'll happily merge this - we really need to get this done
> sometimes.

It helped me find a missing backport in the Chromium tree for the
vblank code on BYT, so it's already been helpful.

Let the flood of bug reports begin!

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/6] drm/i915: warn when a vblank wait times out
  2014-04-05 18:52       ` Jesse Barnes
@ 2014-04-07  6:20         ` Daniel Vetter
  0 siblings, 0 replies; 20+ messages in thread
From: Daniel Vetter @ 2014-04-07  6:20 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Sat, Apr 05, 2014 at 11:52:38AM -0700, Jesse Barnes wrote:
> On Sat, 5 Apr 2014 17:22:40 +0200
> Daniel Vetter <daniel@ffwll.ch> wrote:
> 
> > On Sat, Apr 05, 2014 at 07:29:22AM +0100, Chris Wilson wrote:
> > > On Fri, Apr 04, 2014 at 04:12:09PM -0700, Jesse Barnes wrote:
> > > > This always indicates a bug somewhere.
> > > 
> > > We keep turning this off because we hadn't fixed all the bugs - as we
> > > try to wait on a dead pipe. Maybe this time we won't be inundated with
> > > WARNs...
> > 
> > We're really early in the 3.16 cycle. If Jesse promises to chase down all
> > the fallout I'll happily merge this - we really need to get this done
> > sometimes.
> 
> It helped me find a missing backport in the Chromium tree for the
> vblank code on BYT, so it's already been helpful.
> 
> Let the flood of bug reports begin!

Ok ;-) Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 4/6] drm/i915: don't set sink DPMS status on eDP
  2014-04-04 23:12 ` [PATCH 4/6] drm/i915: don't set sink DPMS status on eDP Jesse Barnes
@ 2014-04-07  8:36   ` Jani Nikula
  2014-04-07 14:58     ` Jesse Barnes
  0 siblings, 1 reply; 20+ messages in thread
From: Jani Nikula @ 2014-04-07  8:36 UTC (permalink / raw)
  To: Jesse Barnes, intel-gfx

On Sat, 05 Apr 2014, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> This only applies to external sinks.

[citation needed]

eDP 1.3 has SET_POWER_CAPABLE (bit 7) in in DPCD
EDP_GENERAL_CAPABILITY_REGISTER_1 (register 0x702) which indicates
whether panel power state can be controlled through DP_SET_POWER. Even
when the panel is not capable, writing to DP_SET_POWER should have no
effect on the panel.

BR,
Jani.

>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 7642415..df7cc11 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1783,7 +1783,8 @@ static void intel_disable_dp(struct intel_encoder *encoder)
>  	 * ensure that we have vdd while we switch off the panel. */
>  	intel_edp_panel_vdd_on(intel_dp);
>  	intel_edp_backlight_off(intel_dp);
> -	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
> +	if (!is_edp(intel_dp))
> +		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
>  	intel_edp_panel_off(intel_dp);
>  
>  	/* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */
> @@ -1821,7 +1822,8 @@ static void intel_enable_dp(struct intel_encoder *encoder)
>  		return;
>  
>  	intel_edp_panel_vdd_on(intel_dp);
> -	intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
> +	if (!is_edp(intel_dp))
> +		intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
>  	intel_dp_start_link_train(intel_dp);
>  	intel_edp_panel_on(intel_dp);
>  	edp_panel_vdd_off(intel_dp, true);
> -- 
> 1.8.4.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 4/6] drm/i915: don't set sink DPMS status on eDP
  2014-04-07  8:36   ` Jani Nikula
@ 2014-04-07 14:58     ` Jesse Barnes
  0 siblings, 0 replies; 20+ messages in thread
From: Jesse Barnes @ 2014-04-07 14:58 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

On Mon, 07 Apr 2014 11:36:46 +0300
Jani Nikula <jani.nikula@linux.intel.com> wrote:

> On Sat, 05 Apr 2014, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > This only applies to external sinks.
> 
> [citation needed]
> 
> eDP 1.3 has SET_POWER_CAPABLE (bit 7) in in DPCD
> EDP_GENERAL_CAPABILITY_REGISTER_1 (register 0x702) which indicates
> whether panel power state can be controlled through DP_SET_POWER. Even
> when the panel is not capable, writing to DP_SET_POWER should have no
> effect on the panel.
> 

This one comes from chromium tree.  I checked the DP spec but obviously
should have checked eDP too!

I mainly added this to get rid of some noise in the logs about aux
timeouts due to these messages.  But on eDP that turned out to be an
unrelated bug, and not due to us sending these messages after all.

So patch withdrawn...

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/2] drm/i915: remove unexplained vblank wait in the DP off code
  2014-04-05  6:26   ` Chris Wilson
@ 2014-04-11 21:25     ` Jesse Barnes
  2014-04-11 21:25       ` [PATCH 2/2] drm/i915: remove misplaced panel wait in " Jesse Barnes
                         ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Jesse Barnes @ 2014-04-11 21:25 UTC (permalink / raw)
  To: intel-gfx

I don't think this is necessary; at least it doesn't appear to be on my
BYT.  Dropping it speeds up our shutdown code a little, in some cases
resulting in faster init times.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_dp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e48d47c..728a5db 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2756,9 +2756,6 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 	}
 	POSTING_READ(intel_dp->output_reg);
 
-	/* We don't really know why we're doing this */
-	intel_wait_for_vblank(dev, intel_crtc->pipe);
-
 	if (HAS_PCH_IBX(dev) &&
 	    I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) {
 		struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/2] drm/i915: remove misplaced panel wait in DP off code
  2014-04-11 21:25     ` [PATCH 1/2] drm/i915: remove unexplained vblank wait in the DP off code Jesse Barnes
@ 2014-04-11 21:25       ` Jesse Barnes
  2014-04-12  7:03       ` [PATCH 1/2] drm/i915: remove unexplained vblank wait in the " Chris Wilson
  2014-04-17 12:21       ` Ville Syrjälä
  2 siblings, 0 replies; 20+ messages in thread
From: Jesse Barnes @ 2014-04-11 21:25 UTC (permalink / raw)
  To: intel-gfx

We do this wait elsewhere, so drop it to speed things up a bit.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_dp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 728a5db..7642415 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2787,7 +2787,6 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 	DP &= ~DP_AUDIO_OUTPUT_ENABLE;
 	I915_WRITE(intel_dp->output_reg, DP & ~DP_PORT_EN);
 	POSTING_READ(intel_dp->output_reg);
-	msleep(intel_dp->panel_power_down_delay);
 }
 
 static bool
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] drm/i915: remove unexplained vblank wait in the DP off code
  2014-04-11 21:25     ` [PATCH 1/2] drm/i915: remove unexplained vblank wait in the DP off code Jesse Barnes
  2014-04-11 21:25       ` [PATCH 2/2] drm/i915: remove misplaced panel wait in " Jesse Barnes
@ 2014-04-12  7:03       ` Chris Wilson
  2014-04-17 12:21       ` Ville Syrjälä
  2 siblings, 0 replies; 20+ messages in thread
From: Chris Wilson @ 2014-04-12  7:03 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Fri, Apr 11, 2014 at 02:25:41PM -0700, Jesse Barnes wrote:
> I don't think this is necessary; at least it doesn't appear to be on my
> BYT.  Dropping it speeds up our shutdown code a little, in some cases
> resulting in faster init times.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Also not required on my IVB.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] drm/i915: remove unexplained vblank wait in the DP off code
  2014-04-11 21:25     ` [PATCH 1/2] drm/i915: remove unexplained vblank wait in the DP off code Jesse Barnes
  2014-04-11 21:25       ` [PATCH 2/2] drm/i915: remove misplaced panel wait in " Jesse Barnes
  2014-04-12  7:03       ` [PATCH 1/2] drm/i915: remove unexplained vblank wait in the " Chris Wilson
@ 2014-04-17 12:21       ` Ville Syrjälä
  2014-04-22 19:17         ` Daniel Vetter
  2 siblings, 1 reply; 20+ messages in thread
From: Ville Syrjälä @ 2014-04-17 12:21 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Fri, Apr 11, 2014 at 02:25:41PM -0700, Jesse Barnes wrote:
> I don't think this is necessary; at least it doesn't appear to be on my
> BYT.  Dropping it speeds up our shutdown code a little, in some cases
> resulting in faster init times.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index e48d47c..728a5db 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2756,9 +2756,6 @@ intel_dp_link_down(struct intel_dp *intel_dp)
>  	}
>  	POSTING_READ(intel_dp->output_reg);
>  
> -	/* We don't really know why we're doing this */
> -	intel_wait_for_vblank(dev, intel_crtc->pipe);
> -

Maybe this was here to guarantee we send the magic five idle patterns
specified in the DP spec. But since we're going to be turning off the
port anyway I don't see why we switch to transmitting the idle pattern
at all.

I guess switching to the idle pattern might make sense for the IBX
transcoder select workaround to avoid sending some garbage on the main
link. Although we don't seem to be doing that workaround quite according
to spec. The spec says we should first disable the port, and then
re-enable it temporarily w/ transcoder A. What we do is switch the port
over to transcoder A while it's still enabled, and only then disable it.

So I guess killing the wait here is fine, but looks like the IBX
workaround stuff needs a better look. I can try to clean it up a bit.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  	if (HAS_PCH_IBX(dev) &&
>  	    I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) {
>  		struct drm_crtc *crtc = intel_dig_port->base.base.crtc;
> -- 
> 1.8.4.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/2] drm/i915: remove unexplained vblank wait in the DP off code
  2014-04-17 12:21       ` Ville Syrjälä
@ 2014-04-22 19:17         ` Daniel Vetter
  0 siblings, 0 replies; 20+ messages in thread
From: Daniel Vetter @ 2014-04-22 19:17 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

On Thu, Apr 17, 2014 at 03:21:27PM +0300, Ville Syrjälä wrote:
> On Fri, Apr 11, 2014 at 02:25:41PM -0700, Jesse Barnes wrote:
> > I don't think this is necessary; at least it doesn't appear to be on my
> > BYT.  Dropping it speeds up our shutdown code a little, in some cases
> > resulting in faster init times.
> > 
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index e48d47c..728a5db 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -2756,9 +2756,6 @@ intel_dp_link_down(struct intel_dp *intel_dp)
> >  	}
> >  	POSTING_READ(intel_dp->output_reg);
> >  
> > -	/* We don't really know why we're doing this */
> > -	intel_wait_for_vblank(dev, intel_crtc->pipe);
> > -
> 
> Maybe this was here to guarantee we send the magic five idle patterns
> specified in the DP spec. But since we're going to be turning off the
> port anyway I don't see why we switch to transmitting the idle pattern
> at all.
> 
> I guess switching to the idle pattern might make sense for the IBX
> transcoder select workaround to avoid sending some garbage on the main
> link. Although we don't seem to be doing that workaround quite according
> to spec. The spec says we should first disable the port, and then
> re-enable it temporarily w/ transcoder A. What we do is switch the port
> over to transcoder A while it's still enabled, and only then disable it.
> 
> So I guess killing the wait here is fine, but looks like the IBX
> workaround stuff needs a better look. I can try to clean it up a bit.
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port
  2014-04-04 23:12 [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Jesse Barnes
                   ` (4 preceding siblings ...)
  2014-04-04 23:12 ` [PATCH 6/6] drm/i915/vlv: re-order TX lane reset " Jesse Barnes
@ 2014-05-29 21:47 ` Ben Widawsky
  2014-06-02  8:24   ` Daniel Vetter
  5 siblings, 1 reply; 20+ messages in thread
From: Ben Widawsky @ 2014-05-29 21:47 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Fri, Apr 04, 2014 at 04:12:07PM -0700, Jesse Barnes wrote:
> Some platforms may not have it, and enumerating it is both confusing and
> time consuming due to the hotplug and DDC probing.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3697433..6a6406f 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -10678,7 +10678,7 @@ static void intel_setup_outputs(struct drm_device *dev)
>  
>  	intel_lvds_init(dev);
>  
> -	if (!IS_ULT(dev))
> +	if (!IS_ULT(dev) && dev_priv->vbt.int_crt_support)
>  		intel_crt_init(dev);
>  
>  	if (HAS_DDI(dev)) {

For the love of god, can we please rename "bits X" in the
struct bdb_general_features? That caused me endless pain. It should be
"byte 0"

Also, I guess there is a problem when the VBT is missing, and we have a
dont have a CRT on non-ULT (since the default seems to be true). This
however is no worse than the current situation AFAICT.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>

-- 
Ben Widawsky, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port
  2014-05-29 21:47 ` [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Ben Widawsky
@ 2014-06-02  8:24   ` Daniel Vetter
  0 siblings, 0 replies; 20+ messages in thread
From: Daniel Vetter @ 2014-06-02  8:24 UTC (permalink / raw)
  To: Ben Widawsky; +Cc: intel-gfx

On Thu, May 29, 2014 at 02:47:56PM -0700, Ben Widawsky wrote:
> On Fri, Apr 04, 2014 at 04:12:07PM -0700, Jesse Barnes wrote:
> > Some platforms may not have it, and enumerating it is both confusing and
> > time consuming due to the hotplug and DDC probing.
> > 
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 3697433..6a6406f 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -10678,7 +10678,7 @@ static void intel_setup_outputs(struct drm_device *dev)
> >  
> >  	intel_lvds_init(dev);
> >  
> > -	if (!IS_ULT(dev))
> > +	if (!IS_ULT(dev) && dev_priv->vbt.int_crt_support)
> >  		intel_crt_init(dev);
> >  
> >  	if (HAS_DDI(dev)) {
> 
> For the love of god, can we please rename "bits X" in the
> struct bdb_general_features? That caused me endless pain. It should be
> "byte 0"
> 
> Also, I guess there is a problem when the VBT is missing, and we have a
> dont have a CRT on non-ULT (since the default seems to be true). This
> however is no worse than the current situation AFAICT.
> 
> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-06-02  8:24 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04 23:12 [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Jesse Barnes
2014-04-04 23:12 ` [PATCH 2/6] drm/i915: remove unnecessary delays in intel_dp_link_down Jesse Barnes
2014-04-05  6:26   ` Chris Wilson
2014-04-11 21:25     ` [PATCH 1/2] drm/i915: remove unexplained vblank wait in the DP off code Jesse Barnes
2014-04-11 21:25       ` [PATCH 2/2] drm/i915: remove misplaced panel wait in " Jesse Barnes
2014-04-12  7:03       ` [PATCH 1/2] drm/i915: remove unexplained vblank wait in the " Chris Wilson
2014-04-17 12:21       ` Ville Syrjälä
2014-04-22 19:17         ` Daniel Vetter
2014-04-04 23:12 ` [PATCH 3/6] drm/i915: warn when a vblank wait times out Jesse Barnes
2014-04-05  6:29   ` Chris Wilson
2014-04-05 15:22     ` Daniel Vetter
2014-04-05 18:52       ` Jesse Barnes
2014-04-07  6:20         ` Daniel Vetter
2014-04-04 23:12 ` [PATCH 4/6] drm/i915: don't set sink DPMS status on eDP Jesse Barnes
2014-04-07  8:36   ` Jani Nikula
2014-04-07 14:58     ` Jesse Barnes
2014-04-04 23:12 ` [PATCH 5/6] drm/i915/vlv: move DP enable after plane/pipe enable per latest spec Jesse Barnes
2014-04-04 23:12 ` [PATCH 6/6] drm/i915/vlv: re-order TX lane reset " Jesse Barnes
2014-05-29 21:47 ` [PATCH 1/6] drm/i915: use VBT to determine whether to enumerate the VGA port Ben Widawsky
2014-06-02  8:24   ` Daniel Vetter

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.