drm: bridge: dw-hdmi: Reject invalid product IDs

The DWC HDMI TX can be recognized by the two product identification
registers. If the registers don't read as expect the IP will be very
different than what the driver has been designed for, or will be
misconfigured in a way that makes it non-operational (invalid memory
address, incorrect clocks, ...). We should reject this situation with an
error.

While this isn't critical for proper operation with supported IPs at the
moment, the driver will soon gain automatic device-specific handling
based on runtime device identification. This change makes it easier to
implement that without having to default to a random guess in case the
device can't be identified.

While at it print a readable version number in the device identification
message instead of raw register values.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-14-laurent.pinchart+renesas@ideasonboard.com
This commit is contained in:
Laurent Pinchart
2017-01-17 10:29:03 +02:00
committed by Archit Taneja
szülő f4104e8fe1
commit 0527e12e82
2 fájl változott, egészen pontosan 27 új sor hozzáadva és 6 régi sor törölve

Fájl megtekintése

@@ -545,6 +545,14 @@
#define HDMI_I2CM_FS_SCL_LCNT_0_ADDR 0x7E12
enum {
/* PRODUCT_ID0 field values */
HDMI_PRODUCT_ID0_HDMI_TX = 0xa0,
/* PRODUCT_ID1 field values */
HDMI_PRODUCT_ID1_HDCP = 0xc0,
HDMI_PRODUCT_ID1_HDMI_RX = 0x02,
HDMI_PRODUCT_ID1_HDMI_TX = 0x01,
/* CONFIG0_ID field values */
HDMI_CONFIG0_I2S = 0x10,