Bug 33691

Summary: incorrect resolution chosen for Sony Vaio VGC-JS210J: 1600x1200 not 1680x1050
Product: DRI Reporter: Caleb Jacobs <caleb.jacobs>
Component: DRM/IntelAssignee: Chris Wilson <chris>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: medium CC: jbarnes
Version: XOrg git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
i915_opregion
none
Override SDVO panel type in VBT
none
VBT override (against 2.6.37) none

Description Caleb Jacobs 2011-01-29 07:00:54 UTC
http://paste.pocoo.org/show/328717/ dmesg
Comment 1 Caleb Jacobs 2011-01-29 07:04:42 UTC
Created attachment 42695 [details]
i915_opregion
Comment 2 Chris Wilson 2011-01-29 08:11:59 UTC
The contents of the vBIOS include detailed modes for 1024x768, 1280x1024, 1400x1050 and 1600x1200 (which is marked as native):

SDVO panel dtds:
0:
	hdisplay: 1024
	hsync [1048, 1184] -sync
	htotal: 1344
	vdisplay: 768
	vsync [771, 777] -sync
	vtotal: 806
	clock: 65000
1:
	hdisplay: 1280
	hsync [1328, 1440] -sync
	htotal: 1688
	vdisplay: 1024
	vsync [1025, 1028] -sync
	vtotal: 1072
	clock: 108000
2:
	hdisplay: 1400
	hsync [1488, 1640] -sync
	htotal: 1880
	vdisplay: 1050
	vsync [1051, 1054] -sync
	vtotal: 1088
	clock: 122000
3:
	hdisplay: 1600
	hsync [1664, 1856] -sync
	htotal: 2160
	vdisplay: 1200
	vsync [1201, 1204] -sync
	vtotal: 1250
	clock: 162000

So the issue appears that your BIOS contains an incorrect description of your hardware.
Comment 3 Chris Wilson 2011-01-29 08:33:45 UTC
Idiot! I parsed the wrong VBT...

This is from *your* opregion:

SDVO panel dtds:
0:
	hdisplay: 1680
	hsync [1778, 1974] -sync
	htotal: 2132
	vdisplay: 1050
	vsync [1055, 1065] -sync
	vtotal: 1155
	clock: 147600
1:
	hdisplay: 1280
	hsync [1328, 1440] -sync
	htotal: 1688
	vdisplay: 1024
	vsync [1025, 1028] -sync
	vtotal: 1072
	clock: 108000
2:
	hdisplay: 1400
	hsync [1488, 1640] -sync
	htotal: 1880
	vdisplay: 1050
	vsync [1051, 1054] -sync
	vtotal: 1088
	clock: 122000
3:
	hdisplay: 1600
	hsync [1664, 1856] -sync
	htotal: 2160
	vdisplay: 1200
	vsync [1201, 1204] -sync
	vtotal: 1250
	clock: 162000

SDVO LVDS options block:
	backlight: 0
	h40 type: 1
	type: 3
	ssc_clk_freq: 7
	als_low_trip: 0
	als_high_trip: 0
	misc[0]: 10
	misc[1]: 80
	misc[2]: f
	misc[3]: 1

We interpret the LVDS::type as the index into the DTDs for the native mode. In this case this causes us to believe you have a 1600x1200 instead of [0] which is the real 1680x1050.
Comment 4 Chris Wilson 2011-01-29 08:54:14 UTC
Created attachment 42696 [details] [review]
Override SDVO panel type in VBT

Apply this patch and then append i915.vbt_sdvo_panel_type=0 to your boot parameters.
Comment 5 Caleb Jacobs 2011-01-29 18:46:27 UTC
what kernel is this for because it doesnt seem to work for 2.6.37
Comment 6 Chris Wilson 2011-01-30 03:29:53 UTC
You need to give a few more hints as to what went wrong.

Do you see the new debug message saying which resolution is selected from the VBT for the SDVO panel? Do you see the new module parameter: /sys/module/i915/parameters/sdvo_vbt_panel_type ? What is its value?

If you don't see either of those the patch didn't apply. (It should against .37 since there is little changed in .38).

If they exist but the value is wrong, then the module parameter was not applied when the module was loaded. You may need to add it as an option to modprobe instead.

Etc. And you can always ask me on IRC for help. You know my nick ;-)
Comment 7 Caleb Jacobs 2011-01-30 05:37:53 UTC
this is the error i get and if you want i can show the .rej


[archdemon@archdemon linux-2.6.37]$ sudo patch -p1 < intelkernel.patch 
patching file drivers/gpu/drm/i915/i915_drv.c
Hunk #1 FAILED at 52.
1 out of 1 hunk FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_drv.c.rej
patching file drivers/gpu/drm/i915/i915_drv.h
Hunk #1 FAILED at 962.
1 out of 1 hunk FAILED -- saving rejects to file drivers/gpu/drm/i915/i915_drv.h.rej
patching file drivers/gpu/drm/i915/intel_bios.c
Hunk #1 succeeded at 226 with fuzz 1.
Comment 8 Chris Wilson 2011-01-30 08:11:57 UTC
Created attachment 42720 [details] [review]
VBT override (against 2.6.37)

Ok, there were a couple of conflicts due to the addition of a couple of other parameters in .38.

The attached should do the trick for 2.6.37.
Comment 9 Jesse Barnes 2011-06-08 11:14:57 UTC
assuming this is fixed now

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.