public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* noveau: emergency shutdown handling is overcomplex and broken
@ 2016-10-25 10:50 Pavel Machek
  2016-10-25 11:09 ` [Nouveau] " Karol Herbst
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2016-10-25 10:50 UTC (permalink / raw)
  To: bskeggs, airlied, dri-devel, nouveau, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]


diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
index b9703c0..adb1deb 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
@@ -120,6 +120,11 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs,
 			struct work_struct *work;
 
 			work = kmalloc(sizeof(*work), GFP_ATOMIC);
+			/* FIXME:
+			   1) this is total overkill, orderly_poweroff() already
+			   uses schedule_work internally
+			   2) it would  be good to at least printk what is going on
+			*/
 			if (work) {
 				INIT_WORK(work, nv_poweroff_work);
 				schedule_work(work);

GFP_ATOMIC is not reliable. Plus, see the fixme.

Best regards,
									Pavel
									
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [Nouveau] noveau: emergency shutdown handling is overcomplex and broken
  2016-10-25 10:50 noveau: emergency shutdown handling is overcomplex and broken Pavel Machek
@ 2016-10-25 11:09 ` Karol Herbst
  2016-10-25 11:13   ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Karol Herbst @ 2016-10-25 11:09 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Ben Skeggs, David Airlie, dri-devel, ML nouveau,
	Linux Kernel Mailing List

Thanks for the pointer.

But I don't like this patch. If you find a bug, make a bug report or
just fix it if you know the fix already. Or write something in IRC. Or
write on the Mailing list as a general question or something else

But I really don't agree on doing it this way. You would have needed
like the same amount of time to actual fix the problem.

Anyway, for adding a printk:

struct nvkm_subdev *subdev = &therm->subdev;
nvkm_error(subdev, "message");

2016-10-25 12:50 GMT+02:00 Pavel Machek <pavel@ucw.cz>:
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
> index b9703c0..adb1deb 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
> @@ -120,6 +120,11 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs,
>                         struct work_struct *work;
>
>                         work = kmalloc(sizeof(*work), GFP_ATOMIC);
> +                       /* FIXME:
> +                          1) this is total overkill, orderly_poweroff() already
> +                          uses schedule_work internally
> +                          2) it would  be good to at least printk what is going on
> +                       */
>                         if (work) {
>                                 INIT_WORK(work, nv_poweroff_work);
>                                 schedule_work(work);
>
> GFP_ATOMIC is not reliable. Plus, see the fixme.
>
> Best regards,
>                                                                         Pavel
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
>

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

* Re: [Nouveau] noveau: emergency shutdown handling is overcomplex and broken
  2016-10-25 11:09 ` [Nouveau] " Karol Herbst
@ 2016-10-25 11:13   ` Pavel Machek
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2016-10-25 11:13 UTC (permalink / raw)
  To: Karol Herbst
  Cc: Ben Skeggs, David Airlie, dri-devel, ML nouveau,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 2356 bytes --]

On Tue 2016-10-25 13:09:25, Karol Herbst wrote:
> Thanks for the pointer.
> 
> But I don't like this patch. If you find a bug, make a bug report or
> just fix it if you know the fix already. Or write something in
> IRC. Or

I found a bug, and this is my bug report. Can you take care and fix
it?

									Pavel



> write on the Mailing list as a general question or something else
> 
> But I really don't agree on doing it this way. You would have needed
> like the same amount of time to actual fix the problem.
> 
> Anyway, for adding a printk:
> 
> struct nvkm_subdev *subdev = &therm->subdev;
> nvkm_error(subdev, "message");
> 
> 2016-10-25 12:50 GMT+02:00 Pavel Machek <pavel@ucw.cz>:
> >
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
> > index b9703c0..adb1deb 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
> > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
> > @@ -120,6 +120,11 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs,
> >                         struct work_struct *work;
> >
> >                         work = kmalloc(sizeof(*work), GFP_ATOMIC);
> > +                       /* FIXME:
> > +                          1) this is total overkill, orderly_poweroff() already
> > +                          uses schedule_work internally
> > +                          2) it would  be good to at least printk what is going on
> > +                       */
> >                         if (work) {
> >                                 INIT_WORK(work, nv_poweroff_work);
> >                                 schedule_work(work);
> >
> > GFP_ATOMIC is not reliable. Plus, see the fixme.
> >
> > Best regards,
> >                                                                         Pavel
> >
> > --
> > (english) http://www.livejournal.com/~pavelmachek
> > (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
> >
> > _______________________________________________
> > Nouveau mailing list
> > Nouveau@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/nouveau
> >

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

end of thread, other threads:[~2016-10-25 11:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25 10:50 noveau: emergency shutdown handling is overcomplex and broken Pavel Machek
2016-10-25 11:09 ` [Nouveau] " Karol Herbst
2016-10-25 11:13   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox