summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-11-09 10:39:08 +1000
committerBen Skeggs <bskeggs@redhat.com>2016-11-17 09:50:36 +1000
commit2f524aa0b72965b28eb7f648d6faaeb2719c7582 (patch)
treeddc1fae035630ff5f92e976b595449fde12361fb /drivers/gpu
parentda7d2062fc541e307a290427b0dc7276ed2beb0e (diff)
downloadblackbird-op-linux-2f524aa0b72965b28eb7f648d6faaeb2719c7582.tar.gz
blackbird-op-linux-2f524aa0b72965b28eb7f648d6faaeb2719c7582.zip
drm/nouveau/pmu: execute reset before running devinit
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c8
1 files changed, 8 insertions, 0 deletions
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
@@ -97,6 +97,13 @@ nvkm_pmu_reset(struct nvkm_pmu *pmu)
}
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)
{
struct nvkm_pmu *pmu = nvkm_pmu(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,
OpenPOWER on IntegriCloud