Summary: | Intermittent surious TV-out detection on GM45 | ||
---|---|---|---|
Product: | DRI | Reporter: | Peter Clifton <pcjc2> |
Component: | DRM/Intel | Assignee: | ykzhao <yakui.zhao> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | darkbasic, santi, yakui.zhao |
Version: | XOrg git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
This patch seems to have some effect. (Although it could just be in one of its "working" moods at the moment. It was flaky just before I rebooted, and hasn't mis-detected since I applied this patch: diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 1d5b9b7..ee92335 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c @@ -1391,8 +1391,8 @@ intel_tv_detect_type (struct drm_crtc *crtc, struct intel_ tv_dac &= ~DAC_A_MASK; tv_dac &= ~DAC_B_MASK; tv_dac &= ~DAC_C_MASK; - tv_dac |= (TVDAC_STATE_CHG_EN | - TVDAC_A_SENSE_CTL | + tv_dac &= ~TVDAC_STATE_CHG_EN; + tv_dac |= (TVDAC_A_SENSE_CTL | TVDAC_B_SENSE_CTL | TVDAC_C_SENSE_CTL | DAC_CTL_OVERRIDE | (We aren't using the DAC state change logic for polling based load detection, so I figured I might try turning it off). I'm running: "watch -n 0.5 xrandr" as a trigger for the bug. With the stock driver I get display glitches, and spurious TV-detection now and again. With the patch applied, I'm not getting that (at the moment!) I had this hunk applied too, from Zhenyu Wang: @@ -1840,8 +1840,6 @@ intel_tv_init(struct drm_device *dev) drm_connector_attach_property(connector, dev->mode_config.tv_bottom_margin_property, tv_priv->margin[TV_MARGIN_BOTTOM]); - - dev_priv->hotplug_supported_mask |= TV_HOTPLUG_INT_STATUS; out: drm_sysfs_connector_add(connector); } Although on its own, it didn't have any effect. (I've not tried the former without the latter). Did this patch ever get incorporated? Zhenyu? Hello, I just wanted to say that the patch in comment#2 solves my bug: Summary: Misdetection of the TV output http://bugzilla.kernel.org/show_bug.cgi?id=14792 Thanks, Santi I don't know much about current TV detect status. Yakui, do you have anything like that in your mind? One caveat witih this patch.. is that I _have not_ verified that TV-out detection works with it! I don't have a TV to test on, nor anything which will accept an S-Video connection. Hmm... actually, I might be able to dig out a projector which does.. but I would need to go buy a cable I think! (In reply to comment #5) > One caveat witih this patch.. is that I _have not_ verified that TV-out > detection works with it! It seems that the TV detection logic is disabled completely in the patch. In such case the TV can't be detected. will you please confirm whether there exists the TV connector plug on your laptop? Please also attach the output of vbios.dump and dmidecode on your box? The vbios.dump can be obtained by using the following command: 1. echo 1 > /sys/devices/pci0000:00/0000:00:02.0/rom 2. cat /sys/devices/pci0000:00/0000:00:02.0/rom >vbios.dump 3. echo 0 > /sys/devices/pci0000:00/0000:00:02.0/rom Thanks. > > I don't have a TV to test on, nor anything which will accept an S-Video > connection. Hmm... actually, I might be able to dig out a projector which > does.. but I would need to go buy a cable I think! > (In reply to comment #3) > Hello, > > I just wanted to say that the patch in comment#2 solves my bug: > > Summary: Misdetection of the TV output > http://bugzilla.kernel.org/show_bug.cgi?id=14792 > > Thanks, > Santi > Hi, Santi Will you please attach the output of dmidecode, vbios.dump on your box? thanks. I have an S-Video connector on my HP nc6730b. Do you want the log files from me as well? Regarding disabling the detect logic - I wasn't sure from the wording of the PRM - it seems a little ambiguous. My intent was is that it disables the state-change interrupt generation logic, not the polling based load detect method. You'd need to refer to a hardware state-machine or functional diagram to really know what the effect of unsetting TVDAC_STATE_CHG_EN is. My thought was that it disables the edge triggered logic in the chip, but not the level triggered stuff handled by polling. Of course.. I'm just guessing, as I have no reference materials. Created attachment 33146 [details]
dmidecode output, Dell Latitude E5400
Created attachment 33147 [details]
vbios.dump, Dell Latitude E5400
Hi,
here you have the output you requested, I don't have the cable to connect a TV in the TV output, but it is in my shopping list.
Thanks,
Santi
Created attachment 33148 [details]
Video BIOS dump, HP 6730b
Created attachment 33149 [details]
dmidecode output for HP 6730b
Created attachment 34472 [details] [review] try the patch that uses the bios mechanism to detect TV Does anyone have an opportunity to try the attached patch and see whether the TV is still misdetected? thanks. Hi, I had the same issue on my HP 6530b with Intel 4500MHD graphics card. Using the patch from https://bugzilla.kernel.org/show_bug.cgi?id=14792#c22 worked great for me. Tested with 2.6.33.2 vanilla kernel on Arch Linux x86_64. Beside removing the misdetection issue TV out works if a TV is plugged in. Thanks for that! Created attachment 34740 [details] [review] the updated patch that Clear the TV sense state bits on cantiga to make TV detection reliable Hi, Flex Thanks for the testing. It is good news that the misdetection issue is fixed. Can you try the updated patch and see whether it works for you? Thanks. Hi, I tested the patch and it works good. Tested with TV connected on boot, TV connect after boot and TV disconnected. Again vanilla kernel 2.6.33.2. One little resolution "problem" was noticed. If "video=1440x900@60" is not appended to kernel line and TV is connected, the console framebuffer does not fit the laptop display (too small). Having the appendix my console fits the whole screen and TV dimension is adapted accordingly. I did not check this with the last patch since I always had "video=1440x900@60" as default option to my kernel line. (In reply to comment #16) > Hi, > > I tested the patch and it works good. Tested with TV connected on boot, TV > connect after boot and TV disconnected. Again vanilla kernel 2.6.33.2. Thanks for your testing. Appreciate your efforts. > > One little resolution "problem" was noticed. If "video=1440x900@60" is not > appended to kernel line and TV is connected, the console framebuffer does not > fit the laptop display (too small). Having the appendix my console fits the > whole screen and TV dimension is adapted accordingly. When the TV is connected, it will select the common mode for LVDS and TV if there is no boot option of "video=1440x900@60". After the boot option of "video=1440x900@60" is added, the 1440x900 is used as the common mode for TV/LVDS. In such case it can fit the laptop display very well. Thanks again. > > I did not check this with the last patch since I always had "video=1440x900@60" > as default option to my kernel line. Now the following commit is already shipped and this bug will be marked as resolved. commit fb8b5a39b6310379d7b54c0c7113703a8eaf4a57 Author: Zhao Yakui <yakui.zhao@intel.com> Date: Wed Apr 7 17:11:19 2010 +0800 drm/i915: Configure the TV sense state correctly on GM45 to make TV detection reliable Thanks. Patch actually got reverted. *** Bug 27169 has been marked as a duplicate of this bug. *** Patch is on track to get merged into 3.5, already included in drm-intel-next-queued as commit e7e58eb5c0d1d7d1a42fcb2b5a247d28ec08b47e Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Sun Mar 25 19:47:43 2012 +0200 drm/i915: mark pwrite/pread slowpaths with unlikely Meh, pasted wrong patch, this one is the right one: commit d42c9e2c24f7e7897405b85816bdf4ac924881c0 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Sun Mar 25 22:56:14 2012 +0200 drm/i915: reinstate GM45 TV detection fix |
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.
Chip: 00:02.0 0300: 8086:2a42 (rev 07) Laptop: HP 6730b (which has an S-Video output) Symptom: Running xrandr repeatedly sometimes shows spurious TV modes detected: > --------------------------- > TV1 disconnected (normal left inverted right x axis y axis) > --------------------------- > TV1 connected 1360x768+1680+0 (normal left inverted right x axis y > axis) 0mm x 0mm > 1360x768 59.8* > 1152x864 60.0 > 1024x768 60.0 > 800x600 60.3 > 640x480 59.9 > --------------------------- > TV1 connected 848x480+1680+0 (normal left inverted right x axis y > axis) 0mm x 0mm > 848x480 30.0*+ > 640x480 30.0 + > 1024x768 30.0 > 800x600 30.0 > --------------------------- > TV1 disconnected (normal left inverted right x axis y axis) > 848x480 (0x12d) 14.5MHz > h: width 848 start 849 end 912 total 944 skew 0 > clock 15.4KHz v: height 480 start 481 end 512 total > 513 clock 30.0Hz --------------------------- This causes various effects, including occasional low-res at the GDM screen, wide virtual desktop - where the cursor goes onto the falsely detected TV-out. Because the detections are spurious, and each probe can give a positive or negative result, this also hightlighted a bug in libdrm / the kernel ioctl interface it uses which means when the mode list changes _during_ a probe, it can cause a crash in the Xorg 2D driver.