]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm: rcar-du: Fix external clock error checks
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 6 Nov 2018 15:13:44 +0000 (17:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 19:02:10 +0000 (20:02 +0100)
commitfe6148df4d3f78af4a63238ae701c00980a054d9
tree51cdbdea721619d0f26ae0efe74256c00120687a
parentf9acb02096f0a8927029a1861cc6b143ac9b8f0c
drm: rcar-du: Fix external clock error checks

[ Upstream commit 63a298f22a6183b5b7536a203596c6570dfcfe8e ]

The rcar-du driver supports probe deferral for external clocks, but
implements it badly by checking the wrong pointer due to a bad copy and
paste. Fix it.

While at it, reject invalid clocks outright for DU channels that have a
display PLL, as the external clock is mandatory in that case. This
avoids a WARN_ON() at runtime.

Fixes: 1b30dbde8596 ("drm: rcar-du: Add support for external pixel clock")
Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c