[Intel-gfx] [PATCH 16/20] drm/i915: Ensure that while(INREG()) are bounded (v2)

Carlos R. Mafra crmafra2 at gmail.com
Wed Sep 22 17:26:45 CEST 2010


On Mi 22.Sep'10 at 15:29:56 +0100, Chris Wilson wrote:
> On Wed, 22 Sep 2010 15:42:55 +0200, "Carlos R. Mafra" <crmafra2 at gmail.com> wrote:
> > I pulled the branch again and the external monitor in the VGA port
> > still does not work (but no 1 sec delay).
> 
> I overlooked this:
> 
> [    1.284053] [drm:drm_helper_probe_single_connector_modes],
> [CONNECTOR:11:SVIDEO-1]
> [    1.284057] [drm:drm_crtc_helper_set_mode], [CRTC:3]
> [    1.284284] [drm:intel_crtc_mode_set], Mode for pipe A:
> [    1.284287] [drm:drm_mode_debug_printmodeline], Modeline 0:"NTSC 480i"
> 0 107520 1280 1368 1496 1712 1024 1027 1034 1104 0x40 0x0
> [    1.286026] [drm:drm_crtc_helper_set_mode], [ENCODER:12:TV-12] set
> [MODE:0:NTSC 480i]
> [    1.328023] [drm:intel_tv_detect_type], Detected S-Video TV connection
> [    1.328043] [drm:i915_driver_irq_handler], 
> [    1.328044] [drm:drm_helper_probe_single_connector_modes],
> [CONNECTOR:11:SVIDEO-1] probed modes :
> [    1.328047] [drm:drm_mode_debug_printmodeline], Modeline 35:"848x480"
> 30 14513 848 849 912 944 480 481 512 513 0x48 0x0
> [    1.328051] [drm:drm_mode_debug_printmodeline], Modeline 32:"640x480"
> 30 11315 640 641 704 736 480 481 512 513 0x48 0x0
> [    1.328056] [drm:drm_mode_debug_printmodeline], Modeline 34:"1024x768"
> 30 26886 1024 1025 1088 1120 768 769 800 801 0x40 0x0
> [    1.328060] [drm:drm_mode_debug_printmodeline], Modeline 33:"800x600"
> 30 16998 800 801 864 896 600 601 632 633 0x40 0x0
> ...
> [    1.366106] [drm:drm_mode_debug_printmodeline], Modeline 36:"1280x800"
> 60 68880 1280 1296 1344 1410 800 801 804 815 0x8 0xa
> [    1.366110] [drm:drm_crtc_helper_set_config], encoder changed, full
> mode switch
> [    1.366112] [drm:drm_crtc_helper_set_config], crtc changed, full mode
> switch
> [    1.366115] [drm:drm_crtc_helper_set_config], [CONNECTOR:5:LVDS-1] to
> [CRTC:4]
> [    1.366117] [drm:drm_crtc_helper_set_config], [CONNECTOR:11:SVIDEO-1]
> to [CRTC:3]
> [    1.366120] [drm:drm_crtc_helper_set_config], attempting to set mode
> from userspace
> 
> So we detect a rogue SVideo connection and do not have a free crtc for the
> valid VGA output. The implication is that the TV detection is not working,
> can you add a msleep(30) to intel_tv.c::intel_tv_detect_type() after the
> POSTING_READ:

Oh, but the laptop has a SVideo connection. It's not connected to anything
though.

> diff --git a/drivers/gpu/drm/i915/intel_tv.c
> b/drivers/gpu/drm/i915/intel_tv.c
> index 49ab11c..364a2f3 100644
> --- a/drivers/gpu/drm/i915/intel_tv.c
> +++ b/drivers/gpu/drm/i915/intel_tv.c
> @@ -1271,8 +1271,11 @@ intel_tv_detect_type (struct intel_tv *intel_tv)
>         I915_WRITE(TV_DAC, tv_dac);
>         POSTING_READ(TV_DAC);
>  
> +       msleep(30);
> +

I did this.
Now there is an image in VGA output, but it detected the wrong resolutions:

[mafra at Pilar:~]$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800       59.9*+
   1024x768       85.0     75.0     70.1     60.0
   832x624        74.6
   800x600        85.1     72.2     75.0     60.3     56.2
   640x480        85.0     72.8     75.0     59.9
   720x400        85.0
   640x400        85.1
   640x350        85.1
VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0*
   800x600        60.3     56.2
   848x480        60.0
   640x480        59.9     59.9
TV1 unknown connection (normal left inverted right x axis y axis)
   848x480        30.0 +
   640x480        30.0 +
   1024x768       30.0
   800x600        30.0
   
I also don't remember the TV1 from before (the other output
in the laptop is a S-Video).

The new dmesg is here:
http://www.aei.mpg.de/~crmafra/dmesg-drm.debug3.txt



More information about the Intel-gfx mailing list