projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e97140
)
drm/nouveau/runpm: fix module unload
author
Alex Deucher
<
[email protected]
>
Fri, 12 Sep 2014 22:06:56 +0000
(18:06 -0400)
committer
Alex Deucher
<
[email protected]
>
Thu, 18 Sep 2014 23:22:37 +0000
(19:22 -0400)
Use the new vga_switcheroo_fini_domain_pm_ops function
to unregister the pm ops.
Based on a patch from:
Pali Rohár <
[email protected]
>
bug:
https://bugzilla.kernel.org/show_bug.cgi?id=84431
Reviewed-by: Ben Skeggs <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
Cc:
[email protected]
Cc: Ben Skeggs <
[email protected]
>
drivers/gpu/drm/nouveau/nouveau_vga.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nouveau_vga.c
b/drivers/gpu/drm/nouveau/nouveau_vga.c
index 18d55d4472483ea5ef43c72087807eb0971ec9b4..c7592ec8ecb8e430a49e836e05d64914dd2693ac 100644
(file)
--- a/
drivers/gpu/drm/nouveau/nouveau_vga.c
+++ b/
drivers/gpu/drm/nouveau/nouveau_vga.c
@@
-108,7
+108,16
@@
void
nouveau_vga_fini(struct nouveau_drm *drm)
{
struct drm_device *dev = drm->dev;
+ bool runtime = false;
+
+ if (nouveau_runtime_pm == 1)
+ runtime = true;
+ if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm()))
+ runtime = true;
+
vga_switcheroo_unregister_client(dev->pdev);
+ if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus())
+ vga_switcheroo_fini_domain_pm_ops(drm->dev->dev);
vga_client_register(dev->pdev, NULL, NULL, NULL);
}