Skip to contentSkip to conversation

drm/todo: Update panic handling todo

PATCH In review Daniel Vetter 5 participants 6 messages Feb 24, 2022 – Feb 28, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/todo: Update panic handling todo

Some things changed, and add two useful links.

Cc Javier Martinez Canillas <[email protected]>
Cc Pekka Paalanen <[email protected]>
---
 Documentation/gpu/todo.rst | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)
Documentation/gpu/todo.rst +9 -12
index 7bf7f2111696..283d35a500bd 100644
@@ -475,8 +475,12 @@ This is a really varied tasks with lots of little bits and pieces:
   achieved by using an IPI to the local processor.
 
 * There's a massive confusion of different panic handlers. DRM fbdev emulation
-  helpers have one, but on top of that the fbcon code itself also has one. We
-  need to make sure that they stop fighting over each another.
+  helpers had their own (long removed), but on top of that the fbcon code itself
+  also has one. We need to make sure that they stop fighting over each another.
+  This is worked around by checking ``oops_in_progress`` at various entry points
+  into the DRM fbdev emulation helpers. A much cleaner approach here would be to
+  switch fbcon to the `threaded printk support
+  <https://lwn.net/Articles/800946/>`_.
 
 * ``drm_can_sleep()`` is a mess. It hides real bugs in normal operations and
   isn't a full solution for panic paths. We need to make sure that it only
@@ -488,16 +492,9 @@ This is a really varied tasks with lots of little bits and pieces:
   even spinlocks (because NMI and hardirq can panic too). We need to either
   make sure to not call such paths, or trylock everything. Really tricky.
 
-* For the above locking troubles reasons it's pretty much impossible to
-  attempt a synchronous modeset from panic handlers. The only thing we could
-  try to achive is an atomic ``set_base`` of the primary plane, and hope that
-  it shows up. Everything else probably needs to be delayed to some worker or
-  something else which happens later on. Otherwise it just kills the box
-  harder, prevent the panic from going out on e.g. netconsole.
-
-* There's also proposal for a simplied DRM console instead of the full-blown
-  fbcon and DRM fbdev emulation. Any kind of panic handling tricks should
-  obviously work for both console, in case we ever get kmslog merged.
+* A clean solution would be an entirely separate panic output support in KMS,
+  bypassing the current fbcon support. See `[PATCH v2 0/3] drm: Add panic handling
+  <https://lore.kernel.org/dri-devel/[email protected]/>`_.
 
 Contact: Daniel Vetter
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

Hello Daniel,

Quoted 15 lines · Daniel Vetter

Some things changed, and add two useful links.

Cc Javier Martinez Canillas <[email protected]>
Cc Pekka Paalanen <[email protected]>
---
 Documentation/gpu/todo.rst | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)
Documentation/gpu/todo.rst +0 -0
index 7bf7f2111696..283d35a500bd 100644

Documentation/gpu/todo.rst This is a really varied tasks with lots of little bits and pieces: · line 479

Quoted 7 lines
Documentation/gpu/todo.rst +2 -2
@@ -475,8 +475,12 @@ This is a really varied tasks with lots of little bits and pieces:
   achieved by using an IPI to the local processor.
 
 * There's a massive confusion of different panic handlers. DRM fbdev emulation
-  helpers have one, but on top of that the fbcon code itself also has one. We
-  need to make sure that they stop fighting over each another.
+  helpers had their own (long removed), but on top of that the fbcon code itself
+  also has one. We need to make sure that they stop fighting over each another.

The "over each another" sounds a little bit off, shouldn't be "over each other" ?

Quoted 15 lines
Documentation/gpu/todo.rst +4 -4
+  This is worked around by checking ``oops_in_progress`` at various entry points
+  into the DRM fbdev emulation helpers. A much cleaner approach here would be to
+  switch fbcon to the `threaded printk support
+  <https://lwn.net/Articles/800946/>`_.
 
 * ``drm_can_sleep()`` is a mess. It hides real bugs in normal operations and
   isn't a full solution for panic paths. We need to make sure that it only
@@ -488,16 +492,9 @@ This is a really varied tasks with lots of little bits and pieces:
   even spinlocks (because NMI and hardirq can panic too). We need to either
   make sure to not call such paths, or trylock everything. Really tricky.
 
-* For the above locking troubles reasons it's pretty much impossible to
-  attempt a synchronous modeset from panic handlers. The only thing we could
-  try to achive is an atomic ``set_base`` of the primary plane, and hope that
-  it shows up. Everything else probably needs to be delayed to some worker or

Documentation/gpu/todo.rst This is a really varied tasks with lots of little bits and pieces: · line 498

Quoted 10 lines
Documentation/gpu/todo.rst +3 -6
-  something else which happens later on. Otherwise it just kills the box
-  harder, prevent the panic from going out on e.g. netconsole.
-
-* There's also proposal for a simplied DRM console instead of the full-blown
-  fbcon and DRM fbdev emulation. Any kind of panic handling tricks should
-  obviously work for both console, in case we ever get kmslog merged.
+* A clean solution would be an entirely separate panic output support in KMS,
+  bypassing the current fbcon support. See `[PATCH v2 0/3] drm: Add panic handling
+  <https://lore.kernel.org/dri-devel/[email protected]/>`_.
 

Having these two links in the docs is very useful. Thanks a lot for adding that.

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Linux Engineering
Red Hat
#2 lore raw

PATCH 1/1 drm/todo: Update panic handling todo

In reply to Daniel Vetter

Some things changed, and add two useful links.

v2: Also include a link to the QR encoding work. Plus review from Javier.

---
 Documentation/gpu/todo.rst | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)
Documentation/gpu/todo.rst +14 -11
index 7bf7f2111696..2b1e7fa45603 100644
@@ -475,8 +475,12 @@ This is a really varied tasks with lots of little bits and pieces:
   achieved by using an IPI to the local processor.
 
 * There's a massive confusion of different panic handlers. DRM fbdev emulation
-  helpers have one, but on top of that the fbcon code itself also has one. We
-  need to make sure that they stop fighting over each another.
+  helpers had their own (long removed), but on top of that the fbcon code itself
+  also has one. We need to make sure that they stop fighting over each other.
+  This is worked around by checking ``oops_in_progress`` at various entry points
+  into the DRM fbdev emulation helpers. A much cleaner approach here would be to
+  switch fbcon to the `threaded printk support
+  <https://lwn.net/Articles/800946/>`_.
 
 * ``drm_can_sleep()`` is a mess. It hides real bugs in normal operations and
   isn't a full solution for panic paths. We need to make sure that it only
@@ -488,16 +492,15 @@ This is a really varied tasks with lots of little bits and pieces:
   even spinlocks (because NMI and hardirq can panic too). We need to either
   make sure to not call such paths, or trylock everything. Really tricky.
 
-* For the above locking troubles reasons it's pretty much impossible to
-  attempt a synchronous modeset from panic handlers. The only thing we could
-  try to achive is an atomic ``set_base`` of the primary plane, and hope that
-  it shows up. Everything else probably needs to be delayed to some worker or
-  something else which happens later on. Otherwise it just kills the box
-  harder, prevent the panic from going out on e.g. netconsole.
+* A clean solution would be an entirely separate panic output support in KMS,
+  bypassing the current fbcon support. See `[PATCH v2 0/3] drm: Add panic handling
+  <https://lore.kernel.org/dri-devel/[email protected]/>`_.
 
-* There's also proposal for a simplied DRM console instead of the full-blown
-  fbcon and DRM fbdev emulation. Any kind of panic handling tricks should
-  obviously work for both console, in case we ever get kmslog merged.
+* Encoding the actual oops and preceeding dmesg in a QR might help with the
+  dread "important stuff scrolled away" problem. See `[RFC][PATCH] Oops messages
+  transfer using QR codes
+  <https://lore.kernel.org/lkml/[email protected]/>`_
+  for some example code that could be reused.
 
 Contact: Daniel Vetter
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#3 lore raw
Quoted 11 lines · Daniel Vetter

Some things changed, and add two useful links.

v2: Also include a link to the QR encoding work. Plus review from Javier.

---

Hi Daniel, thanks for the improvement - much appreciated!

Below a comment inline; other than that, feel free to add my:

Cheers,

Guilherme

Documentation/gpu/todo.rst This is a really varied tasks with lots of little bits and pieces: · line 499

Quoted 6 lines

[...]

Documentation/gpu/todo.rst +1 -3
-* There's also proposal for a simplied DRM console instead of the full-blown
-  fbcon and DRM fbdev emulation. Any kind of panic handling tricks should
-  obviously work for both console, in case we ever get kmslog merged.
+* Encoding the actual oops and preceeding dmesg in a QR might help with the

Email client complains about "preceeding" word - misspelled maybe?

Quoted 7 lines
Documentation/gpu/todo.rst +4 -0
+  dread "important stuff scrolled away" problem. See `[RFC][PATCH] Oops messages
+  transfer using QR codes
+  <https://lore.kernel.org/lkml/[email protected]/>`_
+  for some example code that could be reused.
 
 Contact: Daniel Vetter
#4 lore raw
Quoted 23 lines · Guilherme G. Piccoli
Quoted 11 lines · Daniel Vetter

Some things changed, and add two useful links.

v2: Also include a link to the QR encoding work. Plus review from Javier.

---

Hi Daniel, thanks for the improvement - much appreciated!

Below a comment inline; other than that, feel free to add my:

Cheers,

Guilherme

Quoted 8 lines

Documentation/gpu/todo.rst This is a really varied tasks with lots of little bits and pieces: · line 499

Quoted 6 lines

[...]

Documentation/gpu/todo.rst +1 -3
-* There's also proposal for a simplied DRM console instead of the full-blown
-  fbcon and DRM fbdev emulation. Any kind of panic handling tricks should
-  obviously work for both console, in case we ever get kmslog merged.
+* Encoding the actual oops and preceeding dmesg in a QR might help with the

Email client complains about "preceeding" word - misspelled maybe?

Indeed, I've fixed this while applying.
-Daniel

Quoted 8 lines
Quoted 8 lines
Documentation/gpu/todo.rst +4 -0
+  dread "important stuff scrolled away" problem. See `[RFC][PATCH] Oops messages
+  transfer using QR codes
+  <https://lore.kernel.org/lkml/[email protected]/>`_
+  for some example code that could be reused.
 
 Contact: Daniel Vetter
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Acked-by on v1 1/1
#5 lore raw
In reply to Daniel Vetter
Quoted 5 lines · On Thu, 24 Feb 2022 14:24:25 +0100 Daniel Vetter <[email protected]> wrote:

Some things changed, and add two useful links.

v2: Also include a link to the QR encoding work. Plus review from Javier.

Quoted 8 lines
---
 Documentation/gpu/todo.rst | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

Thanks,
pq

Quoted 45 lines
Documentation/gpu/todo.rst +14 -11
index 7bf7f2111696..2b1e7fa45603 100644
@@ -475,8 +475,12 @@ This is a really varied tasks with lots of little bits and pieces:
   achieved by using an IPI to the local processor.
 
 * There's a massive confusion of different panic handlers. DRM fbdev emulation
-  helpers have one, but on top of that the fbcon code itself also has one. We
-  need to make sure that they stop fighting over each another.
+  helpers had their own (long removed), but on top of that the fbcon code itself
+  also has one. We need to make sure that they stop fighting over each other.
+  This is worked around by checking ``oops_in_progress`` at various entry points
+  into the DRM fbdev emulation helpers. A much cleaner approach here would be to
+  switch fbcon to the `threaded printk support
+  <https://lwn.net/Articles/800946/>`_.
 
 * ``drm_can_sleep()`` is a mess. It hides real bugs in normal operations and
   isn't a full solution for panic paths. We need to make sure that it only
@@ -488,16 +492,15 @@ This is a really varied tasks with lots of little bits and pieces:
   even spinlocks (because NMI and hardirq can panic too). We need to either
   make sure to not call such paths, or trylock everything. Really tricky.
 
-* For the above locking troubles reasons it's pretty much impossible to
-  attempt a synchronous modeset from panic handlers. The only thing we could
-  try to achive is an atomic ``set_base`` of the primary plane, and hope that
-  it shows up. Everything else probably needs to be delayed to some worker or
-  something else which happens later on. Otherwise it just kills the box
-  harder, prevent the panic from going out on e.g. netconsole.
+* A clean solution would be an entirely separate panic output support in KMS,
+  bypassing the current fbcon support. See `[PATCH v2 0/3] drm: Add panic handling
+  <https://lore.kernel.org/dri-devel/[email protected]/>`_.
 
-* There's also proposal for a simplied DRM console instead of the full-blown
-  fbcon and DRM fbdev emulation. Any kind of panic handling tricks should
-  obviously work for both console, in case we ever get kmslog merged.
+* Encoding the actual oops and preceeding dmesg in a QR might help with the
+  dread "important stuff scrolled away" problem. See `[RFC][PATCH] Oops messages
+  transfer using QR codes
+  <https://lore.kernel.org/lkml/[email protected]/>`_
+  for some example code that could be reused.
 
 Contact: Daniel Vetter