[sru][pineview] drm/i915 : external VGA1 only mode causes screen flickering

Bug #1004707 reported by Chris J Arges
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Chris J Arges
Lucid
Fix Released
Medium
Chris J Arges

Bug Description

SRU Justification:

    Impact: On laptops with pineview graphics external monitor only mode can cause the output to flicker.
    Fix:
        Upstream commits:
           9553426372eef71c849499fb1d232f4b0577c0f9
           d4294342fd4b94a3297867da00c1c5e929c28d4f
        These fix the issue by adding in proper support to set the Pineview CxSR registers. On patch ensure the hooks are setup properly and this state isn't overwritten, and the other patch adds a table which contains proper memory latencies for DDR3 memory on Pineview.

    Testcase: see below.

--

This bug is present in lucid (2.6.32-41 #90), but is fixed in maverick. If I install the maverick backported kernel it fixes the issue.

More specifically its fixed in v2.6.35-rc2 (79a78dd6266a4f3e31c800e941ec62e250770a7d)
And broken in v2.6.35-rc1 (6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1)
However, bisection between these commits has not been successful in isolating the patch.

To reproduce:
1) Connect external VGA monitor to laptop.
2) Set mode to external VGA only with its maximum resolution. (see test.sh)
3) Use xrandr to rotate monitor a few times, and turn on and off (see irritate.sh)
4) Press a few keys on the keyboard, and the monitor will start flickering.

If both internal and external monitors are active, this problem does not exist.
Occasionally the flickering will stop.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-image-2.6.32-41-generic 2.6.32-41.90
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.32-41.90-generic 2.6.32.59+drm33.24
Uname: Linux 2.6.32-41-generic x86_64
NonfreeKernelModules: wl
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC269 Analog [ALC269 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC269 Analog [ALC269 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ubuntu 1156 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf6dfc000 irq 21'
   Mixer name : 'Realtek ALC269'
   Components : 'HDA:10ec0269,102804a5,00100100'
   Controls : 13
   Simple ctrls : 8
Date: Fri May 25 16:01:36 2012
HibernationDevice: RESUME=UUID=2301a55d-d703-401e-8cf8-31bc9b19fe65
InstallationMedia: Ubuntu 10.04.4 LTS "Lucid Lynx" - Release amd64 (20120214.2)
Lsusb:
 Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Dell Inc. Latitude 2120
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-41-generic root=UUID=983f30ea-8263-4bd4-ba28-bac3ab91034c ro drm.debug=0x06 quiet splash
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.34.14
RfKill:
 0: dell-wifi: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
dmi.bios.date: 10/27/2010
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A00
dmi.board.name: 0YY3FH
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA00:bd10/27/2010:svnDellInc.:pnLatitude2120:pvr:rvnDellInc.:rn0YY3FH:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude 2120
dmi.sys.vendor: Dell Inc.

Revision history for this message
Chris J Arges (arges) wrote :
summary: - [pineview/] drm/i915 : external VGA1 only mode causes screen flickering
+ [pineview] drm/i915 : external VGA1 only mode causes screen flickering
Revision history for this message
Chris J Arges (arges) wrote : Re: [pineview] drm/i915 : external VGA1 only mode causes screen flickering
Revision history for this message
Chris J Arges (arges) wrote :

Attached is a picture of the output on the external VGA monitor.

Revision history for this message
Chris J Arges (arges) wrote :

I've also attempted to bisect this issue because it is fixed in a newer version:

At this commit: 79a78dd6266a4f3e31c800e941ec62e250770a7d the flickering does NOT occur.
At this commit: 6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1 the flickering occurs.

I've identified a few patches and tried to cherry-pick and test.
These two looked potentially related however they do not fix it.
79a78dd6266a4f3e31c800e941ec62e250770a7d -- doesn't fix it
d4294342fd4b94a3297867da00c1c5e929c28d4f -- doesn't fix it

Revision history for this message
Chris J Arges (arges) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Chris J Arges (arges)
tags: added: bot-stop-nagging kernel-fixed-upstream
removed: needs-upstream-testing
Revision history for this message
Chris J Arges (arges) wrote :

Here are some less verbose kernel messages.

Changed in linux (Ubuntu):
assignee: nobody → Chris J Arges (christopherarges)
Revision history for this message
Chris J Arges (arges) wrote :

This works around the issue for me:
echo "options i915 powersave=0" | sudo tee /etc/modprobe.d/i915

This bug could be related:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/492392

However, running the latest lucid kernel so this may be a separate issue.

Revision history for this message
Chris J Arges (arges) wrote :

Actually after another suspend/resume cycle and run of the irritate function the shaking is still present even with the i915 powersave=0 option. So this is NOT a viable workaround.

Revision history for this message
Chris J Arges (arges) wrote :

Reverting 181a5336d6cc836f05507410d66988c483ad0154. as described by https://bugzilla.kernel.org/show_bug.cgi?id=14781 does NOT fix the issue.

description: updated
Revision history for this message
Chris J Arges (arges) wrote :

Tested with ba52a5bbe3271c11353fbebc86881dfc7951a69f in linux-2.6.32.y-drm33.z from smb's branch with the drm fixes. Still exhibits problem.

Revision history for this message
Chris J Arges (arges) wrote :

Wow.
Backporting 3f1b089f70b9e14fc5ba41310a884a20358c12c5 seems to fix the issue (plus some hacking to get the patch working on the older version).
I'll start working on a proper SRU.

Revision history for this message
Chris J Arges (arges) wrote :

Sorry I cherry-picked:

9553426372eef71c849499fb1d232f4b0577c0f

drm/i915: Add CxSR support on Pineview DDR3

This is the patch that fixes the issue.

Chris J Arges (arges)
Changed in linux (Ubuntu Lucid):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Chris J Arges (christopherarges)
Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Chris J Arges (arges)
description: updated
summary: - [pineview] drm/i915 : external VGA1 only mode causes screen flickering
+ [sru][pineview] drm/i915 : external VGA1 only mode causes screen
+ flickering
Revision history for this message
Chris J Arges (arges) wrote :

The following changes since commit 6196a0c82f84c643ef6d2c168b76cdbca49a8739:

  UBUNTU: Ubuntu-2.6.32-41.89 (2012-04-27 18:00:37 -0300)

are available in the git repository at:

  git://kernel.ubuntu.com/srv/kernel.ubuntu.com/git/arges/ubuntu-lucid.git

for you to fetch changes up to c761d2884e1f594cdd68b13a4592a3521d5e8205:

  drm/i915: Add CxSR support on Pineview DDR3 (2012-06-14 15:38:49 -0500)

----------------------------------------------------------------
Li Peng (1):
      drm/i915: Add CxSR support on Pineview DDR3

Zhao Yakui (1):
      drm/i915: Move Pineview CxSR and watermark code into update_wm hook.

 drivers/gpu/drm/i915/i915_dma.c | 4 +
 drivers/gpu/drm/i915/i915_drv.h | 2 +-
 drivers/gpu/drm/i915/i915_reg.h | 13 ++
 drivers/gpu/drm/i915/intel_display.c | 219 +++++++++++++++++++---------------
 4 files changed, 138 insertions(+), 100 deletions(-)

description: updated
Brad Figg (brad-figg)
Changed in linux (Ubuntu Lucid):
status: In Progress → Fix Committed
Revision history for this message
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for luci in -proposed solves the problem (2.6.32-41.94). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lucid' to 'verification-done-lucid'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-lucid
Revision history for this message
Luis Henriques (henrix) wrote :

Chris, any chances of taking a look at this bug? We need to have this bug verified with the current -proposed kernel. Thanks.

Revision history for this message
Chris J Arges (arges) wrote :

Ok I'll handle it.

Revision history for this message
Chris J Arges (arges) wrote :

Just tested on lucid and works.

tags: added: verification-done-lucid
removed: verification-needed-lucid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.32-41.94

---------------
linux (2.6.32-41.94) lucid-proposed; urgency=low

  [ Andy Whitcroft ]

  * fix ABI directory naming

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1020172

linux (2.6.32-41.93) lucid-proposed; urgency=low

  [ Andy Whitcroft ]

  * No change upload to fix .ddeb generation in the PPA.

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1020172

linux (2.6.32-41.92) lucid-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1020172

  [ Upstream Kernel Changes ]

  * drm/i915: Move Pineview CxSR and watermark code into update_wm hook.
    - LP: #1004707
  * drm/i915: Add CxSR support on Pineview DDR3
    - LP: #1004707
 -- Andy Whitcroft <email address hidden> Fri, 06 Jul 2012 15:46:44 +0100

Changed in linux (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.