Re: [Intel-gfx] ILK output training hangs

2010-08-02 Thread Jin, Gordon
Dave Airlie wrote on Friday, July 30, 2010 2:13 PM:
 Current testing machine is an HP 2740p with Ironlake graphics.
 
 Test sequence:
 
 boot with no VGA plugged in.
 get up to gnome logged in,
 plug in VGA,
 
 one of three things occur,
 a) it works,
 b) it hangs in FDI link training (endless while loop wtf?)
 c) it gets past the hang but nothing on the monitor.
 
 If (a) happens and I suspend/resume the monitor invariably gets wrong
 timings, in this case
 it appears we set the fbcon mode, but when we go to change to the X
 mode, the PCH DPLL won't accept the new values.
 It won't even dpms off.
 
 Just posting in case anyone else can reproduce or has any insight, I'm
 not running a fully upstream kernel (testing on RHEL6 with lots of
 backports).
 and we don't  seem to have a tree with all the patches on the list
 collected. 

I can't reproduce it on Thinkpad T410 (also with Ironlake graphics) with 
2.6.35-rc6 kernel. I've performed 10 times of the test sequence.

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


[Intel-gfx] regression after: drm/i915: Warn if we run out of FIFO space for a mode

2010-08-02 Thread Alexey Fisher
Hallo all,
i have regression coused by this patch:

commit b9421ae8f30958deea98d71477b4a77a066856b4
Author: Chris Wilson ch...@chris-wilson.co.uk
Date: Mon Jul 19 21:46:08 2010 +0100

drm/i915: Warn if we run out of FIFO space for a mode

Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk
Cc: Jesse Barnes jbar...@virtuousgeek.org
Signed-off-by: Eric Anholt e...@anholt.net


If i start openarena, i'll get black background with big mousepointer
(it can be moved). Nothing else happening, i can't kill openarena or
reboot xserver.

reverting this patch, solve the problem.

My hardware Intel DG45ID board, Core 2 Duo CPU E8400, 4 GB RAM.
Ubuntu 10.10 64bit. 

 apt-cache policy  xserver-xorg-video-intel
xserver-xorg-video-intel:
  Installiert: 2:2.12.0+git20100730.0be3e95c-0ubuntu0sarvatt
  Kandidat:2:2.12.0+git20100801.fe7dee7f-0ubuntu0sarvatt
  Versionstabelle:
 2:2.12.0+git20100801.fe7dee7f-0ubuntu0sarvatt 0
500 http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu/
maverick/main amd64 Packages
 *** 2:2.12.0+git20100730.0be3e95c-0ubuntu0sarvatt 0
100 /var/lib/dpkg/status
 2:2.12.0-1ubuntu2 0


Xorg crashes with this message:
[   233.461] [mi] EQ overflowing. The server is probably stuck in an
infinite loop.


Regards,
Alexey
[33.928] 
X.Org X Server 1.8.99.905 (1.9.0 RC 5)
Release Date: 2010-07-14
[33.928] X Protocol Version 11, Revision 0
[33.928] Build Operating System: Linux 2.6.24-28-xen x86_64 Ubuntu
[33.928] Current Operating System: Linux zwerg 2.6.35-00187-gb9421ae #31 SMP PREEMPT Mon Aug 2 10:57:09 CEST 2010 x86_64
[33.928] Kernel command line: BOOT_IMAGE=/vmlinuz root=/dev/mapper/zwerg_buntu-root_one ro quiet splash
[33.928] Build Date: 21 July 2010  07:51:48PM
[33.928] xorg-server 2:1.8.99.905+git20100714.a2c13f0d-0ubuntu0sarvatt2 (For technical support please see http://www.ubuntu.com/support) 
[33.928] Current version of pixman: 0.19.1
[33.928] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[33.928] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[33.929] (==) Log file: /var/log/Xorg.0.log, Time: Mon Aug  2 11:00:07 2010
[33.944] (==) Using system config directory /usr/share/X11/xorg.conf.d
[33.945] (==) No Layout section.  Using the first Screen section.
[33.945] (==) No screen section available. Using defaults.
[33.945] (**) |--Screen Default Screen Section (0)
[33.945] (**) |   |--Monitor default monitor
[33.945] (==) No monitor specified for screen Default Screen Section.
	Using a default monitor configuration.
[33.945] (==) Automatically adding devices
[33.945] (==) Automatically enabling devices
[33.945] (WW) The directory /usr/share/fonts/X11/cyrillic does not exist.
[33.945] 	Entry deleted from font path.
[33.945] (==) FontPath set to:
	/usr/share/fonts/X11/misc,
	/usr/share/fonts/X11/100dpi/:unscaled,
	/usr/share/fonts/X11/75dpi/:unscaled,
	/usr/share/fonts/X11/Type1,
	/usr/share/fonts/X11/100dpi,
	/usr/share/fonts/X11/75dpi,
	/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType,
	built-ins
[33.945] (==) ModulePath set to /usr/lib/xorg/extra-modules,/usr/lib/xorg/modules
[33.945] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[33.945] (II) Loader magic: 0x7cf7e0
[33.945] (II) Module ABI versions:
[33.945] 	X.Org ANSI C Emulation: 0.4
[33.945] 	X.Org Video Driver: 8.0
[33.945] 	X.Org XInput driver : 11.0
[33.945] 	X.Org Server Extension : 4.0
[33.946] (--) PCI:*(0:0:2:0) 8086:2e22:8086:5002 rev 3, Mem @ 0xe000/4194304, 0xd000/268435456, I/O @ 0xf1c0/8
[33.946] (--) PCI: (0:0:2:1) 8086:2e23:8086:5002 rev 3, Mem @ 0xe040/1048576
[33.946] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[33.946] (II) LoadModule: extmod
[34.017] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
[34.017] (II) Module extmod: vendor=X.Org Foundation
[34.017] 	compiled for 1.8.99.905, module version = 1.0.0
[34.017] 	Module class: X.Org Server Extension
[34.017] 	ABI class: X.Org Server Extension, version 4.0
[34.017] (II) Loading extension MIT-SCREEN-SAVER
[34.017] (II) Loading extension XFree86-VidModeExtension
[34.017] (II) Loading extension XFree86-DGA
[34.017] (II) Loading extension DPMS
[34.017] (II) Loading extension XVideo
[34.017] (II) Loading extension XVideo-MotionCompensation
[34.017] (II) Loading extension X-Resource
[34.017] (II) LoadModule: dbe
[34.017] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
[34.017] (II) Module dbe: vendor=X.Org Foundation
[34.017] 	compiled for 1.8.99.905, module version = 1.0.0
[34.017] 	Module 

Re: [Intel-gfx] ILK output training hangs

2010-08-02 Thread Dave Airlie
On Mon, Aug 2, 2010 at 7:09 PM, Jin, Gordon gordon@intel.com wrote:
 Dave Airlie wrote on Friday, July 30, 2010 2:13 PM:
 Current testing machine is an HP 2740p with Ironlake graphics.

 Test sequence:

 boot with no VGA plugged in.
 get up to gnome logged in,
 plug in VGA,

 one of three things occur,
 a) it works,
 b) it hangs in FDI link training (endless while loop wtf?)
 c) it gets past the hang but nothing on the monitor.

 If (a) happens and I suspend/resume the monitor invariably gets wrong
 timings, in this case
 it appears we set the fbcon mode, but when we go to change to the X
 mode, the PCH DPLL won't accept the new values.
 It won't even dpms off.

 Just posting in case anyone else can reproduce or has any insight, I'm
 not running a fully upstream kernel (testing on RHEL6 with lots of
 backports).
 and we don't  seem to have a tree with all the patches on the list
 collected.

 I can't reproduce it on Thinkpad T410 (also with Ironlake graphics) with 
 2.6.35-rc6 kernel. I've performed 10 times of the test sequence.

Does the T410 have eDP? I think it only matter with eDP where the FDI
isn't setup by the BIOS.

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


Re: [Intel-gfx] [PATCH 2/3] drm/i915 save render context on Ironlake

2010-08-02 Thread Eric Anholt
On Fri, 25 Jun 2010 13:40:23 +0800, Zou Nan hai nanhai@intel.com wrote:
 RC6 requires setup logical render context
 
 Signed-off-by: Zou Nan hai nanhai@intel.com
 ---
  drivers/gpu/drm/i915/i915_drv.h  |1 +
  drivers/gpu/drm/i915/i915_reg.h  |   13 +++-
  drivers/gpu/drm/i915/intel_display.c |   53 +++--
  3 files changed, 56 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
 index 9ed8ecd..cbc8cae 100644
 --- a/drivers/gpu/drm/i915/i915_drv.h
 +++ b/drivers/gpu/drm/i915/i915_drv.h
 @@ -245,6 +245,7 @@ typedef struct drm_i915_private {
   drm_local_map_t hws_map;
   struct drm_gem_object *seqno_obj;
   struct drm_gem_object *pwrctx;
 + struct drm_gem_object *renderctx;
  
   struct resource mch_res;
  
 diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
 index 64b0a3a..96103ae 100644
 --- a/drivers/gpu/drm/i915/i915_reg.h
 +++ b/drivers/gpu/drm/i915/i915_reg.h
 @@ -176,9 +176,15 @@
  #define   MI_OVERLAY_CONTINUE(0x021)
  #define   MI_OVERLAY_ON  (0x121)
  #define   MI_OVERLAY_OFF (0x221)
 +#define   MI_DISPLAY_FLIP_PLANE(n) ((n)  20)
  #define MI_LOAD_SCAN_LINES_INCL MI_INSTR(0x12, 0)
  #define MI_DISPLAY_FLIP  MI_INSTR(0x14, 2)
 -#define   MI_DISPLAY_FLIP_PLANE(n) ((n)  20)
 +#define MI_SET_CONTEXT   MI_INSTR(0x18, 0)
 +#define   MI_MM_SPACE_GTT(18)
 +#define   MI_MM_SPACE_PHYSICAL   (08)
 +#define   MI_SAVE_EXT_STATE_EN   (13)
 +#define   MI_RESTORE_EXT_STATE_EN(12)
 +#define   MI_RESTORE_INHIBIT (10)
  #define MI_STORE_DWORD_IMM   MI_INSTR(0x20, 1)
  #define   MI_MEM_VIRTUAL (1  22) /* 965+ only */
  #define MI_STORE_DWORD_INDEX MI_INSTR(0x21, 1)
 @@ -1042,6 +1048,11 @@
  #define DDRMPLL1 0X12c20
  #define PEG_BAND_GAP_DATA0x14d68
  
 +/*
 + * Logical Context regs
 + */
 +#define CCID 0x2180
 +#define   CCID_EN(10)
  /*
   * Overlay regs
   */
 diff --git a/drivers/gpu/drm/i915/intel_display.c 
 b/drivers/gpu/drm/i915/intel_display.c
 index c3c9feb..efcfda9 100644
 --- a/drivers/gpu/drm/i915/intel_display.c
 +++ b/drivers/gpu/drm/i915/intel_display.c
 @@ -5026,37 +5026,37 @@ static const struct drm_mode_config_funcs 
 intel_mode_funcs = {
  };
  
  static struct drm_gem_object *
 -intel_alloc_power_context(struct drm_device *dev)
 +intel_alloc_context_page(struct drm_device *dev)
  {
 - struct drm_gem_object *pwrctx;
 + struct drm_gem_object *ctx;
   int ret;
  
 - pwrctx = i915_gem_alloc_object(dev, 4096);
 - if (!pwrctx) {
 + ctx = i915_gem_alloc_object(dev, 4096);
 + if (!ctx) {
   DRM_DEBUG(failed to alloc power context, RC6 disabled\n);
   return NULL;
   }
  
   mutex_lock(dev-struct_mutex);
 - ret = i915_gem_object_pin(pwrctx, 4096);
 + ret = i915_gem_object_pin(ctx, 4096);
   if (ret) {
   DRM_ERROR(failed to pin power context: %d\n, ret);
   goto err_unref;
   }
  
 - ret = i915_gem_object_set_to_gtt_domain(pwrctx, 1);
 + ret = i915_gem_object_set_to_gtt_domain(ctx, 1);
   if (ret) {
   DRM_ERROR(failed to set-domain on power context: %d\n, ret);
   goto err_unpin;
   }
   mutex_unlock(dev-struct_mutex);
  
 - return pwrctx;
 + return ctx;
  
  err_unpin:
 - i915_gem_object_unpin(pwrctx);
 + i915_gem_object_unpin(ctx);
  err_unref:
 - drm_gem_object_unreference(pwrctx);
 + drm_gem_object_unreference(ctx);
   mutex_unlock(dev-struct_mutex);
   return NULL;
  }
 @@ -5343,6 +5343,29 @@ void intel_init_clock_gating(struct drm_device *dev)
* GPU can automatically power down the render unit if given a page
* to save state.
*/
 + if (IS_IRONLAKE_M(dev)) {
 + if (dev_priv-renderctx == NULL)
 + dev_priv-renderctx = intel_alloc_context_page(dev);
 + if (dev_priv-renderctx) {
 + struct drm_i915_gem_object *obj_priv;
 + obj_priv = to_intel_bo(dev_priv-renderctx);
 + if (obj_priv) {
 + BEGIN_LP_RING(4);
 + OUT_RING(MI_SET_CONTEXT);
 + OUT_RING(obj_priv-gtt_offset |
 + MI_MM_SPACE_GTT |
 + MI_SAVE_EXT_STATE_EN |
 + MI_RESTORE_EXT_STATE_EN |
 + MI_RESTORE_INHIBIT);
 + OUT_RING(MI_NOOP);
 + OUT_RING(MI_FLUSH);
 + ADVANCE_LP_RING();

I don't think you mean SAVE_EXT_STATE_EN here -- doesn't that mean store
the current state to the current context (but we haven't set a 

Re: [Intel-gfx] regression after: drm/i915: Warn if we run out of FIFO space for a mode

2010-08-02 Thread Chris Wilson
On Mon, 02 Aug 2010 12:16:16 +0200, Alexey Fisher bug-tr...@fisher-privat.net 
wrote:
 Hallo all,
 i have regression coused by this patch:
 
 commit b9421ae8f30958deea98d71477b4a77a066856b4
 Author: Chris Wilson ch...@chris-wilson.co.uk
 Date: Mon Jul 19 21:46:08 2010 +0100
 
 drm/i915: Warn if we run out of FIFO space for a mode

Weird as all that patch should do is add a DRM_ERROR() with no other
side-effect. How confident are you in your analysis? Did you at least see
the error in dmesg?
-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] ILK output training hangs

2010-08-02 Thread Jin, Gordon
Dave Airlie wrote on Monday, August 02, 2010 6:39 PM:
 On Mon, Aug 2, 2010 at 7:09 PM, Jin, Gordon gordon@intel.com
 wrote: 
 Dave Airlie wrote on Friday, July 30, 2010 2:13 PM:
 Current testing machine is an HP 2740p with Ironlake graphics.
 
 Test sequence:
 
 boot with no VGA plugged in.
 get up to gnome logged in,
 plug in VGA,
 
 one of three things occur,
 a) it works,
 b) it hangs in FDI link training (endless while loop wtf?)
 c) it gets past the hang but nothing on the monitor.
 
 If (a) happens and I suspend/resume the monitor invariably gets
 wrong timings, in this case it appears we set the fbcon mode, but
 when we go to change to the X mode, the PCH DPLL won't accept the
 new values. 
 It won't even dpms off.
 
 Just posting in case anyone else can reproduce or has any insight,
 I'm not running a fully upstream kernel (testing on RHEL6 with lots
 of backports). and we don't  seem to have a tree with all the
 patches on the list collected.
 
 I can't reproduce it on Thinkpad T410 (also with Ironlake graphics)
 with 2.6.35-rc6 kernel. I've performed 10 times of the test
 sequence.  
 
 Does the T410 have eDP? I think it only matter with eDP where the FDI
 isn't setup by the BIOS.

No, my T410 has LVDS not eDP. Would you file a bug on fd.o so it could be 
tracked?

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