Re: [Intel-gfx] Screen corruption regression from 3.0 to 3.1rc4

2011-09-03 Thread Philipp Klaus Krause
Am 31.08.2011 08:43, schrieb Philipp Klaus Krause:
 In the free game simutrans, in fullscreen mode I see the following problem:
 The lower about 2 cm of the screen don't update. They are black or carry
 the image from the game startup screen. They flicker once in a while,
 but otherwise the image stays the same.
 
 lspci output:
 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960
 Integrated Graphics Controller (primary) (rev 0c)
 00:02.1 Display controller: Intel Corporation Mobile GM965/GL960
 Integrated Graphics Controller (secondary) (rev 0c)
 
 glxinfo:
 OpenGL vendor string: Tungsten Graphics, Inc
 OpenGL renderer string: Mesa DRI Intel(R) 965GM
 OpenGL version string: 2.1 Mesa 7.11
 
 Any ideas what I can do about this problem? Is it a known issue?
 
 Philipp

This regression was introduced between 3.0 and 3.1rc1.

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


Re: [Intel-gfx] Screen corruption regression from 3.0 to 3.1rc4

2011-09-03 Thread Daniel Vetter
On Sat, Sep 3, 2011 at 11:31, Philipp Klaus Krause p...@spth.de wrote:
 Am 31.08.2011 08:43, schrieb Philipp Klaus Krause:
 In the free game simutrans, in fullscreen mode I see the following problem:
 The lower about 2 cm of the screen don't update. They are black or carry
 the image from the game startup screen. They flicker once in a while,
 but otherwise the image stays the same.

 lspci output:
 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960
 Integrated Graphics Controller (primary) (rev 0c)
 00:02.1 Display controller: Intel Corporation Mobile GM965/GL960
 Integrated Graphics Controller (secondary) (rev 0c)

 glxinfo:
 OpenGL vendor string: Tungsten Graphics, Inc
 OpenGL renderer string: Mesa DRI Intel(R) 965GM
 OpenGL version string: 2.1 Mesa 7.11

 Any ideas what I can do about this problem? Is it a known issue?

Lately there seem to be a few reports of my screen doesn't update
anymore. One thing that seems to (temporary) fix the problem is to
switch to the kernel console and back to X. Does that help in your
case?

 This regression was introduced between 3.0 and 3.1rc1.

If it's a kernel regression, can you please try to bisect it?

Thanks a lot,

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] Screen corruption regression from 3.0 to 3.1rc4

2011-09-03 Thread Philipp Klaus Krause
Am 03.09.2011 12:43, schrieb Daniel Vetter:

 Lately there seem to be a few reports of my screen doesn't update
 anymore. One thing that seems to (temporary) fix the problem is to
 switch to the kernel console and back to X. Does that help in your
 case?
 

Yes. Temporary: For a few seconds, then the lower part of the screen
freezes again. Taking a screenshot using import has the same effect.

Philipp


 This regression was introduced between 3.0 and 3.1rc1.
 
 If it's a kernel regression, can you please try to bisect it?
 

I might have a look at it when I find the time to do so.

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


Re: [Intel-gfx] Screen corruption regression from 3.0 to 3.1rc4

2011-09-03 Thread Daniel Vetter
On Sat, Sep 3, 2011 at 12:52, Philipp Klaus Krause p...@spth.de wrote:
 This regression was introduced between 3.0 and 3.1rc1.

 If it's a kernel regression, can you please try to bisect it?


 I might have a look at it when I find the time to do so.

That would be very useful. Your description sounds like damage isn't
properly flushed somewhere in the X server. This being caused by a
kernel changes is rather strange, so more information about the actual
culprit is certainly useful.

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] How to disable (not working) native backlight support?

2011-09-03 Thread Niccolò Belli
As someone told it wasn't the native backlight support but 
samsung_laptop instead.


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


Re: [Intel-gfx] How to disable (not working) native backlight support?

2011-09-03 Thread Niccolò Belli

Il 03/09/2011 15:18, Niccolò Belli ha scritto:

As someone told it wasn't the native backlight support but
samsung_laptop instead.


And maybe there is even a fix: 
http://www.mail-archive.com/platform-driver-x86@vger.kernel.org/msg02365.html

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


Re: [Intel-gfx] [PATCH] drm/i915: Dumb down the semaphore logic

2011-09-03 Thread Ben Widawsky
On Fri, 02 Sep 2011 12:10:28 -0700
Eric Anholt e...@anholt.net wrote:

 On Thu,  1 Sep 2011 20:55:35 -0700, Ben Widawsky b...@bwidawsk.net
 wrote:
  While I think the previous code is correct, it was hard to follow
  and hard to debug. Since we already have a ring abstraction, might
  as well use it to handle the semaphore updates and compares.
  
  I don't expect this code to make semaphores better or worse, but you
  never know...
 
 This code is generally more legible, and I think I could review it
 compared to the specs in a few minutes instead of the awful I
 experience I had reviewing what was there before (particularly the
 awful % tricks).  Still, some review inline:

Keith, worth cleaning this one up?
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] Repeated xorg crashes with intel driver

2011-09-03 Thread Marc MERLIN
On Fri, Sep 02, 2011 at 04:55:58PM -0300, Eugeni Dodonov wrote:
   E.g., instead of
   [244312.106] 0: /usr/bin/X (xorg_backtrace+0x3b) [0x80eab8b]
   [244312.106] 1: /usr/bin/X (0x8048000+0x5fb38) [0x80a7b38]
   [244312.106] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xe40c]
   [244312.106] 3: /usr/bin/X (ProcUngrabKeyboard+0x10f) [0x807e0bf]
   [244312.106] 4: /usr/bin/X (0x8048000+0x28167) [0x8070167]
   [244312.106] 5: /usr/bin/X (0x8048000+0x1a81c) [0x806281c]
   [244312.106] 6: /lib/i386-linux-gnu/libc.so.6 (__libc_start_main+0xe7)
   [0xb75c7e37]
   [244312.106] 7: /usr/bin/X (0x8048000+0x1a411) [0x8062411]
   [244312.107] Segmentation fault at address 0x36d
  
   it would say something like (just an example):
  
   Program received signal SIGSEGV, Segmentation fault.
   0xb7a92524 in GXDisplayVideo (pScrni=0x828bd38, id=0xb7aa9490,
  offset=0x17,
   width=0x82a, height=0xe730, pitch=0xb7aa946c, x1=0x8289920, y1=0x0,
   x2=0x0, y2=0x0, dstBox=0x82ae680, src_w=0x82a, src_h=0xe794, drw_w=0x828,
   drw_h=0x8638) at amd_gx_video.c:849
 
  Understood. I restarted X with ulimit -c unlimited. I can't reproduce
  this at will, I now have to wait days (making running under gdb
  impractical), but hopefully I'll get a core I can get a BT against.

 Great, thanks a lot! It would be helpful to see what is wrong - so far, it
 looks like an issue at ubuntu's package for X input subsystem..

Ok, I got a core this time. Here's the trace from the log and the bt from the 
core.
Not sure if it's good or not:

Loaded symbols for /lib/i386-linux-gnu/libnss_files.so.2
Core was generated by `/usr/bin/X :0 vt8 -nr -nolisten tcp -auth 
/var/run/xauth/A:0-7D4BUa'.
Program terminated with signal 11, Segmentation fault.
#0  0x0808268b in ?? ()
(gdb) bt
#0  0x0808268b in ?? ()
#1  0x0807ff00 in ProcUngrabKeyboard ()
#2  0x08072117 in ?? ()
#3  0x0806470c in ?? ()
#4  0xb7454e37 in __libc_start_main (main=0x80643a0, argc=8, 
ubp_av=0xbfe7f144, init=0x81d7020 __libc_csu_init, 
fini=0x81d7080 __libc_csu_fini, rtld_fini=0xb776ea50, 
stack_end=0xbfe7f13c) at libc-start.c:226
#5  0x08064a21 in _start ()

Either way, it looks like I'm on the wrong list now, where do you recommend I 
go?

Thanks,
Marc
-- 
A mouse is a device used to point at the xterm you want to type in - A.S.R.
Microsoft is to operating systems 
   what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


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

2011-09-03 Thread Wu Fengguang
Changes from v4: remove a debug call to dump_stack().
Thanks to Bossart for catching this!
---

Add ELD support for Intel Eaglelake, IbexPeak/Ironlake,
SandyBridge/CougarPoint and IvyBridge/PantherPoint chips.

ELD (EDID-Like Data) describes to the HDMI/DP audio driver the audio
capabilities of the plugged monitor. It's built and passed to audio
driver in 2 steps:

(1) at get_modes time, parse EDID and save ELD to drm_connector.eld[]

(2) at mode_set time, write drm_connector.eld[] to the Transcoder's hw
ELD buffer and set the ELD_valid bit to inform HDMI/DP audio driver

ELD selection policy: it's possible for one encoder to be associated
with multiple connectors (ie. monitors), in which case the first found
ELD will be used. This policy may not be suitable for all users, but
let's start it simple first.

The impact of ELD selection policy: assume there are two monitors, one
supports stereo playback and the other has 8-channel output; cloned
display mode is used, so that the two monitors are associated with the
same internal encoder. If only the stereo playback capability is reported,
the user won't be able to start 8-channel playback; if the 8-channel ELD
is reported, then user space applications may send 8-channel samples
down, however the user may actually be listening to the 2-channel
monitor and not connecting speakers to the 8-channel monitor. Overall,
it's more safe to report maximum profiles to the user space, so that
the user can at least be able to do 8-channel playback if he want to.

This patch is tested OK on G45/HDMI, IbexPeak/HDMI and IvyBridge/HDMI+DP.

Minor imperfection: the GEN6_AUD_CNTL_ST/DIP_Port_Select field always
reads 0 (reserved). Without knowing the port number, I worked it around
by setting the ELD_valid bit for ALL the three ports. It's tested to not
be a problem, because the audio driver will find invalid ELD data and
hence rightfully abort, even when it sees the ELD_valid indicator.

Thanks to Zhenyu and Bossart for a lot of valuable help and testing.

CC: Zhao Yakui yakui.z...@intel.com
CC: Wang Zhenyu zhenyu.z.w...@intel.com
CC: Jeremy Bush contractfrombe...@gmail.com
CC: Christopher White c.wh...@pulseforce.com
CC: Bossart, Pierre-louis pierre-louis.boss...@intel.com
Signed-off-by: Ben Skeggs bske...@redhat.com
Signed-off-by: Wu Fengguang fengguang...@intel.com
---
 drivers/gpu/drm/drm_edid.c   |  171 +
 drivers/gpu/drm/i915/i915_drv.h  |2 
 drivers/gpu/drm/i915/i915_reg.h  |   25 +++
 drivers/gpu/drm/i915/intel_display.c |  131 +++
 drivers/gpu/drm/i915/intel_dp.c  |6 
 drivers/gpu/drm/i915/intel_drv.h |2 
 drivers/gpu/drm/i915/intel_hdmi.c|3 
 drivers/gpu/drm/i915/intel_modes.c   |2 
 include/drm/drm_crtc.h   |9 +
 include/drm/drm_edid.h   |9 +
 10 files changed, 358 insertions(+), 2 deletions(-)

--- linux-next.orig/drivers/gpu/drm/drm_edid.c  2011-09-02 15:59:35.0 
+0800
+++ linux-next/drivers/gpu/drm/drm_edid.c   2011-09-04 05:11:24.0 
+0800
@@ -1319,6 +1319,7 @@ add_detailed_modes(struct drm_connector 
 #define HDMI_IDENTIFIER 0x000C03
 #define AUDIO_BLOCK0x01
 #define VENDOR_BLOCK0x03
+#define SPEAKER_BLOCK  0x04
 #define EDID_BASIC_AUDIO   (1  6)
 
 /**
@@ -1347,6 +1348,176 @@ u8 *drm_find_cea_extension(struct edid *
 }
 EXPORT_SYMBOL(drm_find_cea_extension);
 
+static void
+parse_hdmi_vsdb(struct drm_connector *connector, uint8_t *db)
+{
+   connector-eld[5] |= (db[6]  7)  1;  /* Supports_AI */
+
+   connector-dvi_dual = db[6]  1;
+   connector-max_tmds_clock = db[7] * 5;
+
+   connector-latency_present[0] = db[8]  7;
+   connector-latency_present[1] = (db[8]  6)  1;
+   connector-video_latency[0] = db[9];
+   connector-audio_latency[0] = db[10];
+   connector-video_latency[1] = db[11];
+   connector-audio_latency[1] = db[12];
+
+   DRM_LOG_KMS(HDMI: DVI dual %d, 
+   max TMDS clock %d, 
+   latency present %d %d, 
+   video latency %d %d, 
+   audio latency %d %d\n,
+   connector-dvi_dual,
+   connector-max_tmds_clock,
+ (int) connector-latency_present[0],
+ (int) connector-latency_present[1],
+   connector-video_latency[0],
+   connector-video_latency[1],
+   connector-audio_latency[0],
+   connector-audio_latency[1]);
+}
+
+static void
+monitor_name(struct detailed_timing *t, void *data)
+{
+   if (t-data.other_data.type == EDID_DETAIL_MONITOR_NAME)
+   *(u8 **)data = t-data.other_data.data.str.str;
+}
+
+/**
+ * drm_edid_to_eld - build ELD from EDID
+ * @connector: connector corresponding to the HDMI/DP sink
+ * @edid: EDID to parse
+ *
+ * Fill the ELD (EDID-Like Data) buffer for passing to the audio driver.
+ * Some ELD fields are left to the graphics driver caller:

Re: [Intel-gfx] [PATCH] drm/i915: Dumb down the semaphore logic

2011-09-03 Thread Keith Packard
On Sat, 3 Sep 2011 13:09:47 -0700, Ben Widawsky b...@bwidawsk.net wrote:

 Keith, worth cleaning this one up?

Yes, I think so. If nothing else, we'll have more people who actually
understand how the code is supposed to work, which should help with
future maintenance.

-- 
keith.pack...@intel.com


pgpvHyFqqlQD7.pgp
Description: PGP signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Fix rps irq warning

2011-09-03 Thread Ben Widawsky
I couldn't reproduce this one, but...  Interrupt mask state is lost if
three interrupts occur before the workqueue has run.

Should be straight forward to reproduce even without SMP. I'm pretty
sure Dan Vetter was trying to explain this to me, and I couldn't get it.
My solution I think is different than his though.

Here is a sample failure:
  pm irq 10 occurs
  local iir = 1
  spin lock
  mask_pm_irq(1  0);
  dev_priv-iir = 1;
  spin_unlock
  clear_pm_irq(1  0);

  pm irq 1  1 occurs
  local iir = 2
  spin lock
  mask_pm_irq(1  1); // here is the bug
  dev_priv-iir = 3;
  clear_pm_irq(1  1);

  pm irq 1  0 occurs again
  local iir = 1
  spin lock
  WARN!!!

Cc: Chris Wilson ch...@chris-wilson.co.uk
Cc: Daniel Vetter daniel.vet...@ffwll.ch
Signed-off-by: Ben Widawsky b...@bwidawsk.net
---
 drivers/gpu/drm/i915/i915_irq.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 9cbb0cd..55518e3 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -649,8 +649,8 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)
unsigned long flags;
spin_lock_irqsave(dev_priv-rps_lock, flags);
WARN(dev_priv-pm_iir  pm_iir, Missed a PM interrupt\n);
-   I915_WRITE(GEN6_PMIMR, pm_iir);
dev_priv-pm_iir |= pm_iir;
+   I915_WRITE(GEN6_PMIMR, dev_priv-pm_iir);
spin_unlock_irqrestore(dev_priv-rps_lock, flags);
queue_work(dev_priv-wq, dev_priv-rps_work);
}
-- 
1.7.6.1

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