Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Wu Fengguang
On Thu, Nov 10, 2011 at 03:55:22PM +0800, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 03:33:50PM +0800, Wu Fengguang wrote: Wow I reproduced the bug and got a very interesting dmesg: gfx =[ 4561.287980] [drm:intel_write_eld], ELD on [CONNECTOR:12:HDMI-A-2], [ENCODER:11:TMDS-11]

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Christopher White
On 11/10/11 8:55 AM, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 03:33:50PM +0800, Wu Fengguang wrote: Wow I reproduced the bug and got a very interesting dmesg: gfx = [ 4561.287980] [drm:intel_write_eld], ELD on [CONNECTOR:12:HDMI-A-2], [ENCODER:11:TMDS-11] gfx = [

Re: [Intel-gfx] [PATCH v3] drm/i915: Honor SSC quirk table over the default, unless set by user

2011-11-10 Thread Michel Alexandre Salim
On Wed, 2011-11-09 at 10:07 -0800, Keith Packard wrote: On Wed, 09 Nov 2011 17:30:29 +0100, Michel Alexandre Salim sali...@fedoraproject.org wrote: Additional note: while I've not touched the line since it does not affect me, it seems that i915_panel_use_ssc *cannot* be less than 0 since

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Christopher White
On 11/10/11 12:22 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:00:53 +0100, Christopher White wrote: On 11/10/11 9:55 AM, Christopher White wrote: On 11/10/11 8:55 AM, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 03:33:50PM +0800, Wu Fengguang wrote: Wow I reproduced the bug and got a very

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Takashi Iwai
At Thu, 10 Nov 2011 12:50:11 +0100, Christopher White wrote: On 11/10/11 12:22 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:00:53 +0100, Christopher White wrote: On 11/10/11 9:55 AM, Christopher White wrote: On 11/10/11 8:55 AM, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 03:33:50PM

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Christopher White
On 11/10/11 12:53 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:50:11 +0100, Christopher White wrote: On 11/10/11 12:22 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:00:53 +0100, Christopher White wrote: On 11/10/11 9:55 AM, Christopher White wrote: On 11/10/11 8:55 AM, Wu Fengguang wrote:

[Intel-gfx] [PATCH] drm/i915: prevent division by zero when asking for chipset power

2011-11-10 Thread Eugeni Dodonov
This prevents an in-kernel division by zero which happens when we are asking for i915_chipset_val too quickly, or within a race condition between the power monitoring thread and userspace accesses via debugfs. The issue can be reproduced easily via the following command: while ``; do cat

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Wu Fengguang
On Thu, Nov 10, 2011 at 07:50:11PM +0800, Christopher White wrote: On 11/10/11 12:22 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:00:53 +0100, Christopher White wrote: On 11/10/11 9:55 AM, Christopher White wrote: On 11/10/11 8:55 AM, Wu Fengguang wrote: On Thu, Nov 10, 2011 at

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Christopher White
On 11/10/11 1:56 PM, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 07:50:11PM +0800, Christopher White wrote: On 11/10/11 12:22 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:00:53 +0100, Christopher White wrote: On 11/10/11 9:55 AM, Christopher White wrote: On 11/10/11 8:55 AM, Wu Fengguang

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Takashi Iwai
At Thu, 10 Nov 2011 13:39:00 +0100, Christopher White wrote: On 11/10/11 12:53 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:50:11 +0100, Christopher White wrote: On 11/10/11 12:22 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:00:53 +0100, Christopher White wrote: On 11/10/11 9:55

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Wu Fengguang
On Thu, Nov 10, 2011 at 09:01:24PM +0800, Christopher White wrote: On 11/10/11 1:56 PM, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 07:50:11PM +0800, Christopher White wrote: On 11/10/11 12:22 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:00:53 +0100, Christopher White wrote: On

[Intel-gfx] [PATCH 0/9] gpu hang and swizzle patches

2011-11-10 Thread Daniel Vetter
Hi all, This is a bit a mixed pile, but I've used all the earlier patches to test the gen6+ swizzling patch and I like to send out patch series somewhat resembling the setup I've tested them in. Patches 1-2 refactor our debugfs code a bit. Patches 3-5 implement a debugfs interface to simulate a

[Intel-gfx] [PATCH 1/9] drm/i915: refactor debugfs open function

2011-11-10 Thread Daniel Vetter
Only forcewake has an open with special semantics, the other r/w debugfs only assign the file private pointer. Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/i915/i915_debugfs.c | 26 +- 1 files changed, 5 insertions(+), 21 deletions(-) diff

[Intel-gfx] [PATCH 2/9] drm/i915: refactor debugfs create functions

2011-11-10 Thread Daniel Vetter
All r/w debugfs files are created equal. v2: Add some newlines to make the code easier on the eyes as requested by Ben Widawsky. Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/i915/i915_debugfs.c | 55 +++--- 1 files changed, 18

[Intel-gfx] [PATCH 3/9] drm/i915: add interface to simulate gpu hangs

2011-11-10 Thread Daniel Vetter
gpu reset is a very important piece of our infrastructure. Unfortunately we only really it test by actually hanging the gpu, which often has bad side-effects for the entire system. And the gpu hang handling code is one of the rather complicated pieces of code we have, consisting of - hang

[Intel-gfx] [PATCH 4/9] drm/i915: rework dev-first_error locking

2011-11-10 Thread Daniel Vetter
- reduce the irq disabled section, even for a debugfs file this was way too long. - protect readers of the captured error state from concurrent freeing of the same by holding dev-struct_mutex. - always disable irqs when taking the lock. Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch ---

[Intel-gfx] [PATCH 5/9] drm/i915: destroy existing error_state when simulating a gpu hang

2011-11-10 Thread Daniel Vetter
This way we can simulate a bunch of gpu hangs and run the error_state capture code every time (without the need to reload the module). Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/i915/i915_debugfs.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff

[Intel-gfx] [PATCH 6/9] drm/i915: fix swizzle detection for gen3

2011-11-10 Thread Daniel Vetter
It looks like the desktop variants of i915 and i945 also have the DCC register to control dram channel interleave and cpu side bit6 swizzling. Unfurnately internal Cspec/ConfigDB documentation for these ancient chips have already been dropped and there seem to be no archives. Also somebody

[Intel-gfx] [PATCH 8/9] drm/i915: add gen6+ registers to i915_swizzle_info

2011-11-10 Thread Daniel Vetter
Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/i915/i915_debugfs.c | 13 + drivers/gpu/drm/i915/i915_reg.h | 31 +++ 2 files changed, 44 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c

[Intel-gfx] [PATCH 7/9] drm/i915: add debugfs file for swizzling information

2011-11-10 Thread Daniel Vetter
This will also come handy for the gen6+ swizzling support, where the driver is supposed to control swizzling depending upon dram configuration. v2: CxDRB3 are 16 bit regs! Noticed by Chris Wilson. Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/i915/i915_debugfs.c | 50

[Intel-gfx] [PATCH 9/9] drm/i915: swizzling support for snb/ivb

2011-11-10 Thread Daniel Vetter
We have to do this manually. Somebody had a Great Idea. Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch --- drivers/gpu/drm/i915/i915_dma.c|2 +- drivers/gpu/drm/i915/i915_drv.c|4 +++- drivers/gpu/drm/i915/i915_drv.h|3 ++- drivers/gpu/drm/i915/i915_gem.c

Re: [Intel-gfx] [PATCH] drm/i915: prevent division by zero when asking for chipset power

2011-11-10 Thread Chris Wilson
On Thu, 10 Nov 2011 10:51:26 -0200, Eugeni Dodonov eugeni.dodo...@intel.com wrote: This prevents an in-kernel division by zero which happens when we are asking for i915_chipset_val too quickly, or within a race condition between the power monitoring thread and userspace accesses via debugfs.

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Christopher White
On 11/10/11 2:17 PM, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 09:01:24PM +0800, Christopher White wrote: On 11/10/11 1:56 PM, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 07:50:11PM +0800, Christopher White wrote: On 11/10/11 12:22 PM, Takashi Iwai wrote: At Thu, 10 Nov 2011 12:00:53

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Takashi Iwai
At Thu, 10 Nov 2011 21:17:53 +0800, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 09:01:24PM +0800, Christopher White wrote: On 11/10/11 1:56 PM, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 07:50:11PM +0800, Christopher White wrote: On 11/10/11 12:22 PM, Takashi Iwai wrote: At Thu, 10

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Wu Fengguang
Got the delay - it's 72.986623-72.747632 = 239ms. [ 72.739944] HDMI hot plug event: Codec=3 Pin=6 Presence_Detect=1 ELD_Valid=0 [ 72.742541] HDMI status: Codec=3 Pin=6 Presence_Detect=1 ELD_Valid=0 [ 72.745082] HDMI hot plug event: Codec=3 Pin=6

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Wu Fengguang
On Thu, Nov 10, 2011 at 09:47:46PM +0800, Wu Fengguang wrote: Got the delay - it's 72.986623-72.747632 = 239ms. [ 72.739944] HDMI hot plug event: Codec=3 Pin=6 Presence_Detect=1 ELD_Valid=0 [ 72.742541] HDMI status: Codec=3 Pin=6 Presence_Detect=1

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Takashi Iwai
At Thu, 10 Nov 2011 21:51:50 +0800, Wu Fengguang wrote: So maybe the hardware is in some state that is unable to provide the real ELD content? That's my guess as well. I think the hardware may still be doing some form of data negotiation with the HDMI display device at that

[Intel-gfx] [PATCH] drm/i915: prevent division by zero when asking for chipset power

2011-11-10 Thread Eugeni Dodonov
This prevents an in-kernel division by zero which happens when we are asking for i915_chipset_val too quickly, or within a race condition between the power monitoring thread and userspace accesses via debugfs. The issue can be reproduced easily via the following command: while ``; do cat

[Intel-gfx] [PATCH] drm/i915: fix swizzle detection for gen3

2011-11-10 Thread Daniel Vetter
It looks like the desktop variants of i915 and i945 also have the DCC register to control dram channel interleave and cpu side bit6 swizzling. Unfortunately internal Cspec/ConfigDB documentation for these ancient chips have already been dropped and there seem to be no archives. Also somebody

[Intel-gfx] [PATCH] drm/i915: add debugfs file for swizzling information

2011-11-10 Thread Daniel Vetter
This will also come handy for the gen6+ swizzling support, where the driver is supposed to control swizzling depending upon dram configuration. v2: CxDRB3 are 16 bit regs! Noticed by Chris Wilson. Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch --- v3: align case blocks with the switch

Re: [Intel-gfx] [PATCH 2/9] drm/i915: refactor debugfs create functions

2011-11-10 Thread Ben Widawsky
On Thu, Nov 10, 2011 at 02:18:00PM +0100, Daniel Vetter wrote: All r/w debugfs files are created equal. v2: Add some newlines to make the code easier on the eyes as requested by Ben Widawsky. Signed-Off-by: Daniel Vetter daniel.vet...@ffwll.ch Reviewed-by: Ben Widawsky b...@bwidawsk.net

Re: [Intel-gfx] Intel black screen

2011-11-10 Thread James M. Leddy
On 11/10/2011 09:12 AM, Paulo J. Matos wrote: Hi, I got a new PC DELL Vostro 360. This is an all-in-one which uses the Optimus setup. An intel GT1 (Sandybridge) couples with an Nvidia 525m. Ubuntu out of the box shows a black screen unless I add nomodeset to kernel options. That sounds a

Re: [Intel-gfx] [PATCH 0/9] gpu hang and swizzle patches

2011-11-10 Thread Chris Wilson
On Thu, 10 Nov 2011 14:17:58 +0100, Daniel Vetter daniel.vet...@ffwll.ch wrote: Hi all, This is a bit a mixed pile, but I've used all the earlier patches to test the gen6+ swizzling patch and I like to send out patch series somewhat resembling the setup I've tested them in. Patches 1-2

[Intel-gfx] [PATCH 1/2] drivers: i915: Fix BLC PWM register setup

2011-11-10 Thread Simon Que
There is an error in i915_read_blc_pwm_ctl, where the register values are not being copied correctly. BLC_PWM_CTL and BLC_PWM_CTL2 are getting mixed up. This patch fixes that so that saveBLC_PWM_CTL2 and not saveBLC_PWM_CTL is copied to the BLC_PWM_CTL2 register. Signed-off-by: Simon Que

Re: [Intel-gfx] [PATCH 2/2] drivers: i915: Default backlight PWM frequency

2011-11-10 Thread Olof Johansson
Hi, On Thu, Nov 10, 2011 at 5:50 PM, Simon Que s...@chromium.org wrote: If the firmware did not initialize the backlight PWM registers, set up a default PWM frequency of 200 Hz.  This is determined using the following formula:  freq = refclk / (128 * pwm_max) The PWM register allows the

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Wu Fengguang
On Thu, Nov 10, 2011 at 10:28:19PM +0800, Takashi Iwai wrote: At Thu, 10 Nov 2011 21:51:50 +0800, Wu Fengguang wrote: So maybe the hardware is in some state that is unable to provide the real ELD content? That's my guess as well. I think the hardware may still be doing some

[Intel-gfx] [PATCH v2] drivers: i915: Default backlight PWM frequency

2011-11-10 Thread Simon Que
If the firmware did not initialize the backlight PWM registers, set up a default PWM frequency of 200 Hz. This is determined using the following formula: freq = refclk / (128 * pwm_max) The PWM register allows the max PWM value to be set. So we want to use the formula, where freq = 200:

[Intel-gfx] i915 visual artifacts with Firefox and Thunderbird under Wine

2011-11-10 Thread Alex Henrie
Hello, I recently reported a graphics bug that occurs when running the Windows versions of Firefox and Thunderbird under Wine. The Wine developers think that this is probably a bug in the i915 driver. Could the i915 developers take a look? http://bugs.winehq.org/show_bug.cgi?id=29027 -Alex

Re: [Intel-gfx] [PATCH v5] drm/i915: pass ELD to HDMI/DP audio driver

2011-11-10 Thread Takashi Iwai
At Fri, 11 Nov 2011 10:29:25 +0800, Wu Fengguang wrote: On Thu, Nov 10, 2011 at 10:28:19PM +0800, Takashi Iwai wrote: At Thu, 10 Nov 2011 21:51:50 +0800, Wu Fengguang wrote: So maybe the hardware is in some state that is unable to provide the real ELD content?