提交 485a20ef 编写于 作者: A Alexandre Courbot 提交者: 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: NAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 ba735d06
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册