forked from Minki/linux
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,7 +85,8 @@ nvkm_pmu_reset(struct nvkm_pmu *pmu)
|
||||
);
|
||||
|
||||
/* Reset. */
|
||||
pmu->func->reset(pmu);
|
||||
if (pmu->func->reset)
|
||||
pmu->func->reset(pmu);
|
||||
|
||||
/* Wait for IMEM/DMEM scrubbing to be complete. */
|
||||
nvkm_msec(device, 2000,
|
||||
|
Loading…
Reference in New Issue
Block a user