]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm: rcar-du: Fix crash when using LVDS1 clock for CRTC
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 4 Dec 2020 11:43:58 +0000 (13:43 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 5 Jan 2021 05:19:56 +0000 (07:19 +0200)
commit53ced169373aab52d3b5da0fee6a342002d1876d
tree144a344465d232d62b4d8748fd5baacaa3ff2bde
parent2551952e802cab4c01081c1c880643795af2afb8
drm: rcar-du: Fix crash when using LVDS1 clock for CRTC

On D3 and E3 platforms, the LVDS encoder includes a PLL that can
generate a clock for the corresponding CRTC, used even when the CRTC
output to a non-LVDS port. This mechanism is supported by the driver,
but the implementation is broken in dual-link LVDS mode. In that case,
the LVDS1 drm_encoder is skipped, which causes a crash when trying to
access its bridge later on.

Fix this by storing bridge pointers internally instead of retrieving
them from the encoder. The rcar_du_device encoders field isn't used
anymore and can be dropped.

Fixes: 8e8fddab0d0a ("drm: rcar-du: Skip LVDS1 output on Gen3 when using dual-link LVDS mode")
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c
drivers/gpu/drm/rcar-du/rcar_du_drv.h
drivers/gpu/drm/rcar-du/rcar_du_encoder.c