diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2013-04-19 13:01:25 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-04-23 18:03:58 -0400 |
commit | fe214163cc6e6b33253b7ac14bc3dd616e76b513 (patch) | |
tree | 32c17795c76da99c458c61f71127d4897f82deb3 /include/drm/drm_edid.h | |
parent | 205996c0776a229052c33688ee58a605a021740d (diff) |
drm: add drm_edid_to_eld helper extracting SADs from EDID (v2)
Some devices (ATI/AMD cards) don't support passing ELD struct to the
hardware but just require filling specific registers and then the
hardware/firmware does the rest. In such cases we need to read the info
from SAD blocks and put them in the correct registers.
agd5f: note that the returned pointer needs to be kfreed as per
Christian's suggestion.
v2: fix warning
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/drm/drm_edid.h')
-rw-r--r-- | include/drm/drm_edid.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index 5da1b4ae7d84..fc481fc17085 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
@@ -244,12 +244,21 @@ struct edid { | |||
244 | 244 | ||
245 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) | 245 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) |
246 | 246 | ||
247 | /* Short Audio Descriptor */ | ||
248 | struct cea_sad { | ||
249 | u8 format; | ||
250 | u8 channels; /* max number of channels - 1 */ | ||
251 | u8 freq; | ||
252 | u8 byte2; /* meaning depends on format */ | ||
253 | }; | ||
254 | |||
247 | struct drm_encoder; | 255 | struct drm_encoder; |
248 | struct drm_connector; | 256 | struct drm_connector; |
249 | struct drm_display_mode; | 257 | struct drm_display_mode; |
250 | struct hdmi_avi_infoframe; | 258 | struct hdmi_avi_infoframe; |
251 | 259 | ||
252 | void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid); | 260 | void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid); |
261 | int drm_edid_to_sad(struct edid *edid, struct cea_sad **sads); | ||
253 | int drm_av_sync_delay(struct drm_connector *connector, | 262 | int drm_av_sync_delay(struct drm_connector *connector, |
254 | struct drm_display_mode *mode); | 263 | struct drm_display_mode *mode); |
255 | struct drm_connector *drm_select_eld(struct drm_encoder *encoder, | 264 | struct drm_connector *drm_select_eld(struct drm_encoder *encoder, |