Re: [Intel-gfx] Fwd: Re: Macbook Pro Retina display problems

2012-08-10 Thread Daniel Vetter
On Fri, Aug 10, 2012 at 06:49:03PM +0200, Bernhard Froemel wrote:
 Hello Daniel and Francois,
 
 apologies for posting 'out of thread'.
 
  Can you please re-grab the
  dumps?
 http://luna.vmars.tuwien.ac.at/~froemel/ird_noi915.txt
 http://luna.vmars.tuwien.ac.at/~froemel/ird_i915.txt
 http://luna.vmars.tuwien.ac.at/~froemel/ird_i915_pC.txt (short freeze,
 screen looks for a second scaled to 2/3 (black border), same
 corruption and then looks just like before)
 Also, have you seen this post by 'gschwind':
 http://ubuntuforums.org/showpost.php?p=12160766postcount=70 ?

Please test the patch at

http://www.gossamer-threads.com/lists/linux/kernel/1579401

and supply your tested-by if it works.

Thanks, Daniel

 
 For convenience reasons the patch that is attached to the forum post:
 --- linux-3.5.1.orig/drivers/gpu/drm/i915/intel_display.c 2012-08-09
 17:23:56.0 +0200
 +++ linux-3.5.1/drivers/gpu/drm/i915/intel_display.c  2012-08-09
 21:13:43.146996673 +0200
 @@ -3583,7 +3583,8 @@
 
   if (intel_encoder-type == INTEL_OUTPUT_EDP) {
   /* Use VBT settings if we have an eDP panel */
 - unsigned int edp_bpc = dev_priv-edp.bpp / 3;
 + //unsigned int edp_bpc = dev_priv-edp.bpp / 3;
 + unsigned int edp_bpc = 8;
 
   if (edp_bpc  display_bpc) {
   DRM_DEBUG_KMS(clamping display bpc (was %d) to 
 eDP (%d)\n,
 display_bpc, edp_bpc);
 
 Cheers, Bernhard
 ___
 Intel-gfx mailing list
 Intel-gfx@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] Fwd: Re: Macbook Pro Retina display problems

2012-08-07 Thread Francois Rigaut

Daniel,

nope, the hack didn't succeed. No apparent change.
Francois

On Tue 07 Aug 2012 05:31:25 EST, Daniel Vetter wrote:

On Mon, Aug 06, 2012 at 11:40:36PM +1000, Francois Rigaut wrote:

Daniel,

On Mon, Aug 6, 2012 at 7:17 PM, Daniel Vetter dan...@ffwll.ch
mailto:dan...@ffwll.ch wrote:

On Mon, Aug 6, 2012 at 10:59 AM, Francois Rigaut frig...@gmail.com
mailto:frig...@gmail.com wrote:
  Daniel,
 
 
  my bad for the dmesg. It's there:
 

http://maumae.net/retina/intel_corrupted_drm_debug/dmesg_intel_corrupted_drm_debug
 
  I took pictures with a camera, and uploaded them at
  Small 800x600 versions:
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_right_small.jpg
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_whole_screen_small.jpg
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
  full resolution versions:
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left.jpg
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_right.jpg
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_whole_screen.jpg
 

http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 
  Otherwise, the display works and behave normally (it's not
static, doesn't
  flicker). I can interact normally with the GUI element, display
stuff, it's
  accelerated (I run compiz and window wiggle normally, I can play
videos, I
  have control of backlight, etc).

Wow, that's a pretty impressive light-show ;-) Are the wrong colors
always wrong in this manner, or does it change from boot to boot?


everything (color and sync) are always wrong in the same manner.

the last git version of intel_reg_dumper gives me:
with i915 loaded:
http://maumae.net/retina/intel_corrupted_drm_debug/ird_i915_loaded
with i915.die=1:
http://maumae.net/retina/intel_corrupted_drm_debug/ird_i915_not_loaded


Can you please try the below quick hack. If that doesn't cut it, I need to
improve the reg_dumper tool first, the efi firmware sets things up on pipe
C, which we currently don't dump.
-Daniel

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 0a56b9a..d7462da 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -920,9 +920,9 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct 
drm_display_mode *mode,
/* Split out the IBX/CPU vs CPT settings */

if (is_cpu_edp(intel_dp)  IS_GEN7(dev)) {
-   if (adjusted_mode-flags  DRM_MODE_FLAG_PHSYNC)
+   //if (adjusted_mode-flags  DRM_MODE_FLAG_PHSYNC)
intel_dp-DP |= DP_SYNC_HS_HIGH;
-   if (adjusted_mode-flags  DRM_MODE_FLAG_PVSYNC)
+   //if (adjusted_mode-flags  DRM_MODE_FLAG_PVSYNC)
intel_dp-DP |= DP_SYNC_VS_HIGH;
intel_dp-DP |= DP_LINK_TRAIN_OFF_CPT;

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] Fwd: Re: Macbook Pro Retina display problems

2012-08-07 Thread Daniel Vetter
On Tue, Aug 07, 2012 at 06:08:51PM +1000, Francois Rigaut wrote:
 Daniel,
 
 nope, the hack didn't succeed. No apparent change.

Ok, I've updated the reg_dumper to also dump the registers for pipe C. Can
you please update your intel-gpu-tools checkout and then grab a new
register dump for both i915 loaded and not loaded?

To make comparing easier, please switch the panel to pipe C when i915 is
loaded with

$ xrandr --output eDP1 --auto --crtc 2

that way the register dumps are much easier to compare.

Thanks, Daniel
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] Fwd: Re: Macbook Pro Retina display problems

2012-08-06 Thread Daniel Vetter
On Thu, Aug 02, 2012 at 01:37:05PM +1000, Francois Rigaut wrote:
 Dave, Greg,
 
 OK, the problem was indeed a connection issue. By using gfxcardstatus
 within osx, I was able to force the HD4000 to connect to the display.
 The xorg log now reports:
 
 [ 8.226] (--) PCI:*(0:0:2:0) 8086:0166:106b:00f7 rev 9, Mem @ 
 0xc140/4194304, 0xb000/268435456, I/O @ 0x3000/64
 [ 8.226] (--) PCI: (0:1:0:0) 10de:0fd5:106b:00f2 rev 161, Mem @ 
 0xc000/16777216, 0x9000/268435456, 0xa000/33554432, I/O @ 
 0x2000/128, BIOS @ 0x/524288
 
 instead of greg's (or mine, prior to forcing with gfxcardstatus):
 
 [   224.406] (--) PCI: (0:0:2:0) 8086:0166:106b:00f7 rev 9, Mem @ 
 0xc140/4194304, 0xb000/268435456, I/O @ 0x3000/64
 [   224.406] (--) PCI:*(0:1:0:0) 10de:0fd5:106b:00f2 rev 161, Mem @ 
 0xc000/16777216, 0x9000/268435456, 0xa000/33554432, I/O @ 
 0x2000/128, BIOS @ 0x/524288
 
 I assume the star indicates to which pci the display is connected.
 
 The laptop now boots ok (with kms) and X starts without any error.
 I can change modes and have checked that it effectively changes the
 resolution. It is accelerated. Everything looks ok except that the
 display is quite corrupted (at any resolution).
 
 Some elements:
 
 * The display is the new retina display, 2880x1800; quite a bit of
 pixels to push (might be related to the problem, see below). I'm using
 the 3.5.0 kernel with everything stock.
 
 * I thought initially that i915 was not getting the correct EDID from
 the display and tried forcing the EDID with drm_kms_helper (using
 stock 1920x1080 and the edid.bin I extracted when using the laptop
 with the discrete nvidia card + nvidia blob), but it didn't help at
 all; same display corruption.
 
 * I have a dump of dmesg (using drmd.debug=6) and xorg log at
 http://maumae.net/retina/intel_corrupted_drm_debug/dmesg_intel_drm_debug

I get 404 on the dmesg.

 and
 http://maumae.net/retina/intel_corrupted_drm_debug/xorg_log_intel_corrupted_drm_debug
 The xorg log doesn't report any error. The modeline used looks
 allright to me
 [9.856125] [drm:drm_mode_debug_printmodeline], Modeline 17:2880x1800 60 
 337750 2880 2928 2960 3040 1800 1803 1809 1852 0x48 0x9
 
 * Ryan Bourgeois is working on a similar corruption issue for the
 nouveau driver. He claims that this might actually be related to a
 link bandwidth problem:
 This line right here out of your dmesg:
DP link bw 0a lane count 4 clock 27 bpp 24
 That's part of the DP link training and it's configuring it the same
 way as nouveau does, four lanes at 2.7Gbps. So if it is an issue with
 the Retina exceeding that bandwidth it's consistent across both devices.
 The link is configured based on the mode and panel capabilities, so
 that makes sense.
 I still need to try a couple of things to validate whether or not this
 is the situation.
 (last quotes from https://bbs.archlinux.org/viewtopic.php?id=144255p=2).
 
 * I can't show you what the corruption looks like, as when I take
 screenshots (with xfce4-screenshooter), they do NOT show the
 corruption (there are some in
 http://maumae.net/retina/intel_corrupted_drm_debug/ ). I guess this
 means the image is ok in video memory, the corruption occurs when it's
 pushed to the display, kind of pointing to the link bandwidth again.

Hm, can you take a picture with a camera? Also, is the corruption static
when nothing should change on the screen, or does it flicker?
-Daniel
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] Fwd: Re: Macbook Pro Retina display problems

2012-08-06 Thread Francois Rigaut

Daniel,


my bad for the dmesg. It's there:
http://maumae.net/retina/intel_corrupted_drm_debug/dmesg_intel_corrupted_drm_debug

I took pictures with a camera, and uploaded them at
Small 800x600 versions:
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_right_small.jpg 
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_whole_screen_small.jpg 
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg

full resolution versions:
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left.jpg 
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_right.jpg 
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_whole_screen.jpg 
http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg


Otherwise, the display works and behave normally (it's not static, 
doesn't flicker). I can interact normally with the GUI element, display 
stuff, it's accelerated (I run compiz and window wiggle normally, I can 
play videos, I have control of backlight, etc).


Just ask if you need any additional info or test done,
Thanks,
Francois


On 06/08/12 17:12, Daniel Vetter wrote:

On Thu, Aug 02, 2012 at 01:37:05PM +1000, Francois Rigaut wrote:

Dave, Greg,

OK, the problem was indeed a connection issue. By using gfxcardstatus
within osx, I was able to force the HD4000 to connect to the display.
The xorg log now reports:

[ 8.226] (--) PCI:*(0:0:2:0) 8086:0166:106b:00f7 rev 9, Mem @ 
0xc140/4194304, 0xb000/268435456, I/O @ 0x3000/64
[ 8.226] (--) PCI: (0:1:0:0) 10de:0fd5:106b:00f2 rev 161, Mem @ 
0xc000/16777216, 0x9000/268435456, 0xa000/33554432, I/O @ 
0x2000/128, BIOS @ 0x/524288

instead of greg's (or mine, prior to forcing with gfxcardstatus):

[   224.406] (--) PCI: (0:0:2:0) 8086:0166:106b:00f7 rev 9, Mem @ 
0xc140/4194304, 0xb000/268435456, I/O @ 0x3000/64
[   224.406] (--) PCI:*(0:1:0:0) 10de:0fd5:106b:00f2 rev 161, Mem @ 
0xc000/16777216, 0x9000/268435456, 0xa000/33554432, I/O @ 
0x2000/128, BIOS @ 0x/524288

I assume the star indicates to which pci the display is connected.

The laptop now boots ok (with kms) and X starts without any error.
I can change modes and have checked that it effectively changes the
resolution. It is accelerated. Everything looks ok except that the
display is quite corrupted (at any resolution).

Some elements:

* The display is the new retina display, 2880x1800; quite a bit of
pixels to push (might be related to the problem, see below). I'm using
the 3.5.0 kernel with everything stock.

* I thought initially that i915 was not getting the correct EDID from
the display and tried forcing the EDID with drm_kms_helper (using
stock 1920x1080 and the edid.bin I extracted when using the laptop
with the discrete nvidia card + nvidia blob), but it didn't help at
all; same display corruption.

* I have a dump of dmesg (using drmd.debug=6) and xorg log at
http://maumae.net/retina/intel_corrupted_drm_debug/dmesg_intel_drm_debug

I get 404 on the dmesg.


and
http://maumae.net/retina/intel_corrupted_drm_debug/xorg_log_intel_corrupted_drm_debug
The xorg log doesn't report any error. The modeline used looks
allright to me
[9.856125] [drm:drm_mode_debug_printmodeline], Modeline 17:2880x1800 60 
337750 2880 2928 2960 3040 1800 1803 1809 1852 0x48 0x9

* Ryan Bourgeois is working on a similar corruption issue for the
nouveau driver. He claims that this might actually be related to a
link bandwidth problem:
This line right here out of your dmesg:
DP link bw 0a lane count 4 clock 27 bpp 24
That's part of the DP link training and it's configuring it the same
way as nouveau does, four lanes at 2.7Gbps. So if it is an issue with
the Retina exceeding that bandwidth it's consistent across both devices.
The link is configured based on the mode and panel capabilities, so
that makes sense.
I still need to try a couple of things to validate whether or not this
is the situation.
(last quotes from https://bbs.archlinux.org/viewtopic.php?id=144255p=2).

* I can't show you what the corruption looks like, as when I take
screenshots (with xfce4-screenshooter), they do NOT show the
corruption (there are some in
http://maumae.net/retina/intel_corrupted_drm_debug/ ). I guess this
means the image is ok in video memory, the corruption occurs when it's
pushed to the display, kind of pointing to the link bandwidth again.

Hm, can you take a picture with a camera? Also, is the corruption static
when nothing should change on the screen, or does it flicker?

Re: [Intel-gfx] Fwd: Re: Macbook Pro Retina display problems

2012-08-06 Thread Daniel Vetter
On Mon, Aug 6, 2012 at 10:59 AM, Francois Rigaut frig...@gmail.com wrote:
 Daniel,


 my bad for the dmesg. It's there:
 http://maumae.net/retina/intel_corrupted_drm_debug/dmesg_intel_corrupted_drm_debug

 I took pictures with a camera, and uploaded them at
 Small 800x600 versions:
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_right_small.jpg
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_whole_screen_small.jpg
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 full resolution versions:
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left.jpg
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_right.jpg
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_whole_screen.jpg
 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg

 Otherwise, the display works and behave normally (it's not static, doesn't
 flicker). I can interact normally with the GUI element, display stuff, it's
 accelerated (I run compiz and window wiggle normally, I can play videos, I
 have control of backlight, etc).

Wow, that's a pretty impressive light-show ;-) Are the wrong colors
always wrong in this manner, or does it change from boot to boot?

Another thing is to try is to prevent the i915 driver from loading
(e.g. with i915.die=1) and peek at the register settings the efi
framebuffer driver uses (I presume those work). Please grab the latest
intel-gpu-tools git from

http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/

and attach the output of intel_reg_dumper both when using efifb and
when using i915.ko.

Thanks, Daniel
-- 
Daniel Vetter
daniel.vet...@ffwll.ch - +41 (0) 79 364 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] Fwd: Re: Macbook Pro Retina display problems

2012-08-06 Thread Daniel Vetter
On Mon, Aug 06, 2012 at 11:40:36PM +1000, Francois Rigaut wrote:
 Daniel,
 
 On Mon, Aug 6, 2012 at 7:17 PM, Daniel Vetter dan...@ffwll.ch
 mailto:dan...@ffwll.ch wrote:
 
On Mon, Aug 6, 2012 at 10:59 AM, Francois Rigaut frig...@gmail.com
mailto:frig...@gmail.com wrote:
  Daniel,
 
 
  my bad for the dmesg. It's there:
 

 http://maumae.net/retina/intel_corrupted_drm_debug/dmesg_intel_corrupted_drm_debug
 
  I took pictures with a camera, and uploaded them at
  Small 800x600 versions:
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_right_small.jpg
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_whole_screen_small.jpg
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
  full resolution versions:
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left.jpg
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_right.jpg
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_whole_screen.jpg
 

 http://maumae.net/retina/intel_corrupted_drm_debug/intel_corrupted_upper_left_small.jpg
 
  Otherwise, the display works and behave normally (it's not
static, doesn't
  flicker). I can interact normally with the GUI element, display
stuff, it's
  accelerated (I run compiz and window wiggle normally, I can play
videos, I
  have control of backlight, etc).
 
Wow, that's a pretty impressive light-show ;-) Are the wrong colors
always wrong in this manner, or does it change from boot to boot?
 
 
 everything (color and sync) are always wrong in the same manner.
 
 the last git version of intel_reg_dumper gives me:
 with i915 loaded:
 http://maumae.net/retina/intel_corrupted_drm_debug/ird_i915_loaded
 with i915.die=1:
 http://maumae.net/retina/intel_corrupted_drm_debug/ird_i915_not_loaded

Can you please try the below quick hack. If that doesn't cut it, I need to
improve the reg_dumper tool first, the efi firmware sets things up on pipe
C, which we currently don't dump.
-Daniel

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 0a56b9a..d7462da 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -920,9 +920,9 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct 
drm_display_mode *mode,
/* Split out the IBX/CPU vs CPT settings */
 
if (is_cpu_edp(intel_dp)  IS_GEN7(dev)) {
-   if (adjusted_mode-flags  DRM_MODE_FLAG_PHSYNC)
+   //if (adjusted_mode-flags  DRM_MODE_FLAG_PHSYNC)
intel_dp-DP |= DP_SYNC_HS_HIGH;
-   if (adjusted_mode-flags  DRM_MODE_FLAG_PVSYNC)
+   //if (adjusted_mode-flags  DRM_MODE_FLAG_PVSYNC)
intel_dp-DP |= DP_SYNC_VS_HIGH;
intel_dp-DP |= DP_LINK_TRAIN_OFF_CPT;
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx