drm/edid: parse CEA blocks embedded in DisplayID
DisplayID blocks allow embedding of CEA blocks. The payloads are identical to traditional top level CEA extension blocks, but the header is slightly different. This change allows the CEA parser to find a CEA block inside a DisplayID block. Additionally, it adds support for parsing the embedded CTA header. No further changes are necessary due to payload parity. This change fixes audio support for the Valve Index HMD. Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: <stable@vger.kernel.org> # v4.15 Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190619180901.17901-1-andresx7@gmail.com
This commit is contained in:

committed by
Dave Airlie

parent
dfd03396d7
commit
e28ad544f4
@@ -40,6 +40,7 @@
|
||||
#define DATA_BLOCK_DISPLAY_INTERFACE 0x0f
|
||||
#define DATA_BLOCK_STEREO_DISPLAY_INTERFACE 0x10
|
||||
#define DATA_BLOCK_TILED_DISPLAY 0x12
|
||||
#define DATA_BLOCK_CTA 0x81
|
||||
|
||||
#define DATA_BLOCK_VENDOR_SPECIFIC 0x7f
|
||||
|
||||
@@ -90,4 +91,13 @@ struct displayid_detailed_timing_block {
|
||||
struct displayid_block base;
|
||||
struct displayid_detailed_timings_1 timings[0];
|
||||
};
|
||||
|
||||
#define for_each_displayid_db(displayid, block, idx, length) \
|
||||
for ((block) = (struct displayid_block *)&(displayid)[idx]; \
|
||||
(idx) + sizeof(struct displayid_block) <= (length) && \
|
||||
(idx) + sizeof(struct displayid_block) + (block)->num_bytes <= (length) && \
|
||||
(block)->num_bytes > 0; \
|
||||
(idx) += (block)->num_bytes + sizeof(struct displayid_block), \
|
||||
(block) = (struct displayid_block *)&(displayid)[idx])
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user