UPSTREAM: drm: bridge: dw-hdmi: Reject invalid product IDs
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 17 Jan 2017 08:29:03 +0000 (10:29 +0200)
committerZheng Yang <zhengyang@rock-chips.com>
Fri, 28 Apr 2017 08:20:37 +0000 (16:20 +0800)
commit98ef5b0ab2afd36ce2cad906e5df97bc4b0aca34
treeff69e72e85c8fe510f0b117e0e8ceee1f88b47ef
parentd42cfa6c9ef5ab9d33120a0401839026804fea83
UPSTREAM: 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
Change-Id: Iaa8e17429e9b4033f97b2bf49504e6f390ce7c44
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry pick from 0527e12e8264ae96b1fcc550b4a9e5940f4ffc30)
drivers/gpu/drm/bridge/dw-hdmi.c
drivers/gpu/drm/bridge/dw-hdmi.h