]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: fixup infoframe support for sdvo
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 12 May 2012 18:22:00 +0000 (20:22 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 20 May 2012 15:11:11 +0000 (17:11 +0200)
commite93c5bbd564a5ebf0f3eb7e559ba89bbc53d7e8f
treed3315e5afc1cf4a126278eff0ab1db0fbfc492fd
parent9965efe0e1314412cc1badf60079a55b6e2a8fa7
drm/i915: fixup infoframe support for sdvo

At least the worst offenders:
- SDVO specifies that the encoder should compute the ecc. Testing also
  shows that we must not send the ecc field, so copy the dip_infoframe
  struct to a temporay place and avoid the ecc field. This way the avi
  infoframe is exactly 17 bytes long, which agrees with what the spec
  mandates as a minimal storage capacity (with the ecc field it would
  be 18 bytes).
- Only 17 when sending the avi infoframe. The SDVO spec explicitly
  says that sending more data than what the device announces results
  in undefined behaviour.
- Add __attribute__((packed)) to the avi and spd infoframes, for
  otherwise they're wrongly aligned. Noticed because the avi infoframe
  ended up being 18 bytes large instead of 17. We haven't noticed this
  yet because we don't use the uint16_t fields yet (which are the only
  ones that would be wrongly aligned).

This regression has been introduce by

7c85e238042983775501f8cada629b0b7602c15d is the first bad commit
commit 7c85e238042983775501f8cada629b0b7602c15d
Author: David Härdeman <david@hardeman.nu>
Date:   Fri Sep 24 21:44:32 2010 +0200

    i915: enable AVI infoframe for intel_hdmi.c [v4]

Patch tested on my g33 with a sdvo hdmi adaptor.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=25732
Tested-by: Peter Ross <pross@xvid.org> (G35 SDVO-HDMI)
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sdvo.c