Bug 73362 - [gm965 regression] TV-out not working
Summary: [gm965 regression] TV-out not working
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Jani Nikula
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-07 16:06 UTC by Matthew Khouzam
Modified: 2017-07-24 22:56 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
i915_capabilities (supports_tv: yes) (457 bytes, text/plain)
2014-01-08 02:55 UTC, Matthew Khouzam
no flags Details
i915_opregion (8.00 KB, application/octet-stream)
2014-01-08 02:56 UTC, Matthew Khouzam
no flags Details
drm/i915/tv: fix gen4 composite s-video tv-out (2.03 KB, patch)
2014-02-04 20:26 UTC, Jani Nikula
no flags Details | Splinter Review

Description Matthew Khouzam 2014-01-07 16:06:03 UTC
Hello, 

I have isolated a bug, I think with the intel driver no longer supporting tv-out (svideo/component/composite) on newer kernels.

The problem appears to be in drivers/gpu/drm/i915/intel_tv.c, in "void intel_tv_init(struct drm_device *dev)" (line 1550 approx)

the function tv_is_present_in_vbt return 0 so it aborts at this line. 
if (!tv_is_present_in_vbt(dev)) {
                 DRM_DEBUG_KMS("Integrated TV is not present.\n");
                 return;
        }

Upon inspecting the function static int tv_is_present_in_vbt(struct drm_device *dev), the device enumeration only cycles through the lvds and the vga out. 

As a stop-gap for my htpc, I just changed the return value of that function to 1 and now everything works well for me, but this is a duct tape fix and not kernel worthy.

I hope this helps, at this point my better half is using the htpc and it would be very dangerous to my wellbeing if I reboot with the old kernel and drm.debug=0x6.

Thanks,

Matthew
Comment 1 Jani Nikula 2014-01-07 16:33:30 UTC
Any ideas which old version worked, when was this broken, and what are you running now (the patched version)?

Please mount debugfs and attach ./debug/dri/0/i915_capabilities and ./debug/dri/0/i915_opregion from there.
Comment 2 Matthew Khouzam 2014-01-08 02:55:05 UTC
Created attachment 91636 [details]
i915_capabilities (supports_tv: yes)
Comment 3 Matthew Khouzam 2014-01-08 02:55:43 UTC
It worked with ubuntu 10.04 but not 12.04, I know that leaves a two year range, but upon searching newsgroups, it looks like it's an issue between 10.04 and 10.10, so probably between 2.6.32 and 2.6.38. 

I am right now running a patched 3.11.10 kernel. My patch consists solely of assigning ret to 1 in tv_is_present_in_vbt

Here are the two files requested.
Comment 4 Matthew Khouzam 2014-01-08 02:56:25 UTC
Created attachment 91637 [details]
i915_opregion
Comment 5 Jani Nikula 2014-02-04 19:41:00 UTC
(In reply to comment #3)
> It worked with ubuntu 10.04 but not 12.04, I know that leaves a two year
> range, but upon searching newsgroups, it looks like it's an issue between
> 10.04 and 10.10, so probably between 2.6.32 and 2.6.38. 

A possible culprit is the introduction of the whole tv_is_present_in_vbt() function in 2.6.33:

commit c35614380d5c956bfda20eab2755b2f5a7d6f1e7
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Tue Nov 24 09:48:48 2009 +0800

    drm/i915: Don't set up the TV port if it isn't in the BIOS table.
    
    Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
    Signed-off-by: Eric Anholt <eric@anholt.net>

It does not give me much consolation that we wouldn't accept such terse commit messages to the driver these days.
Comment 6 Jani Nikula 2014-02-04 20:26:24 UTC
Created attachment 93415 [details] [review]
drm/i915/tv: fix gen4 composite s-video tv-out

Please try the attached patch (with your own w/a removed) and report back. Thanks.
Comment 7 Jani Nikula 2014-03-14 13:19:52 UTC
(In reply to comment #6)
> Created attachment 93415 [details] [review] [review]
> drm/i915/tv: fix gen4 composite s-video tv-out
> 
> Please try the attached patch (with your own w/a removed) and report back.
> Thanks.

Matthew, please try the patch and report back to get this bug moving. Thanks.
Comment 8 Daniel Vetter 2014-03-27 10:02:33 UTC
Matthew, ping? Not many changes in intel_tv.c recently, so should apply pretty much to any recent kernel release.
Comment 9 Matthew Khouzam 2014-03-28 02:15:12 UTC
Sorry, works for me now, I had a hard time getting the patch to work due to lack of experience on my side.
Comment 10 Jani Nikula 2014-03-28 06:56:43 UTC
(In reply to comment #9)
> Sorry, works for me now, I had a hard time getting the patch to work due to
> lack of experience on my side.

No worries. Thanks for testing.

Patch submitted to the mailing list for inclusion in the driver and to be backported into stable kernels. I'm reopening the bug; we keep bugs open until the fix has actually been pushed to our repositories so we don't lose track of things.
Comment 11 Jani Nikula 2014-03-31 06:27:01 UTC
Fixed by
commit e1f23f3dd817f53f622e486913ac662add46eeed
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Fri Mar 28 08:54:04 2014 +0200

    drm/i915/tv: fix gen4 composite s-video tv-out

Thanks for the report and testing.


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.