Commit 485a20ef authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs

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: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent ba735d06
...@@ -85,7 +85,8 @@ nvkm_pmu_reset(struct nvkm_pmu *pmu) ...@@ -85,7 +85,8 @@ nvkm_pmu_reset(struct nvkm_pmu *pmu)
); );
/* Reset. */ /* Reset. */
pmu->func->reset(pmu); if (pmu->func->reset)
pmu->func->reset(pmu);
/* Wait for IMEM/DMEM scrubbing to be complete. */ /* Wait for IMEM/DMEM scrubbing to be complete. */
nvkm_msec(device, 2000, nvkm_msec(device, 2000,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment