Bug 34682

Summary: No support for LVDS 24 bit with kernel mode setting?
Product: DRI Reporter: Mike Isely <isely>
Component: DRM/IntelAssignee: Chris Wilson <chris>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: medium CC: jbarnes
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=15201
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
24 bit LVDS control / support in drm/i915
none
24 bit LVDS control / support w/ whitespace fixes
none
24 bit LVDS control / support corrected again none

Description Mike Isely 2011-02-24 14:17:55 UTC
About 3 years ago I wrote bug ID #15201 and followed it up with a simple patch to the Intel xorg driver to enable the use of LVDS devices which expect pixel data formatted as 24 bits (as opposed to the usual 18 bit pixel data).

Now 3 years later, the project which triggered #15201 has moved on to a much more recent Intel GPU and with that we've been unsurprisingly forced up to a more recent kernel, DRI driver, etc.  And that also required a shift to a much later Intel xorg driver that no longer does mode switching in user space - instead it's using kernel mode setting (KMS).  It appears that the fix from #15201 was a casualty of the move to KMS, now that the old UMS code - which had that fix - has since been removed from the userspace Intel xorg driver.  So now I'm stuck once again with a 24 bit LVDS display device that won't work in Linux with the Intel driver.

I've examined drivers/gpu/dri/i915 in kernel 2.6.38-rc5 and I see similar old code in intel_display.c that predates the fix I had made 3 years ago in the userspace side.  I believe I can make the same fix again here, except the switch controlling this will probably now have to be a kernel module option instead of an option to the xorg driver itself.

Are there any objections to me (re)creating this fix and submitting it here for inclusion into the kernel?  Or is it possible - even likely - that somebody has already done this a different way and I just haven't figured it out yet?

  -Mike Isely
   isely@pobox.com
Comment 1 Chris Wilson 2011-02-24 14:28:38 UTC
A module option is better than nothing. I'm just mildly amused that there is no panel configuration data that tells us the actual color depth.
Comment 2 Mike Isely 2011-02-28 13:31:10 UTC
Created attachment 43944 [details] [review]
24 bit LVDS control / support in drm/i915

Here's a git patch that (re)implements LVDS 24 bit control for drm/i915, similar to what I had done in 2008 in the userspace xorg intel driver.  This was generated out of a local git repository, built directly on top of the v2.6.37.2 tag.
Comment 3 Mike Isely 2011-03-14 09:01:57 UTC
Created attachment 44442 [details] [review]
24 bit LVDS control / support w/ whitespace fixes

This is the same patch as before, but with whitespace / tabbing adjusted to match the style of the rest of the source code.  Previous match was imposing conventions not compatible with the surrounding code.
Comment 4 Mike Isely 2011-03-14 09:18:03 UTC
Created attachment 44443 [details] [review]
24 bit LVDS control / support corrected again

Sorry, previous corrected patch didn't actually have the patch data, due to PEBCAK here, wrong option to git-format-patch.  This time for sure...

Just to be clear, this is the same as the initial posted patch, except that whitespace / tabbing is cleaned up to be compatible with the surrounding code.
Comment 5 Chris Wilson 2011-03-16 11:50:41 UTC
(In reply to comment #4)
> Created an attachment (id=44443) [details]
> 24 bit LVDS control / support corrected again
> 
> Sorry, previous corrected patch didn't actually have the patch data, due to
> PEBCAK here, wrong option to git-format-patch.  This time for sure...

I'd change the chair, it's eating patches. ;-)
Comment 6 Jesse Barnes 2011-06-08 11:30:42 UTC
I think this has been merged 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.