diff options
author | David Härdeman <david@hardeman.nu> | 2010-09-24 15:44:32 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-22 04:14:30 -0400 |
commit | 3c17fe4b8f40a112a85758a9ab2aebf772bdd647 (patch) | |
tree | 11200d46545ce7d139cd5be8268ee43c402fa433 /drivers/gpu/drm/i915/intel_drv.h | |
parent | dc3f82c2e5c3f06e43855f417e4fcfc244383916 (diff) |
i915: enable AVI infoframe for intel_hdmi.c [v4]
This patch enables the sending of AVI infoframes in
drivers/gpu/drm/i915/intel_hdmi.c.
My receiver currently loses sync when the HDMI output on my computer
(DG45FC motherboard) is switched from 800x600 (the BIOS resolution) to
1920x1080 as part of the boot. Fixable by switching inputs on the receiver
a couple of times.
With this patch, my receiver has not lost sync yet (> 40 tries).
Fourth version, now based on drm-intel-next from:
git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel.git
Two questions still remain:
I'm assuming that the sdvo hardware also stores a header ECC byte in
the MSB of the first dword - is this correct?
Does the SDVOB and SDVOC handling in intel_hdmi_set_avi_infoframe()
look correct?
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 0581e5e5ac55..9af9f86a8765 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -178,6 +178,38 @@ struct intel_crtc { | |||
178 | #define to_intel_encoder(x) container_of(x, struct intel_encoder, base) | 178 | #define to_intel_encoder(x) container_of(x, struct intel_encoder, base) |
179 | #define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base) | 179 | #define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base) |
180 | 180 | ||
181 | #define DIP_TYPE_AVI 0x82 | ||
182 | #define DIP_VERSION_AVI 0x2 | ||
183 | #define DIP_LEN_AVI 13 | ||
184 | |||
185 | struct dip_infoframe { | ||
186 | uint8_t type; /* HB0 */ | ||
187 | uint8_t ver; /* HB1 */ | ||
188 | uint8_t len; /* HB2 - body len, not including checksum */ | ||
189 | uint8_t ecc; /* Header ECC */ | ||
190 | uint8_t checksum; /* PB0 */ | ||
191 | union { | ||
192 | struct { | ||
193 | /* PB1 - Y 6:5, A 4:4, B 3:2, S 1:0 */ | ||
194 | uint8_t Y_A_B_S; | ||
195 | /* PB2 - C 7:6, M 5:4, R 3:0 */ | ||
196 | uint8_t C_M_R; | ||
197 | /* PB3 - ITC 7:7, EC 6:4, Q 3:2, SC 1:0 */ | ||
198 | uint8_t ITC_EC_Q_SC; | ||
199 | /* PB4 - VIC 6:0 */ | ||
200 | uint8_t VIC; | ||
201 | /* PB5 - PR 3:0 */ | ||
202 | uint8_t PR; | ||
203 | /* PB6 to PB13 */ | ||
204 | uint16_t top_bar_end; | ||
205 | uint16_t bottom_bar_start; | ||
206 | uint16_t left_bar_end; | ||
207 | uint16_t right_bar_start; | ||
208 | } avi; | ||
209 | uint8_t payload[27]; | ||
210 | } __attribute__ ((packed)) body; | ||
211 | } __attribute__((packed)); | ||
212 | |||
181 | static inline struct drm_crtc * | 213 | static inline struct drm_crtc * |
182 | intel_get_crtc_for_pipe(struct drm_device *dev, int pipe) | 214 | intel_get_crtc_for_pipe(struct drm_device *dev, int pipe) |
183 | { | 215 | { |
@@ -200,6 +232,7 @@ extern bool intel_ddc_probe(struct intel_encoder *intel_encoder, int ddc_bus); | |||
200 | 232 | ||
201 | extern void intel_crt_init(struct drm_device *dev); | 233 | extern void intel_crt_init(struct drm_device *dev); |
202 | extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg); | 234 | extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg); |
235 | void intel_dip_infoframe_csum(struct dip_infoframe *avi_if); | ||
203 | extern bool intel_sdvo_init(struct drm_device *dev, int output_device); | 236 | extern bool intel_sdvo_init(struct drm_device *dev, int output_device); |
204 | extern void intel_dvo_init(struct drm_device *dev); | 237 | extern void intel_dvo_init(struct drm_device *dev); |
205 | extern void intel_tv_init(struct drm_device *dev); | 238 | extern void intel_tv_init(struct drm_device *dev); |