i915: screen flicker

2016-04-27 Thread Mihai Donțu
On Wed, 27 Apr 2016 20:36:13 +0300 Mihai Donțu wrote:
> On Wed, 27 Apr 2016 08:28:20 -0700 Rodrigo Vivi wrote:
> > Hi Mihai,
> > 
> > What platform do you have? HSW or BDW?  
> 
> I have an i7, Haswell CPU.
> 
> > If you don't know please provide lspci -nn  
> 
> I have attached the output of lspci, just in case. :-)
> 
> > What happens if you boot with i915.enable_psr=2?  
> 
> I'll try now.

The behaviour is worse now. The screen flickers every couple of seconds.

> > In case it helps, could you please boot with default
> > i915.enable_psr=-1 appying this patch to your kernel to know what your
> > VBT recommends:
> > diff --git a/drivers/gpu/drm/i915/intel_psr.c
> > b/drivers/gpu/drm/i915/intel_psr.c
> > index c3abae4..68bc405 100644
> > --- a/drivers/gpu/drm/i915/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > @@ -798,6 +798,8 @@ void intel_psr_init(struct drm_device *dev)
> > /* For new platforms let's respect VBT back again */
> > dev_priv->psr.link_standby =
> > dev_priv->vbt.psr.full_link;
> > 
> > +   DRM_ERROR("PSR: VBT recommends link_standby %d, using %d\n",
> > dev_priv->vbt.psr.full_link, dev_priv->psr.link_standby);
> > +
> > /* Override link_standby x link_off defaults */
> > if (i915.enable_psr == 2 && !dev_priv->psr.link_standby) {
> > DRM_DEBUG_KMS("PSR: Forcing link standby\n");
> >   
> 
> I applied your patch and booted with enable_psr=-1
> 
> [0.763651] [drm:intel_psr_init] *ERROR* PSR: VBT recommends link_standby 
> 0, using 0

-- 
Mihai Donțu


i915: screen flicker

2016-04-27 Thread Mihai Donțu
On Wed, 27 Apr 2016 08:28:20 -0700 Rodrigo Vivi wrote:
> Hi Mihai,
> 
> What platform do you have? HSW or BDW?

I have an i7, Haswell CPU.

> If you don't know please provide lspci -nn

I have attached the output of lspci, just in case. :-)

> What happens if you boot with i915.enable_psr=2?

I'll try now.

> In case it helps, could you please boot with default
> i915.enable_psr=-1 appying this patch to your kernel to know what your
> VBT recommends:
> diff --git a/drivers/gpu/drm/i915/intel_psr.c
> b/drivers/gpu/drm/i915/intel_psr.c
> index c3abae4..68bc405 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -798,6 +798,8 @@ void intel_psr_init(struct drm_device *dev)
> /* For new platforms let's respect VBT back again */
> dev_priv->psr.link_standby =
> dev_priv->vbt.psr.full_link;
> 
> +   DRM_ERROR("PSR: VBT recommends link_standby %d, using %d\n",
> dev_priv->vbt.psr.full_link, dev_priv->psr.link_standby);
> +
> /* Override link_standby x link_off defaults */
> if (i915.enable_psr == 2 && !dev_priv->psr.link_standby) {
> DRM_DEBUG_KMS("PSR: Forcing link standby\n");
> 

I applied your patch and booted with enable_psr=-1

[0.763651] [drm:intel_psr_init] *ERROR* PSR: VBT recommends link_standby 0, 
using 0

-- 
Mihai Donțu
-- next part --
An embedded and charset-unspecified text was scrubbed...
Name: lspci.txt
URL: 



i915: screen flicker

2016-04-27 Thread Mihai Donțu
On Wed, 27 Apr 2016 10:09:32 +0300 Jani Nikula wrote:
> On Wed, 27 Apr 2016, Mihai Donțu wrote:
> > I noticed that since I started using 4.6.0-rcX, my screen flickers once
> > or twice after I stop using my laptop for ~1min or so. Given the
> > behavior, my prime suspect is the PSR feature that you have announced
> > for this release:
> >
> >   http://blog.ffwll.ch/2016/03/neat-drmi915-stuff-for-46.html
> >
> > Is 'enable_psr' the right knob to use to turn this feature off and see
> > if my suspicions are correct? Or is there a patch floating around that
> > I can test?  
> 
> i915.enable_psr=0 is the one to try, yes.

I can confirm that with PSR off, the flicker goes away.

> > I have an Intel i7-4600U CPU. I also attached to this email and archive
> > with the contents of /sys/kernel/debug/dri/0.

-- 
Mihai Donțu


i915: screen flicker

2016-04-27 Thread Mihai Donțu
Hi,

I noticed that since I started using 4.6.0-rcX, my screen flickers once
or twice after I stop using my laptop for ~1min or so. Given the
behavior, my prime suspect is the PSR feature that you have announced
for this release:

  http://blog.ffwll.ch/2016/03/neat-drmi915-stuff-for-46.html

Is 'enable_psr' the right knob to use to turn this feature off and see
if my suspicions are correct? Or is there a patch floating around that
I can test?

I have an Intel i7-4600U CPU. I also attached to this email and archive
with the contents of /sys/kernel/debug/dri/0.

Thank you,

-- 
Mihai Donțu
-- next part --
A non-text attachment was scrubbed...
Name: dri_0.tar.xz
Type: application/x-xz
Size: 87204 bytes
Desc: not available
URL: 



WARNING in intel_crtc_wait_for_pending_flips

2014-11-09 Thread Mihai Donțu
Hi,

A have a desktop and a laptop with Haswell and on both I'm experiencing
this issue: after a time of continuous usage (days usually) I run into
this warning:

Nov  9 01:24:38 xyz kernel: [ cut here ]
Nov  9 01:24:38 xyz kernel: WARNING: CPU: 2 PID: 10769 at 
drivers/gpu/drm/i915/intel_display.c:3361 
intel_crtc_wait_for_pending_flips+0x174/0x180()
Nov  9 01:24:38 xyz kernel: Modules linked in: vboxnetadp(O) vboxnetflt(O) 
vboxdrv(O) iwlmvm iwlwifi e1000e
Nov  9 01:24:38 xyz kernel: CPU: 2 PID: 10769 Comm: X Tainted: GW  O   
3.17.2-gentoo #2
Nov  9 01:24:38 xyz kernel: Hardware name: Dell Inc. Latitude E7440/07F3F4, 
BIOS A09 05/01/2014
Nov  9 01:24:38 xyz kernel:  0009 880403657c38 96ca6904 

Nov  9 01:24:38 xyz kernel:  880403657c70 96117dbd  
8804083bc000
Nov  9 01:24:38 xyz kernel:  880407308150 880407332000 880407332000 
880403657c80
Nov  9 01:24:38 xyz kernel: Call Trace:
Nov  9 01:24:38 xyz kernel:  [] dump_stack+0x45/0x56
Nov  9 01:24:38 xyz kernel:  [] warn_slowpath_common+0x7d/0xa0
Nov  9 01:24:38 xyz kernel:  [] warn_slowpath_null+0x1a/0x20
Nov  9 01:24:38 xyz kernel:  [] 
intel_crtc_wait_for_pending_flips+0x174/0x180
Nov  9 01:24:38 xyz kernel:  [] ? __wake_up_sync+0x20/0x20
Nov  9 01:24:38 xyz kernel:  [] 
intel_primary_plane_disable+0xa8/0xe0
Nov  9 01:24:38 xyz kernel:  [] setplane_internal+0x192/0x2b0
Nov  9 01:24:38 xyz kernel:  [] ? _object_find+0x69/0xa0
Nov  9 01:24:38 xyz kernel:  [] drm_mode_setplane+0x145/0x1e0
Nov  9 01:24:38 xyz kernel:  [] drm_ioctl+0x1df/0x680
Nov  9 01:24:38 xyz kernel:  [] ? new_sync_write+0x81/0xb0
Nov  9 01:24:38 xyz kernel:  [] ? fsnotify+0x27c/0x350
Nov  9 01:24:38 xyz kernel:  [] do_vfs_ioctl+0x2c8/0x490
Nov  9 01:24:38 xyz kernel:  [] ? __sb_end_write+0x31/0x60
Nov  9 01:24:38 xyz kernel:  [] ? vfs_write+0x1c2/0x200
Nov  9 01:24:38 xyz kernel:  [] SyS_ioctl+0x41/0x80
Nov  9 01:24:38 xyz kernel:  [] system_call_fastpath+0x16/0x1b
Nov  9 01:24:38 xyz kernel: ---[ end trace e54582f8e99380e5 ]---
Nov  9 01:24:38 xyz kernel: [drm:intel_pipe_set_base] *ERROR* pipe is still 
busy with an old pageflip
Nov  9 01:24:38 xyz kernel: [ cut here ]
Nov  9 01:24:38 xyz kernel: WARNING: CPU: 2 PID: 10769 at 
drivers/gpu/drm/i915/intel_display.c:1278 assert_plane.constprop.74+0x6b/0x70()
Nov  9 01:24:38 xyz kernel: plane A assertion failure (expected on, current off)
Nov  9 01:24:38 xyz kernel: Modules linked in: vboxnetadp(O) vboxnetflt(O) 
vboxdrv(O) iwlmvm iwlwifi e1000e
Nov  9 01:24:38 xyz kernel: CPU: 2 PID: 10769 Comm: X Tainted: GW  O   
3.17.2-gentoo #2
Nov  9 01:24:38 xyz kernel: Hardware name: Dell Inc. Latitude E7440/07F3F4, 
BIOS A09 05/01/2014
Nov  9 01:24:38 xyz kernel:  0009 8804036577b0 96ca6904 
8804036577f8
Nov  9 01:24:38 xyz kernel:  8804036577e8 96117dbd  
8804083bc000
Nov  9 01:24:38 xyz kernel:  880407332000 88040730  
880403657848
Nov  9 01:24:38 xyz kernel: Call Trace:
Nov  9 01:24:38 xyz kernel:  [] dump_stack+0x45/0x56
Nov  9 01:24:38 xyz kernel:  [] warn_slowpath_common+0x7d/0xa0
Nov  9 01:24:38 xyz kernel:  [] warn_slowpath_fmt+0x4c/0x50
Nov  9 01:24:38 xyz kernel:  [] 
assert_plane.constprop.74+0x6b/0x70
Nov  9 01:24:38 xyz kernel:  [] hsw_disable_ips+0x41/0x180
Nov  9 01:24:38 xyz kernel:  [] 
intel_crtc_disable_planes+0x49/0x160
Nov  9 01:24:38 xyz kernel:  [] 
haswell_crtc_disable+0x57/0x330
Nov  9 01:24:38 xyz kernel:  [] ? __intel_set_mode+0x52/0x16d0
Nov  9 01:24:38 xyz kernel:  [] __intel_set_mode+0x2c8/0x16d0
Nov  9 01:24:38 xyz kernel:  [] ? drm_err+0x5e/0x60
Nov  9 01:24:38 xyz kernel:  [] intel_set_mode+0x16/0x30
Nov  9 01:24:38 xyz kernel:  [] 
intel_crtc_set_config+0xaf4/0xef0
Nov  9 01:24:38 xyz kernel:  [] 
drm_mode_set_config_internal+0x64/0xe0
Nov  9 01:24:38 xyz kernel:  [] restore_fbdev_mode+0xb3/0xe0
Nov  9 01:24:38 xyz kernel:  [] 
drm_fb_helper_restore_fbdev_mode_unlocked+0x23/0x40
Nov  9 01:24:38 xyz kernel:  [] 
drm_fb_helper_set_par+0x28/0x70
Nov  9 01:24:38 xyz kernel:  [] intel_fbdev_set_par+0x1a/0x60
Nov  9 01:24:38 xyz kernel:  [] fb_set_var+0x1a4/0x410
Nov  9 01:24:38 xyz kernel:  [] ? update_curr+0x79/0x190
Nov  9 01:24:38 xyz kernel:  [] fbcon_blank+0x296/0x370
Nov  9 01:24:38 xyz kernel:  [] ? 
ttwu_do_activate.constprop.92+0x5d/0x70
Nov  9 01:24:38 xyz kernel:  [] do_unblank_screen+0xba/0x1f0
Nov  9 01:24:38 xyz kernel:  [] 
complete_change_console+0x59/0xe0
Nov  9 01:24:38 xyz kernel:  [] vt_ioctl+0x1190/0x1420
Nov  9 01:24:38 xyz kernel:  [] tty_ioctl+0x285/0xbc0
Nov  9 01:24:38 xyz kernel:  [] ? new_sync_write+0x81/0xb0
Nov  9 01:24:38 xyz kernel:  [] ? fsnotify+0x27c/0x350
Nov  9 01:24:38 xyz kernel:  [] do_vfs_ioctl+0x2c8/0x490
Nov  9 01:24:38 xyz kernel:  [] ? __sb_end_write+0x31/0x60
Nov  9 01:24:38 xyz kernel:  [] SyS_ioctl+0x41/0x80
Nov  9 01:24:38 xyz kerne

i915 kernel warning

2014-08-07 Thread Mihai Donțu
On Wed, 6 Aug 2014 22:29:54 +0200 Daniel Vetter wrote:
> On Wed, Aug 06, 2014 at 10:03:46PM +0300, Mihai Don?u wrote:
> > Hi,
> > 
> > This just happened to me:
> > 
> > Aug  6 21:37:37 mdontu-l kernel: [ cut here ]
> > Aug  6 21:37:37 mdontu-l kernel: WARNING: CPU: 3 PID: 4823 at 
> > drivers/gpu/drm/i915/intel_display.c:3313 
> > intel_crtc_wait_for_pending_flips+0x16c/0x180()
> > Aug  6 21:37:37 mdontu-l kernel: Modules linked in: hdaps(O) tp_smapi(O) 
> > thinkpad_ec(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) iwldvm iwlwifi e1000e
> > Aug  6 21:37:37 mdontu-l kernel: CPU: 3 PID: 4823 Comm: X Tainted: G
> >O  3.16.0-gentoo #2
> > Aug  6 21:37:37 mdontu-l kernel: Hardware name: LENOVO 4178A4G/4178A4G, 
> > BIOS 83ET76WW (1.46 ) 07/05/2013
> > Aug  6 21:37:37 mdontu-l kernel:  0009 88041d63fbf8 
> > 93c212a4 
> > Aug  6 21:37:37 mdontu-l kernel:  88041d63fc30 930e3a2d 
> >  880427b7c000
> > Aug  6 21:37:37 mdontu-l kernel:  880426f380a8 880426ddf800 
> > 880426ddf800 88041d63fc40
> > Aug  6 21:37:37 mdontu-l kernel: Call Trace:
> > Aug  6 21:37:37 mdontu-l kernel:  [] dump_stack+0x45/0x56
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > warn_slowpath_common+0x7d/0xa0
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > warn_slowpath_null+0x1a/0x20
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > intel_crtc_wait_for_pending_flips+0x16c/0x180
> > Aug  6 21:37:37 mdontu-l kernel:  [] ? 
> > __wake_up_sync+0x20/0x20
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > intel_crtc_disable_planes+0x33/0x1c0
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > ironlake_crtc_disable+0x50/0x970
> > Aug  6 21:37:37 mdontu-l kernel:  [] ? 
> > drm_modeset_lock+0x2f/0xd0
> > Aug  6 21:37:37 mdontu-l kernel:  [] ? 
> > mutex_lock+0x12/0x30
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > intel_crtc_update_dpms+0x6f/0xa0
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > intel_connector_dpms+0x59/0x70
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > drm_mode_obj_set_property_ioctl+0x399/0x3a0
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > drm_mode_connector_property_set_ioctl+0x30/0x40
> > Aug  6 21:37:37 mdontu-l kernel:  [] drm_ioctl+0x1df/0x680
> > Aug  6 21:37:37 mdontu-l kernel:  [] ? 
> > backlight_generate_event+0x5c/0x80
> > Aug  6 21:37:37 mdontu-l kernel:  [] ? 
> > brightness_store+0x91/0xd0
> > Aug  6 21:37:37 mdontu-l kernel:  [] ? 
> > fsnotify+0x27c/0x350
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > do_vfs_ioctl+0x2c8/0x490
> > Aug  6 21:37:37 mdontu-l kernel:  [] ? 
> > __sb_end_write+0x31/0x60
> > Aug  6 21:37:37 mdontu-l kernel:  [] ? 
> > vfs_write+0x1c2/0x200
> > Aug  6 21:37:37 mdontu-l kernel:  [] SyS_ioctl+0x41/0x80
> > Aug  6 21:37:37 mdontu-l kernel:  [] 
> > system_call_fastpath+0x16/0x1b
> > Aug  6 21:37:37 mdontu-l kernel: ---[ end trace 131b19886670715a ]---
> 
> If you can reproduce this somehow, please boot with drm.debug=0xe and
> attach the complete dmesg up to the WARNING. We seem to loose track of
> pageflips under obscure circumstances sometimes. We have more band-aids
> queued up, but fixing the underlying issue would be better ofc.

I don't know how to reproduce it, but I've added the option to my
kernel command line. It does not seem to introduce any noticeable
performance degradation so I'll keep it on until the issue reappears.

Thanks,

> > X appeared to have stopped rendering (or nothing goes through), but the
> > applications worked fine (I still had sound from a video). My video
> > card is:
> > 
> > 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core 
> > Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA 
> > controller])
> > Subsystem: Lenovo Device 21d0
> > Flags: bus master, fast devsel, latency 0, IRQ 43
> > Memory at f140 (64-bit, non-prefetchable) [size=4M]
> > Memory at e000 (64-bit, prefetchable) [size=256M]
> > I/O ports at 6000 [size=64]
> > Expansion ROM at  [disabled]
> > Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
> > Capabilities: [d0] Power Management version 2
> > Capabilities: [a4] PCI Advanced Features
> > Kernel driver in use: i915
> > 
> > I was able to switch to the terminal and reboot.
> > 
> > I suspect this is new in 3.16 and I've noticed some other oddities
> > since I upgraded from 3.15.8:
> >  * when adjusting the screen brightness, the minimum setting is now
> >"LCD off";
> >  * when watching a video in fullscreen, I can see a flicker every 10s
> >or so.

-- 
Mihai Don?u


i915 kernel warning

2014-08-06 Thread Mihai Donțu
Hi,

This just happened to me:

Aug  6 21:37:37 mdontu-l kernel: [ cut here ]
Aug  6 21:37:37 mdontu-l kernel: WARNING: CPU: 3 PID: 4823 at 
drivers/gpu/drm/i915/intel_display.c:3313 
intel_crtc_wait_for_pending_flips+0x16c/0x180()
Aug  6 21:37:37 mdontu-l kernel: Modules linked in: hdaps(O) tp_smapi(O) 
thinkpad_ec(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) iwldvm iwlwifi e1000e
Aug  6 21:37:37 mdontu-l kernel: CPU: 3 PID: 4823 Comm: X Tainted: G   
O  3.16.0-gentoo #2
Aug  6 21:37:37 mdontu-l kernel: Hardware name: LENOVO 4178A4G/4178A4G, BIOS 
83ET76WW (1.46 ) 07/05/2013
Aug  6 21:37:37 mdontu-l kernel:  0009 88041d63fbf8 
93c212a4 
Aug  6 21:37:37 mdontu-l kernel:  88041d63fc30 930e3a2d 
 880427b7c000
Aug  6 21:37:37 mdontu-l kernel:  880426f380a8 880426ddf800 
880426ddf800 88041d63fc40
Aug  6 21:37:37 mdontu-l kernel: Call Trace:
Aug  6 21:37:37 mdontu-l kernel:  [] dump_stack+0x45/0x56
Aug  6 21:37:37 mdontu-l kernel:  [] 
warn_slowpath_common+0x7d/0xa0
Aug  6 21:37:37 mdontu-l kernel:  [] 
warn_slowpath_null+0x1a/0x20
Aug  6 21:37:37 mdontu-l kernel:  [] 
intel_crtc_wait_for_pending_flips+0x16c/0x180
Aug  6 21:37:37 mdontu-l kernel:  [] ? 
__wake_up_sync+0x20/0x20
Aug  6 21:37:37 mdontu-l kernel:  [] 
intel_crtc_disable_planes+0x33/0x1c0
Aug  6 21:37:37 mdontu-l kernel:  [] 
ironlake_crtc_disable+0x50/0x970
Aug  6 21:37:37 mdontu-l kernel:  [] ? 
drm_modeset_lock+0x2f/0xd0
Aug  6 21:37:37 mdontu-l kernel:  [] ? mutex_lock+0x12/0x30
Aug  6 21:37:37 mdontu-l kernel:  [] 
intel_crtc_update_dpms+0x6f/0xa0
Aug  6 21:37:37 mdontu-l kernel:  [] 
intel_connector_dpms+0x59/0x70
Aug  6 21:37:37 mdontu-l kernel:  [] 
drm_mode_obj_set_property_ioctl+0x399/0x3a0
Aug  6 21:37:37 mdontu-l kernel:  [] 
drm_mode_connector_property_set_ioctl+0x30/0x40
Aug  6 21:37:37 mdontu-l kernel:  [] drm_ioctl+0x1df/0x680
Aug  6 21:37:37 mdontu-l kernel:  [] ? 
backlight_generate_event+0x5c/0x80
Aug  6 21:37:37 mdontu-l kernel:  [] ? 
brightness_store+0x91/0xd0
Aug  6 21:37:37 mdontu-l kernel:  [] ? fsnotify+0x27c/0x350
Aug  6 21:37:37 mdontu-l kernel:  [] do_vfs_ioctl+0x2c8/0x490
Aug  6 21:37:37 mdontu-l kernel:  [] ? 
__sb_end_write+0x31/0x60
Aug  6 21:37:37 mdontu-l kernel:  [] ? vfs_write+0x1c2/0x200
Aug  6 21:37:37 mdontu-l kernel:  [] SyS_ioctl+0x41/0x80
Aug  6 21:37:37 mdontu-l kernel:  [] 
system_call_fastpath+0x16/0x1b
Aug  6 21:37:37 mdontu-l kernel: ---[ end trace 131b19886670715a ]---

X appeared to have stopped rendering (or nothing goes through), but the
applications worked fine (I still had sound from a video). My video
card is:

00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core 
Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA 
controller])
Subsystem: Lenovo Device 21d0
Flags: bus master, fast devsel, latency 0, IRQ 43
Memory at f140 (64-bit, non-prefetchable) [size=4M]
Memory at e000 (64-bit, prefetchable) [size=256M]
I/O ports at 6000 [size=64]
Expansion ROM at  [disabled]
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 2
Capabilities: [a4] PCI Advanced Features
Kernel driver in use: i915

I was able to switch to the terminal and reboot.

I suspect this is new in 3.16 and I've noticed some other oddities
since I upgraded from 3.15.8:
 * when adjusting the screen brightness, the minimum setting is now
   "LCD off";
 * when watching a video in fullscreen, I can see a flicker every 10s
   or so.

Thanks,

-- 
Mihai Don?u