drm/nouveau/pmu: make sure the reset hook exists before running it
Some PMU implementations (in particular the ones managed by secure boot) may not have a reset() hook. Make sure we don't crash in that case. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
ba735d061d
commit
485a20eff2
@ -85,6 +85,7 @@ nvkm_pmu_reset(struct nvkm_pmu *pmu)
|
|||||||
);
|
);
|
||||||
|
|
||||||
/* Reset. */
|
/* Reset. */
|
||||||
|
if (pmu->func->reset)
|
||||||
pmu->func->reset(pmu);
|
pmu->func->reset(pmu);
|
||||||
|
|
||||||
/* Wait for IMEM/DMEM scrubbing to be complete. */
|
/* Wait for IMEM/DMEM scrubbing to be complete. */
|
||||||
|
Loading…
Reference in New Issue
Block a user