public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/vlv: reset VLV media force wake request register
@ 2014-05-09 12:41 Jani Nikula
  2014-05-09 13:34 ` Mika Kuoppala
  2014-05-09 18:09 ` Darren Hart
  0 siblings, 2 replies; 4+ messages in thread
From: Jani Nikula @ 2014-05-09 12:41 UTC (permalink / raw)
  To: intel-gfx, Darren Hart, Imre Deak; +Cc: jani.nikula

Media force wake get hangs the machine when the system is booted without
displays attached. The assumption is that (at least some versions of)
the firmware has skipped some initialization in that case.

Empirical evidence suggests we need to reset the media force wake
request register in addition to the render one to avoid hangs.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75895
Reported-by: Imre Deak <imre.deak@intel.com>
Reported-by: Darren Hart <dvhart@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

---

Darren, a Tested-by would be much appreciated!

Thanks,
Jani.
---
 drivers/gpu/drm/i915/intel_uncore.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 76dc185793ce..27fe2df47d73 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -185,6 +185,8 @@ static void vlv_force_wake_reset(struct drm_i915_private *dev_priv)
 {
 	__raw_i915_write32(dev_priv, FORCEWAKE_VLV,
 			   _MASKED_BIT_DISABLE(0xffff));
+	__raw_i915_write32(dev_priv, FORCEWAKE_MEDIA_VLV,
+			   _MASKED_BIT_DISABLE(0xffff));
 	/* something from same cacheline, but !FORCEWAKE_VLV */
 	__raw_posting_read(dev_priv, FORCEWAKE_ACK_VLV);
 }
-- 
1.9.1

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

* Re: [PATCH] drm/i915/vlv: reset VLV media force wake request register
  2014-05-09 12:41 [PATCH] drm/i915/vlv: reset VLV media force wake request register Jani Nikula
@ 2014-05-09 13:34 ` Mika Kuoppala
  2014-05-09 18:09 ` Darren Hart
  1 sibling, 0 replies; 4+ messages in thread
From: Mika Kuoppala @ 2014-05-09 13:34 UTC (permalink / raw)
  To: intel-gfx, Darren Hart, Imre Deak; +Cc: jani.nikula

Jani Nikula <jani.nikula@intel.com> writes:

> Media force wake get hangs the machine when the system is booted without
> displays attached. The assumption is that (at least some versions of)
> the firmware has skipped some initialization in that case.
>
> Empirical evidence suggests we need to reset the media force wake
> request register in addition to the render one to avoid hangs.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75895
> Reported-by: Imre Deak <imre.deak@intel.com>
> Reported-by: Darren Hart <dvhart@linux.intel.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>
> Darren, a Tested-by would be much appreciated!
>
> Thanks,
> Jani.
> ---
>  drivers/gpu/drm/i915/intel_uncore.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 76dc185793ce..27fe2df47d73 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -185,6 +185,8 @@ static void vlv_force_wake_reset(struct drm_i915_private *dev_priv)
>  {
>  	__raw_i915_write32(dev_priv, FORCEWAKE_VLV,
>  			   _MASKED_BIT_DISABLE(0xffff));
> +	__raw_i915_write32(dev_priv, FORCEWAKE_MEDIA_VLV,
> +			   _MASKED_BIT_DISABLE(0xffff));
>  	/* something from same cacheline, but !FORCEWAKE_VLV */
>  	__raw_posting_read(dev_priv, FORCEWAKE_ACK_VLV);
>  }
> -- 
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/vlv: reset VLV media force wake request register
  2014-05-09 12:41 [PATCH] drm/i915/vlv: reset VLV media force wake request register Jani Nikula
  2014-05-09 13:34 ` Mika Kuoppala
@ 2014-05-09 18:09 ` Darren Hart
  2014-05-09 18:54   ` Jani Nikula
  1 sibling, 1 reply; 4+ messages in thread
From: Darren Hart @ 2014-05-09 18:09 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx, Imre Deak

On 5/9/14, 5:41, "Jani Nikula" <jani.nikula@intel.com> wrote:

>Media force wake get hangs the machine when the system is booted without
>displays attached. The assumption is that (at least some versions of)
>the firmware has skipped some initialization in that case.
>
>Empirical evidence suggests we need to reset the media force wake
>request register in addition to the render one to avoid hangs.
>
>Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75895
>Reported-by: Imre Deak <imre.deak@intel.com>
>Reported-by: Darren Hart <dvhart@linux.intel.com>
>Cc: stable@vger.kernel.org
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Applied to 3.14.2 and tested on MinnowBoardMax A0 hardware (BayTrail-I,
Atom E3825).

* With no display connected, the boot no longer hangs and DRM prints
sensible messages during boot:
[    5.968837] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit
banging on pin 2
[    5.988037] i915 0000:00:02.0: No connectors reported connected with
modes
[    5.995744] [drm] Cannot find any crtc or sizes - going 1024x768
[    6.004716] fbcon: inteldrmfb (fb0) is primary device
[    6.013066] Console: switching to colour frame buffer device 128x48
[    6.034147] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[    6.041168] i915 0000:00:02.0: registered panic notifier
[    6.049820] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post:
no)
[    6.058788] acpi device:30: registered as cooling_device3
[    6.065111] input: Video Bus as
/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input4
[    6.075370] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on
minor 0


* If a display is subsequently connected and X is restarted, it behaves as
expected.

* Booting with a display connected continue to work as expected.

Tested-by: Darren Hart <dvhart@linux.intel.com>

Thank you very much Jani!

-- 
Darren Hart					Open Source Technology Center
darren.hart@intel.com				            Intel Corporation

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

* Re: [PATCH] drm/i915/vlv: reset VLV media force wake request register
  2014-05-09 18:09 ` Darren Hart
@ 2014-05-09 18:54   ` Jani Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2014-05-09 18:54 UTC (permalink / raw)
  To: Darren Hart, intel-gfx, Imre Deak

On Fri, 09 May 2014, Darren Hart <dvhart@linux.intel.com> wrote:
> On 5/9/14, 5:41, "Jani Nikula" <jani.nikula@intel.com> wrote:
>
>>Media force wake get hangs the machine when the system is booted without
>>displays attached. The assumption is that (at least some versions of)
>>the firmware has skipped some initialization in that case.
>>
>>Empirical evidence suggests we need to reset the media force wake
>>request register in addition to the render one to avoid hangs.
>>
>>Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75895
>>Reported-by: Imre Deak <imre.deak@intel.com>
>>Reported-by: Darren Hart <dvhart@linux.intel.com>
>>Cc: stable@vger.kernel.org
>>Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Applied to 3.14.2 and tested on MinnowBoardMax A0 hardware (BayTrail-I,
> Atom E3825).
>
> * With no display connected, the boot no longer hangs and DRM prints
> sensible messages during boot:
> [    5.968837] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit
> banging on pin 2
> [    5.988037] i915 0000:00:02.0: No connectors reported connected with
> modes
> [    5.995744] [drm] Cannot find any crtc or sizes - going 1024x768
> [    6.004716] fbcon: inteldrmfb (fb0) is primary device
> [    6.013066] Console: switching to colour frame buffer device 128x48
> [    6.034147] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
> [    6.041168] i915 0000:00:02.0: registered panic notifier
> [    6.049820] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post:
> no)
> [    6.058788] acpi device:30: registered as cooling_device3
> [    6.065111] input: Video Bus as
> /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input4
> [    6.075370] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on
> minor 0
>
>
> * If a display is subsequently connected and X is restarted, it behaves as
> expected.
>
> * Booting with a display connected continue to work as expected.
>
> Tested-by: Darren Hart <dvhart@linux.intel.com>
>
> Thank you very much Jani!

Pushed to -fixes. Thanks for testing, Darren, and thanks for review,
Mika.

BR,
Jani.



>
> -- 
> Darren Hart					Open Source Technology Center
> darren.hart@intel.com				            Intel Corporation
>
>
>
> _______________________________________________
> 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] 4+ messages in thread

end of thread, other threads:[~2014-05-09 18:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09 12:41 [PATCH] drm/i915/vlv: reset VLV media force wake request register Jani Nikula
2014-05-09 13:34 ` Mika Kuoppala
2014-05-09 18:09 ` Darren Hart
2014-05-09 18:54   ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox