Skip to content

Commit

Permalink
drm: rp1: VEC and DPI drivers: Fix bug raspberrypi#5901
Browse files Browse the repository at this point in the history
Don't try to write to an unmapped register during clean-up.
This covers the case where a Video Out Config register block
could not be mapped due to contention from another driver.

Signed-off-by: Nick Hollinghurst <[email protected]>
  • Loading branch information
njhollinghurst committed Feb 3, 2024
1 parent 30ac8b8 commit 7962d20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/rp1/rp1-dpi/rp1_dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ static void rp1dpi_stopall(struct drm_device *drm)
clk_disable_unprepare(dpi->clocks[RP1DPI_CLK_DPI]);
dpi->dpi_running = false;
}
rp1dpi_vidout_poweroff(dpi);
if (dpi->hw_base[RP1DPI_HW_BLOCK_CFG])
rp1dpi_vidout_poweroff(dpi);
pinctrl_pm_select_sleep_state(&dpi->pdev->dev);
}
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/rp1/rp1-vec/rp1_vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ static void rp1vec_stopall(struct drm_device *drm)
rp1vec_hw_stop(vec);
vec->vec_running = false;
}
rp1vec_vidout_poweroff(vec);
if (vec->hw_base[RP1VEC_HW_BLOCK_CFG])
rp1vec_vidout_poweroff(vec);
}
}

Expand Down

0 comments on commit 7962d20

Please sign in to comment.