edid: add hdmi_monitor_detected in data struct edid
HDMI driver need to know whether the monitor is DVI
or HDMI interface, so this commit just introduce a
new number 'hdmi_monitor_detected' to struct edid.
There were four bits to indicate the monitor interfaces,
it's better to take use of that. But those bits only
existed in EDID 1.4 version, but didn't persented in
the previous EDID version, so I decided to detect the
hdmi cea block.
BRANCH=none
BUG=chrome-os-partner:43789
TEST=When mickey connect with HDMI monitor, see 'hdmi_monitor_detected' is 'true'.
When mickey connect with DVI monitor, see 'hdmi_monitor_detected' is 'false'.
Change-Id: Ife770898b0f2b4f58b8259711101a0cab4a5e4ac
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/309275
Reviewed-by: Agnes Cheng <agnescheng@google.com>
Commit-Queue: Agnes Cheng <agnescheng@google.com>
Trybot-Ready: Agnes Cheng <agnescheng@google.com>
Tested-by: Agnes Cheng <agnescheng@google.com>
This commit is contained in:
parent
582d2451fe
commit
71186f21bd
2 changed files with 4 additions and 0 deletions
|
|
@ -90,6 +90,8 @@ struct edid {
|
|||
u32 x_resolution;
|
||||
u32 y_resolution;
|
||||
u32 bytes_per_line;
|
||||
|
||||
int hdmi_monitor_detected;
|
||||
};
|
||||
|
||||
/* Defined in src/lib/edid.c */
|
||||
|
|
|
|||
|
|
@ -643,6 +643,8 @@ cea_hdmi_block(struct edid *out, unsigned char *x)
|
|||
{
|
||||
int length = x[0] & 0x1f;
|
||||
|
||||
out->hdmi_monitor_detected = true;
|
||||
|
||||
printk(BIOS_SPEW, " (HDMI)\n");
|
||||
printk(BIOS_SPEW,
|
||||
" Source physical address %d.%d.%d.%d\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue