From 2f524aa0b72965b28eb7f648d6faaeb2719c7582 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 9 Nov 2016 10:39:08 +1000 Subject: [PATCH] drm/nouveau/pmu: execute reset before running devinit Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c index a843cef2475d..e611ce80f8ef 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c @@ -96,6 +96,13 @@ nvkm_pmu_reset(struct nvkm_pmu *pmu) return 0; } +static int +nvkm_pmu_preinit(struct nvkm_subdev *subdev) +{ + struct nvkm_pmu *pmu = nvkm_pmu(subdev); + return nvkm_pmu_reset(pmu); +} + static int nvkm_pmu_init(struct nvkm_subdev *subdev) { @@ -115,6 +122,7 @@ nvkm_pmu_dtor(struct nvkm_subdev *subdev) static const struct nvkm_subdev_func nvkm_pmu = { .dtor = nvkm_pmu_dtor, + .preinit = nvkm_pmu_preinit, .init = nvkm_pmu_init, .fini = nvkm_pmu_fini, .intr = nvkm_pmu_intr, -- 2.30.2