mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
drm/vc4: Ignore HVS unless initialised
An upstream commit to report HVS underruns causes VC4 in firmware KMS
mode to cross into the HVS side, where it crashes due to a NULL hvs
pointer.
Make the underrun masking conditional on the hvs pointer being
initialised.
Fixes: 531a1b622d ("drm/vc4: Report HVS underrun errors")
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
This commit is contained in:
@@ -798,7 +798,8 @@ static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc)
|
||||
* the CRTC and encoder already reconfigured, leading to
|
||||
* underruns. This can be seen when reconfiguring the CRTC.
|
||||
*/
|
||||
vc4_hvs_unmask_underrun(dev, vc4_crtc->channel);
|
||||
if (vc4->hvs)
|
||||
vc4_hvs_unmask_underrun(dev, vc4_crtc->channel);
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->event_lock, flags);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ vc4_atomic_complete_commit(struct drm_atomic_state *state)
|
||||
struct vc4_crtc *vc4_crtc;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dev->mode_config.num_crtc; i++) {
|
||||
for (i = 0; vc4->hvs && i < dev->mode_config.num_crtc; i++) {
|
||||
if (!state->crtcs[i].ptr || !state->crtcs[i].commit)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user