]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerArchit Taneja <architt@codeaurora.org>
Wed, 18 Jan 2017 03:59:34 +0000 (09:29 +0530)
commit89a3d24929099a9c3f84bf91632efc7cc649ed3a
tree3bdc49da007f85bba3f5f2566719e87ddcd9a00b
parentc83ac5e4be43839f32d234f7e7fbe071f34184e3
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
drivers/gpu/drm/bridge/dw-hdmi.c
drivers/gpu/drm/bridge/dw-hdmi.h