Bug 511896

Summary: Screen goes out of sync when changing resolution on Q43/Q45 with VGA
Product: Red Hat Enterprise Linux 5 Reporter: Olivier Fourdan <ofourdan>
Component: xorg-x11-drv-i810Assignee: Adam Jackson <ajax>
Status: CLOSED ERRATA QA Contact: desktop-bugs <desktop-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.4CC: alanm, cmeadors, cward, kem, mgordon, rlerch, tao, tis
Target Milestone: rcKeywords: Patch, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, using xrandr to change the screen resolution of a video device under the Intel Q43/Q45 chipset sometimes failed. After attempting the switch, the screen may have blanked and gone out of sync. With this update, this issue has been resolved.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:34:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 499522, 541103, 543811    
Attachments:
Description Flags
Proposed patch
none
Patch from upstream bug 23178 none

Description Olivier Fourdan 2009-07-15 14:43:57 UTC
Created attachment 353832 [details]
Proposed patch

Description of problem:

The fix for bug #487657 introduced a regression when changing resolution with xrandr with a VGA connected monitor on a Q43/Q45 chipset.

When switching resolution, the screen sometimes goes black and out of sync.

Version-Release number of selected component (if applicable):

xorg-x11-drv-i810-1.6.5-9.25.el5

How reproducible:

50%

Steps to Reproduce:
1. Connect a monitor to the VGA port
2. Select a lower resolution, e.g. xrandr -s "1024x768"
3. If that works, switch back to the original resolution, then select a
lower resolution again.
  
Actual results:

The screen goes black and shows "out of sync" message

Expected results:

The screen does not go "out of sync"

Additional info:

The workaround is either to repeat the last xrandr command or to switch to a text console and back again.

The problem has been introduced initially with commit db9f5915 upstream, which was backported in el5 as a fix for bug #487657.

The bug is still present upstream and I have reported it here:

  http://lists.freedesktop.org/archives/intel-gfx/2009-July/003419.html

KMS seems to be immune to the problem (ie it works in F11).

So comparing the code of i9xx_crtc_dpms() in intel_display.c in the kernel modesetting code:

 http://git.kernel.org/?p=linux/kernel/git/anholt/drm-intel.git;a=blob;f=drivers/gpu/drm/i915/intel_display.c

With the one from its equivalent i830_crtc_dpms() in i830_display.c:

 http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/tree/src/i830_display.c

We see in the kernel, the VGA_DISP_DISABLE is disabled no matter what whereas in i830_disable_vga_plane(), the function returns immediately if the bit is already set.

The attached patch disables the vga plane no matter what, and that seems to fix the issue with xrandr without breaking to fix for bug #487657.

Comment 2 Olivier Fourdan 2009-08-18 13:23:48 UTC
Created attachment 357792 [details]
Patch from upstream bug 23178

Comment 8 Adam Jackson 2009-09-15 20:18:08 UTC
Test build at http://people.redhat.com/~ajackson/511896/ with the patch from comment #2.

Comment 28 Adam Jackson 2009-12-02 18:53:56 UTC
Built xorg-x11-drv-i810 1.6.5-9.26.el5

MODIFIED

Comment 34 Ryan Lerch 2010-03-26 00:16:45 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

New Contents:
Previously, using xrandr to change the screen resolution of a video device under the Intel Q43/Q45 chipset sometimes failed. After attempting the switch, the screen may have blanked and gone out of sync. With this update, this issue has been resolved.

Comment 35 errata-xmlrpc 2010-03-30 08:34:58 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0262.html