Message ID | b633568d2e3f405b21debdd60854fe39780254d6.1716816897.git.geert+renesas@glider.be (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: renesas: rcar-du: Add drm_panic support for non-vsp | expand |
Hi, On 27/05/2024 15:35, Geert Uytterhoeven wrote: > Add support for the drm_panic module for DU variants not using the > VSP-compositor, to display 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. Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > Tested on Koelsch (R-Car M2-W). > > Support for DU variants using the VSP-compositor is more convoluted, > and left to the DU experts. > --- > drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c > index e445fac8e0b46c21..c546ab0805d656f6 100644 > --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c > +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c > @@ -680,6 +680,12 @@ static const struct drm_plane_helper_funcs rcar_du_plane_helper_funcs = { > .atomic_update = rcar_du_plane_atomic_update, > }; > > +static const struct drm_plane_helper_funcs rcar_du_primary_plane_helper_funcs = { > + .atomic_check = rcar_du_plane_atomic_check, > + .atomic_update = rcar_du_plane_atomic_update, > + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, > +}; > + > static struct drm_plane_state * > rcar_du_plane_atomic_duplicate_state(struct drm_plane *plane) > { > @@ -812,8 +818,12 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp) > if (ret < 0) > return ret; > > - drm_plane_helper_add(&plane->plane, > - &rcar_du_plane_helper_funcs); > + if (type == DRM_PLANE_TYPE_PRIMARY) > + drm_plane_helper_add(&plane->plane, > + &rcar_du_primary_plane_helper_funcs); > + else > + drm_plane_helper_add(&plane->plane, > + &rcar_du_plane_helper_funcs); > > drm_plane_create_alpha_property(&plane->plane); >
Hi Geert, Thank you for the patch. On Mon, May 27, 2024 at 03:35:49PM +0200, Geert Uytterhoeven wrote: > Add support for the drm_panic module for DU variants not using the > VSP-compositor, to display a message on the screen when a kernel panic > occurs. > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > Tested on Koelsch (R-Car M2-W). > > Support for DU variants using the VSP-compositor is more convoluted, > and left to the DU experts. That's not high on my priority list, so if anyone wants to play, be my guest :-) > --- > drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c > index e445fac8e0b46c21..c546ab0805d656f6 100644 > --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c > +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c > @@ -680,6 +680,12 @@ static const struct drm_plane_helper_funcs rcar_du_plane_helper_funcs = { > .atomic_update = rcar_du_plane_atomic_update, > }; > > +static const struct drm_plane_helper_funcs rcar_du_primary_plane_helper_funcs = { > + .atomic_check = rcar_du_plane_atomic_check, > + .atomic_update = rcar_du_plane_atomic_update, > + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, > +}; > + > static struct drm_plane_state * > rcar_du_plane_atomic_duplicate_state(struct drm_plane *plane) > { > @@ -812,8 +818,12 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp) > if (ret < 0) > return ret; > > - drm_plane_helper_add(&plane->plane, > - &rcar_du_plane_helper_funcs); > + if (type == DRM_PLANE_TYPE_PRIMARY) > + drm_plane_helper_add(&plane->plane, > + &rcar_du_primary_plane_helper_funcs); > + else > + drm_plane_helper_add(&plane->plane, > + &rcar_du_plane_helper_funcs); Same comment as for the shmobile-drm patch. Let's discuss it there. > > drm_plane_create_alpha_property(&plane->plane); >
Hi, On 5/27/24 21:35, Geert Uytterhoeven wrote: > Add support for the drm_panic module for DU variants not using the > VSP-compositor, to display a message on the screen when a kernel panic > occurs. > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> After all concerns resolved: Acked-by: Sui Jingfeng <sui.jingfeng@linux.dev> > --- > Tested on Koelsch (R-Car M2-W). > > Support for DU variants using the VSP-compositor is more convoluted, > and left to the DU experts. > --- > drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c > index e445fac8e0b46c21..c546ab0805d656f6 100644 > --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c > +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c > @@ -680,6 +680,12 @@ static const struct drm_plane_helper_funcs rcar_du_plane_helper_funcs = { > .atomic_update = rcar_du_plane_atomic_update, > }; > > +static const struct drm_plane_helper_funcs rcar_du_primary_plane_helper_funcs = { > + .atomic_check = rcar_du_plane_atomic_check, > + .atomic_update = rcar_du_plane_atomic_update, > + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, > +}; > + > static struct drm_plane_state * > rcar_du_plane_atomic_duplicate_state(struct drm_plane *plane) > { > @@ -812,8 +818,12 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp) > if (ret < 0) > return ret; > > - drm_plane_helper_add(&plane->plane, > - &rcar_du_plane_helper_funcs); > + if (type == DRM_PLANE_TYPE_PRIMARY) > + drm_plane_helper_add(&plane->plane, > + &rcar_du_primary_plane_helper_funcs); > + else > + drm_plane_helper_add(&plane->plane, > + &rcar_du_plane_helper_funcs); Maybe we could do some untangle, but this is not a strong requirement. Thanks. Best regards Sui > drm_plane_create_alpha_property(&plane->plane); >
On Mon, 27 May 2024 15:35:49 +0200, Geert Uytterhoeven wrote: > Add support for the drm_panic module for DU variants not using the > VSP-compositor, to display a message on the screen when a kernel panic > occurs. > > Applied to misc/kernel.git (drm-misc-next). Thanks! Maxime
diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c index e445fac8e0b46c21..c546ab0805d656f6 100644 --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c @@ -680,6 +680,12 @@ static const struct drm_plane_helper_funcs rcar_du_plane_helper_funcs = { .atomic_update = rcar_du_plane_atomic_update, }; +static const struct drm_plane_helper_funcs rcar_du_primary_plane_helper_funcs = { + .atomic_check = rcar_du_plane_atomic_check, + .atomic_update = rcar_du_plane_atomic_update, + .get_scanout_buffer = drm_fb_dma_get_scanout_buffer, +}; + static struct drm_plane_state * rcar_du_plane_atomic_duplicate_state(struct drm_plane *plane) { @@ -812,8 +818,12 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp) if (ret < 0) return ret; - drm_plane_helper_add(&plane->plane, - &rcar_du_plane_helper_funcs); + if (type == DRM_PLANE_TYPE_PRIMARY) + drm_plane_helper_add(&plane->plane, + &rcar_du_primary_plane_helper_funcs); + else + drm_plane_helper_add(&plane->plane, + &rcar_du_plane_helper_funcs); drm_plane_create_alpha_property(&plane->plane);
Add support for the drm_panic module for DU variants not using the VSP-compositor, to display a message on the screen when a kernel panic occurs. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- Tested on Koelsch (R-Car M2-W). Support for DU variants using the VSP-compositor is more convoluted, and left to the DU experts. --- drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)