summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-04-08 10:24:40 +0300
committerBen Skeggs <bskeggs@redhat.com>2016-05-20 07:43:04 +0300
commit583f8e4ea216d9d0212e63ede384893ec0c1b742 (patch)
treeccaca1ec2c7cfd05e875eaa247b33fc1c654e247 /drivers/gpu/drm/nouveau
parent70b01f07dbd093c96e9910ba613c3d40346ee222 (diff)
downloadlinux-583f8e4ea216d9d0212e63ede384893ec0c1b742.tar.xz
drm/nouveau/mc: implement support for PTOP reset info
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
index 3793bc7889d5..134d44aba1e5 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
@@ -24,6 +24,7 @@
#include "priv.h"
#include <core/option.h>
+#include <subdev/top.h>
void
nvkm_mc_unk260(struct nvkm_mc *mc, u32 data)
@@ -82,12 +83,14 @@ nvkm_mc_reset_(struct nvkm_mc *mc, enum nvkm_devidx devidx)
{
struct nvkm_device *device = mc->subdev.device;
const struct nvkm_mc_map *map;
- u64 pmc_enable = 0;
-
- for (map = mc->func->reset; map && map->stat; map++) {
- if (map->unit == devidx) {
- pmc_enable = map->stat;
- break;
+ u64 pmc_enable;
+
+ if (!(pmc_enable = nvkm_top_reset(device->top, devidx))) {
+ for (map = mc->func->reset; map && map->stat; map++) {
+ if (map->unit == devidx) {
+ pmc_enable = map->stat;
+ break;
+ }
}
}