All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/pm: fix oops on get/set_perflvl
@ 2012-05-27 20:00 Marcin Slusarz
       [not found] ` <20120527200041.GE2907-OI9uyE9O0yo@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Slusarz @ 2012-05-27 20:00 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Ben Skeggs

Regression from "drm/nouveau: very scary looking cleanup commit"

Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/gpu/drm/nouveau/nouveau_pm.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
index 9dd34fe..5539482 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -306,7 +306,8 @@ nouveau_pm_get_perflvl_info(struct device *d,
 static ssize_t
 nouveau_pm_get_perflvl(struct device *d, struct device_attribute *a, char *buf)
 {
-	struct nouveau_device *ndev = pci_get_drvdata(to_pci_dev(d));
+	struct drm_device *dev = pci_get_drvdata(to_pci_dev(d));
+	struct nouveau_device *ndev = nouveau_device(dev);
 	struct nouveau_pm_engine *pm = &ndev->subsys.pm;
 	struct nouveau_pm_level cur;
 	int len = PAGE_SIZE, ret;
@@ -327,7 +328,8 @@ static ssize_t
 nouveau_pm_set_perflvl(struct device *d, struct device_attribute *a,
 		       const char *buf, size_t count)
 {
-	struct nouveau_device *ndev = pci_get_drvdata(to_pci_dev(d));
+	struct drm_device *dev = pci_get_drvdata(to_pci_dev(d));
+	struct nouveau_device *ndev = nouveau_device(dev);
 	int ret;
 
 	ret = nouveau_pm_profile_set(ndev, buf);
-- 
1.7.8.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/nouveau/pm: fix oops on get/set_perflvl
       [not found] ` <20120527200041.GE2907-OI9uyE9O0yo@public.gmane.org>
@ 2012-05-29 11:15   ` Ben Skeggs
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Skeggs @ 2012-05-29 11:15 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Sun, May 27, 2012 at 10:00:41PM +0200, Marcin Slusarz wrote:
> Regression from "drm/nouveau: very scary looking cleanup commit"
Thanks, pushed.

> 
> Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/gpu/drm/nouveau/nouveau_pm.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c
> index 9dd34fe..5539482 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_pm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
> @@ -306,7 +306,8 @@ nouveau_pm_get_perflvl_info(struct device *d,
>  static ssize_t
>  nouveau_pm_get_perflvl(struct device *d, struct device_attribute *a, char *buf)
>  {
> -	struct nouveau_device *ndev = pci_get_drvdata(to_pci_dev(d));
> +	struct drm_device *dev = pci_get_drvdata(to_pci_dev(d));
> +	struct nouveau_device *ndev = nouveau_device(dev);
>  	struct nouveau_pm_engine *pm = &ndev->subsys.pm;
>  	struct nouveau_pm_level cur;
>  	int len = PAGE_SIZE, ret;
> @@ -327,7 +328,8 @@ static ssize_t
>  nouveau_pm_set_perflvl(struct device *d, struct device_attribute *a,
>  		       const char *buf, size_t count)
>  {
> -	struct nouveau_device *ndev = pci_get_drvdata(to_pci_dev(d));
> +	struct drm_device *dev = pci_get_drvdata(to_pci_dev(d));
> +	struct nouveau_device *ndev = nouveau_device(dev);
>  	int ret;
>  
>  	ret = nouveau_pm_profile_set(ndev, buf);
> -- 
> 1.7.8.6
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-29 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-27 20:00 [PATCH] drm/nouveau/pm: fix oops on get/set_perflvl Marcin Slusarz
     [not found] ` <20120527200041.GE2907-OI9uyE9O0yo@public.gmane.org>
2012-05-29 11:15   ` Ben Skeggs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.