Skip to contentSkip to conversation

noveau: emergency shutdown handling is overcomplex and broken

PATCH Pavel Machek 2 participants 3 messages Oct 25, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +5 -0
index b9703c0..adb1deb 100644
@@ -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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw

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 <[email protected]>:

Quoted 23 lines
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +5 -0
index b9703c0..adb1deb 100644
@@ -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

Quoted 9 lines

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

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#2 lore raw
Quoted 5 lines · Karol Herbst

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

Quoted 43 lines

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 <[email protected]>:

Quoted 32 lines
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +5 -0
index b9703c0..adb1deb 100644
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

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

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel