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)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 23 Nov 2018 11:51:23 +0000 (13:51 +0200)
commit63a298f22a6183b5b7536a203596c6570dfcfe8e
treef1c2ad4bacdf50382834331da4a1e3e65a5dcc4f
parentbf17cda650d5723bbc1439bbcde81265ad207004
drm: rcar-du: Fix external clock error checks

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>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c