diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2014-07-15 10:36:11 +0900 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-08-10 05:11:10 +1000 |
commit | 25856c0b04fd9ea616acaf3318d0db1cd70bb00a (patch) | |
tree | 48271cc7a9515191611d7846d84427f61f527f0b /drivers | |
parent | ec1afbf4e1025f74e636ada2e7da3963c8da4c06 (diff) |
drm/nve4/graph: do not crash if no power device present
Detect and workaround the absence of a power device so chips that do not
feature one (e.g. GK20A) can still use this driver.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/graph/nve4.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nve4.c b/drivers/gpu/drm/nouveau/core/engine/graph/nve4.c index 1ba6666da4e..fb9cb929320 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nve4.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nve4.c @@ -203,7 +203,8 @@ nve4_graph_init(struct nouveau_object *object) int gpc, tpc, rop; int ret, i; - ppwr->pgob(ppwr, false); + if (ppwr) + ppwr->pgob(ppwr, false); ret = nouveau_graph_init(&priv->base); if (ret) |