drm: renesas: shmobile: Add drm_panic support
Subsystems (3)
Geert Uytterhoeven
maintainerPATCH 1/1 drm: renesas: shmobile: Add drm_panic support
Add support for the drm_panic module, which displays a message on the screen when a kernel panic occurs.
---
Tested on Armadillo-800-EVA.
--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +13 -1
@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,
@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);return &splane->base; }
Signature · 1 line
2.34.1
Quoted 2 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.
Thanks for your patch, I'm pleased that you find drm_panic useful.
That looks good to me.
Quoted 40 lines
Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +13
-1@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);return &splane->base; }
Laurent Pinchart
maintainerHi Geert,
Thank you for the patch.
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);
It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of drm_fb_dma_get_scanout_buffer() states
* @plane: DRM primary plane
If the intent is that only primary planes will be used to display the panic message, shouldn't drm_panic_register() skip overlay planes ? It would simplify drivers.
Quoted 3 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 49 lines · Laurent Pinchart
Hi Geert,
Thank you for the patch.
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states
Quoted 5 lines
* @plane: DRM primary plane
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.
What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Quoted 9 lines
Quoted 4 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }Signature · 3 lines
Regards, Laurent Pinchart
Signature · 2 lines
With best wishes Dmitry
Laurent Pinchart
maintainerHi Dmitry,
Quoted 48 lines · Dmitry Baryshkov
Quoted 47 lines · Laurent Pinchart
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states* @plane: DRM primary plane
Quoted 7 lines
Quoted 3 lines
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Good point.
Another option, if we wanted to avoid duplicating the drm_plane_funcs, would be to add a field to drm_plane to indicate whether the plane is suitable for drm_panic.
I don't think this patch should be blocked just for this reason, but I'm a bit bothered by duplicating the ops structure to indicate drm_panic support.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 59 lines · Laurent Pinchart
Hi Dmitry,
Quoted 48 lines · Dmitry Baryshkov
Quoted 47 lines · Laurent Pinchart
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states* @plane: DRM primary plane
Quoted 7 lines
Quoted 3 lines
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Quoted 5 lines
Good point.
Another option, if we wanted to avoid duplicating the
drm_plane_funcs, would be to add a field todrm_planeto indicate whether the plane is suitable fordrm_panic.
... or maybe let the driver decide. For the fully-universal-plane devices we probably want to select the planes which cover the largest part of the CRTC.
Quoted 13 lines
I don't think this patch should be blocked just for this reason, but I'm a bit bothered by duplicating the ops structure to indicate
drm_panicsupport.Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }Signature · 3 lines
Regards, Laurent Pinchart
Signature · 2 lines
With best wishes Dmitry
Laurent Pinchart
maintainerQuoted 62 lines · Dmitry Baryshkov
Quoted 61 lines · Laurent Pinchart
Hi Dmitry,
Quoted 48 lines · Dmitry Baryshkov
Quoted 47 lines · Laurent Pinchart
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states* @plane: DRM primary plane
Quoted 7 lines
Quoted 3 lines
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Good point.
Quoted 7 lines
Quoted 3 lines
Another option, if we wanted to avoid duplicating the
drm_plane_funcs, would be to add a field todrm_planeto indicate whether the plane is suitable fordrm_panic.... or maybe let the driver decide. For the fully-universal-plane devices we probably want to select the planes which cover the largest part of the CRTC.
Are there devices where certain planes can only cover a subset of the CRTC (apart from planes meant for cursors) ?
I think that what would matter the most in the end is selecting the plane that is on top of the stack, and that doesn't seem to be addressed by the drm_panic infrastructure. This is getting out of scope for this patch though :-)
Quoted 7 lines
Quoted 7 lines
I don't think this patch should be blocked just for this reason, but I'm a bit bothered by duplicating the ops structure to indicate
drm_panicsupport.Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 67 lines · Laurent Pinchart
Quoted 66 lines · Dmitry Baryshkov
Quoted 64 lines · Laurent Pinchart
Hi Dmitry,
Quoted 48 lines · Dmitry Baryshkov
Quoted 47 lines · Laurent Pinchart
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states* @plane: DRM primary plane
Quoted 7 lines
Quoted 3 lines
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Good point.
Another option, if we wanted to avoid duplicating the
drm_plane_funcs, would be to add a field todrm_planeto indicate whether the plane is suitable fordrm_panic.
Quoted 6 lines
Quoted 3 lines
... or maybe let the driver decide. For the fully-universal-plane devices we probably want to select the planes which cover the largest part of the CRTC.
Are there devices where certain planes can only cover a subset of the CRTC (apart from planes meant for cursors) ?
On contemporary MSM devices any plane can cover any part of the screen, including not having a plane that covers the full screen at all.
Quoted 17 lines
I think that what would matter the most in the end is selecting the plane that is on top of the stack, and that doesn't seem to be addressed by the
drm_panicinfrastructure. This is getting out of scope for this patch though :-)Quoted 7 lines
Quoted 7 lines
I don't think this patch should be blocked just for this reason, but I'm a bit bothered by duplicating the ops structure to indicate
drm_panicsupport.Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }Signature · 3 lines
Regards, Laurent Pinchart
Signature · 2 lines
With best wishes Dmitry
Laurent Pinchart
maintainerQuoted 72 lines · Dmitry Baryshkov
Quoted 71 lines · Laurent Pinchart
Quoted 69 lines · Dmitry Baryshkov
Quoted 59 lines · Laurent Pinchart
Hi Dmitry,
Quoted 48 lines · Dmitry Baryshkov
Quoted 47 lines · Laurent Pinchart
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states* @plane: DRM primary plane
Quoted 7 lines
Quoted 3 lines
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Quoted 5 lines
Good point.
Another option, if we wanted to avoid duplicating the
drm_plane_funcs, would be to add a field todrm_planeto indicate whether the plane is suitable fordrm_panic.... or maybe let the driver decide. For the fully-universal-plane devices we probably want to select the planes which cover the largest part of the CRTC.
Quoted 5 lines
Quoted 2 lines
Are there devices where certain planes can only cover a subset of the CRTC (apart from planes meant for cursors) ?
On contemporary MSM devices any plane can cover any part of the screen, including not having a plane that covers the full screen at all.
Ah, you meant picking the plane that is currently covering most of the screen. I thought you were talking about devices where some planes were restricted by the hardware to a subset of the CRTC.
I agree it would make sense to take both plane position and z-pos, as well as visibility and other related parameters, to pick the plane that is the most visible. Ideally this should be handled in drm_panic, not duplicated in drivers.
Quoted 12 lines
Quoted 12 lines
I think that what would matter the most in the end is selecting the plane that is on top of the stack, and that doesn't seem to be addressed by the
drm_panicinfrastructure. This is getting out of scope for this patch though :-)Quoted 7 lines
Quoted 7 lines
I don't think this patch should be blocked just for this reason, but I'm a bit bothered by duplicating the ops structure to indicate
drm_panicsupport.Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 79 lines · Laurent Pinchart
Quoted 72 lines · Dmitry Baryshkov
Quoted 71 lines · Laurent Pinchart
Quoted 69 lines · Dmitry Baryshkov
Quoted 59 lines · Laurent Pinchart
Hi Dmitry,
Quoted 48 lines · Dmitry Baryshkov
Quoted 47 lines · Laurent Pinchart
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states* @plane: DRM primary plane
Quoted 7 lines
Quoted 3 lines
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Quoted 5 lines
Good point.
Another option, if we wanted to avoid duplicating the
drm_plane_funcs, would be to add a field todrm_planeto indicate whether the plane is suitable fordrm_panic.... or maybe let the driver decide. For the fully-universal-plane devices we probably want to select the planes which cover the largest part of the CRTC.
Quoted 5 lines
Quoted 2 lines
Are there devices where certain planes can only cover a subset of the CRTC (apart from planes meant for cursors) ?
On contemporary MSM devices any plane can cover any part of the screen, including not having a plane that covers the full screen at all.
Quoted 8 lines
Ah, you meant picking the plane that is currently covering most of the screen. I thought you were talking about devices where some planes were restricted by the hardware to a subset of the CRTC.
I agree it would make sense to take both plane position and z-pos, as well as visibility and other related parameters, to pick the plane that is the most visible. Ideally this should be handled in
drm_panic, not duplicated in drivers.
I'm not sure that drm_panic can figure out reliably on which plane it needs to draw. I think the driver has more information to take the right decision.
Also if you prefer, you can add the get_scanout_buffer() callback for all planes (to use the same helper fops), and then filter out in the callback for planes that are not suitable. I just find it cleaner to not register planes that the driver knows they will never be suitable (like cursor planes).
static void shmob_atomic_helper_get_scanout_buffer(struct drm_plane *plane, struct drm_scanout_buffer *sb))
{
if (plane->type == DRM_PLANE_TYPE_PRIMARY)
return drm_fb_dma_get_scanout_buffer(plane, sb);
return -EOPNOTSUPP;
}.get_scanout_buffer = shmob_atomic_helper_get_scanout_buffer,
Signature · 1 line
Jocelyn
Quoted 14 lines
Quoted 13 lines
Quoted 13 lines
I think that what would matter the most in the end is selecting the plane that is on top of the stack, and that doesn't seem to be addressed by the
drm_panicinfrastructure. This is getting out of scope for this patch though :-)Quoted 7 lines
Quoted 7 lines
I don't think this patch should be blocked just for this reason, but I'm a bit bothered by duplicating the ops structure to indicate
drm_panicsupport.Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }
Quoted 87 lines · Jocelyn Falempe
Quoted 83 lines · Laurent Pinchart
Quoted 72 lines · Dmitry Baryshkov
Quoted 71 lines · Laurent Pinchart
Quoted 69 lines · Dmitry Baryshkov
Quoted 59 lines · Laurent Pinchart
Hi Dmitry,
Quoted 48 lines · Dmitry Baryshkov
Quoted 47 lines · Laurent Pinchart
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states* @plane: DRM primary plane
Quoted 7 lines
Quoted 3 lines
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Quoted 5 lines
Good point.
Another option, if we wanted to avoid duplicating the
drm_plane_funcs, would be to add a field todrm_planeto indicate whether the plane is suitable fordrm_panic.... or maybe let the driver decide. For the fully-universal-plane devices we probably want to select the planes which cover the largest part of the CRTC.
Quoted 5 lines
Quoted 2 lines
Are there devices where certain planes can only cover a subset of the CRTC (apart from planes meant for cursors) ?
On contemporary MSM devices any plane can cover any part of the screen, including not having a plane that covers the full screen at all.
Ah, you meant picking the plane that is currently covering most of the screen. I thought you were talking about devices where some planes were restricted by the hardware to a subset of the CRTC.
Quoted 8 lines
Quoted 4 lines
I agree it would make sense to take both plane position and z-pos, as well as visibility and other related parameters, to pick the plane that is the most visible. Ideally this should be handled in
drm_panic, not duplicated in drivers.I'm not sure that
drm_paniccan figure out reliably on which plane it needs to draw. I think the driver has more information to take the right decision.
I think there should be a default implementation which fits 80% of the cases (single fixed PRIMARY plane per output) but if the driver needs it, it should be able to override the behaviour.
Quoted 36 lines
Also if you prefer, you can add the
get_scanout_buffer()callback for all planes (to use the same helper fops), and then filter out in the callback for planes that are not suitable. I just find it cleaner to not register planes that the driver knows they will never be suitable (like cursor planes).static void
shmob_atomic_helper_get_scanout_buffer(struct drm_plane *plane, struct drm_scanout_buffer *sb)){ if (plane->type == DRM_PLANE_TYPE_PRIMARY) return drm_fb_dma_get_scanout_buffer(plane, sb); return -EOPNOTSUPP; }.get_scanout_buffer =
shmob_atomic_helper_get_scanout_buffer,--
Jocelyn
Quoted 14 lines
Quoted 13 lines
Quoted 13 lines
I think that what would matter the most in the end is selecting the plane that is on top of the stack, and that doesn't seem to be addressed by the
drm_panicinfrastructure. This is getting out of scope for this patch though :-)Quoted 7 lines
Quoted 7 lines
I don't think this patch should be blocked just for this reason, but I'm a bit bothered by duplicating the ops structure to indicate
drm_panicsupport.Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }
Signature · 2 lines
With best wishes Dmitry
Quoted 88 lines · Dmitry Baryshkov
Quoted 87 lines · Jocelyn Falempe
Quoted 85 lines · Laurent Pinchart
Quoted 70 lines · Dmitry Baryshkov
Quoted 69 lines · Laurent Pinchart
Quoted 67 lines · Dmitry Baryshkov
Quoted 57 lines · Laurent Pinchart
Quoted 48 lines · Dmitry Baryshkov
Quoted 47 lines · Laurent Pinchart
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states* @plane: DRM primary plane
Quoted 7 lines
Quoted 3 lines
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Quoted 5 lines
Good point.
Another option, if we wanted to avoid duplicating the
drm_plane_funcs, would be to add a field todrm_planeto indicate whether the plane is suitable fordrm_panic.... or maybe let the driver decide. For the fully-universal-plane devices we probably want to select the planes which cover the largest part of the CRTC.
Quoted 5 lines
Quoted 2 lines
Are there devices where certain planes can only cover a subset of the CRTC (apart from planes meant for cursors) ?
On contemporary MSM devices any plane can cover any part of the screen, including not having a plane that covers the full screen at all.
Ah, you meant picking the plane that is currently covering most of the screen. I thought you were talking about devices where some planes were restricted by the hardware to a subset of the CRTC.
I agree it would make sense to take both plane position and z-pos, as well as visibility and other related parameters, to pick the plane that is the most visible. Ideally this should be handled in
drm_panic, not duplicated in drivers.
Quoted 7 lines
Quoted 3 lines
I'm not sure that
drm_paniccan figure out reliably on which plane it needs to draw. I think the driver has more information to take the right decision.I think there should be a default implementation which fits 80% of the cases (single fixed PRIMARY plane per output) but if the driver needs it, it should be able to override the behaviour.
Did anything like this materialize, or is this patch (and its rcar-du counterpart [1]) good to apply as-is?
Thank you!
[1] https://lore.kernel.org/r/b633568d2e3f405b21debdd60854fe39780254d6.1716816897.git.geert+renesas@glider.be/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 94 lines · Geert Uytterhoeven
Quoted 92 lines · Dmitry Baryshkov
Quoted 90 lines · Jocelyn Falempe
Quoted 77 lines · Laurent Pinchart
Quoted 70 lines · Dmitry Baryshkov
Quoted 69 lines · Laurent Pinchart
Quoted 67 lines · Dmitry Baryshkov
Quoted 57 lines · Laurent Pinchart
Quoted 48 lines · Dmitry Baryshkov
Quoted 47 lines · Laurent Pinchart
Quoted 29 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 325
Quoted 10 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);It's not very nice to have to provide different operations for the primary and overlay planes. The documentation of
drm_fb_dma_get_scanout_buffer()states* @plane: DRM primary plane
Quoted 7 lines
Quoted 3 lines
If the intent is that only primary planes will be used to display the panic message, shouldn't
drm_panic_register()skip overlay planes ? It would simplify drivers.What about the drivers where all the planes are actually universal? In such a case the planes registered as primary can easily get replaced by 'overlay' planes.
Quoted 5 lines
Good point.
Another option, if we wanted to avoid duplicating the
drm_plane_funcs, would be to add a field todrm_planeto indicate whether the plane is suitable fordrm_panic.... or maybe let the driver decide. For the fully-universal-plane devices we probably want to select the planes which cover the largest part of the CRTC.
Quoted 5 lines
Quoted 2 lines
Are there devices where certain planes can only cover a subset of the CRTC (apart from planes meant for cursors) ?
On contemporary MSM devices any plane can cover any part of the screen, including not having a plane that covers the full screen at all.
Quoted 8 lines
Ah, you meant picking the plane that is currently covering most of the screen. I thought you were talking about devices where some planes were restricted by the hardware to a subset of the CRTC.
I agree it would make sense to take both plane position and z-pos, as well as visibility and other related parameters, to pick the plane that is the most visible. Ideally this should be handled in
drm_panic, not duplicated in drivers.I'm not sure that
drm_paniccan figure out reliably on which plane it needs to draw. I think the driver has more information to take the right decision.
Quoted 6 lines
Quoted 3 lines
I think there should be a default implementation which fits 80% of the cases (single fixed PRIMARY plane per output) but if the driver needs it, it should be able to override the behaviour.
Did anything like this materialize, or is this patch (and its rcar-du counterpart [1]) good to apply as-is?
No I didn't find a better option yet, and I think it is good as-is.
If duplicating the helper funcs is really a problem, I think the less intrusive option, would be to add a "bool panic_allow_overlay_plane" to struct drm_mode_config, and use that in drm_panic_register(), to register only primary planes if it's not set ?
So drivers that want to draw the panic on overlay plane can opt-in.
Best regards,
Signature · 1 line
Jocelyn
Quoted 15 lines
Thank you!
[1] https://lore.kernel.org/r/b633568d2e3f405b21debdd60854fe39780254d6.1716816897.git.geert+renesas@glider.be/
Gr{oetje,eeting}s,Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi,
Quoted 5 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>Reviewed-by Jocelyn Falempe <[email protected]>
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev,
Quoted 25 lines
---
Tested on Armadillo-800-EVA.--- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev,
Maybe a shmob_drm_plane_create_primary_plane() plus a shmob_drm_plane_create_overlay().
I remember Thomas told this way or something similiar, call untangle.
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 328
Quoted 12 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);return &splane->base; }
Anyway, it looks good to me.
Best regards
Sui
Hi Sui,
Quoted 8 lines · Sui Jingfeng
Quoted 5 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.Signed-off-by Geert Uytterhoeven <[email protected]>Reviewed-by Jocelyn Falempe <[email protected]>Acked-by Sui Jingfeng <[email protected]>
Thank you!
Quoted 22 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev,
Quoted 17 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +7
-0@@ -273,6 +273,13 @@ static const struct drm_plane_helper_funcs shmob_drm_plane_helper_funcs = { .atomic_disable = shmob_drm_plane_atomic_disable, }; +static const struct drm_plane_helper_funcs shmob_drm_primary_plane_helper_funcs = { + .atomic_check = shmob_drm_plane_atomic_check, + .atomic_update = shmob_drm_plane_atomic_update, + .atomic_disable = shmob_drm_plane_atomic_disable, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; +static const struct drm_plane_funcs shmob_drm_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane,@@ -310,7 +317,12 @@ struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev,Maybe a
shmob_drm_plane_create_primary_plane()plus ashmob_drm_plane_create_overlay().
Quoted 1 line
I remember Thomas told this way or something similiar, call untangle.
Hmm, that's what we had until commit c228823426ae509f ("drm:
renesas: shmobile: Unify plane allocation")...
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +6
-1splane->index = index; -drm_plane_helper_add (&splane->base, &shmob_drm_plane_helper_funcs); +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_helper_add (&splane->base, + &shmob_drm_primary_plane_helper_funcs); +else +drm_plane_helper_add (&splane->base, + &shmob_drm_plane_helper_funcs);
Quoted 5 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c struct drm_plane *shmob_drm_plane_create(struct shmob_drm_device *sdev, · line 328
Quoted 2 lines
drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c +0
-0return &splane->base; }Anyway, it looks good to me.
Thanks!
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 4 lines · Geert Uytterhoeven
Add support for the
drm_panicmodule, which displays a message on the screen when a kernel panic occurs.
Applied to misc/kernel.git (drm-misc-next).
Thanks!
Maxime