mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH] drm/panel: synaptics-r63353: Fix regulator unbalance
@ 2024-06-24 18:53 Michael Trimarchi
  2024-08-07 12:38 ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Trimarchi @ 2024-06-24 18:53 UTC (permalink / raw)
  To: neil.armstrong
  Cc: quic_jesszhan, sam, mripard, tzimmermann, airlied, daniel,
	dri-devel, linux-kernel, Michael Trimarchi

The shutdown function can be called when the display is already
unprepared. For example during reboot this trigger a kernel
backlog. Calling the drm_panel_unprepare, allow us to avoid
to trigger the kernel warning

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---

It's not obviovus if shutdown can be dropped or this problem depends
on the display stack as it is implmented. More feedback is required
here

---
 drivers/gpu/drm/panel/panel-synaptics-r63353.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c
index 169c629746c7..17349825543f 100644
--- a/drivers/gpu/drm/panel/panel-synaptics-r63353.c
+++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c
@@ -325,7 +325,7 @@ static void r63353_panel_shutdown(struct mipi_dsi_device *dsi)
 {
 	struct r63353_panel *rpanel = mipi_dsi_get_drvdata(dsi);
 
-	r63353_panel_unprepare(&rpanel->base);
+	drm_panel_unprepare(&rpanel->base);
 }
 
 static const struct r63353_desc sharp_ls068b3sx02_data = {
-- 
2.43.0


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

* Re: [RFC PATCH] drm/panel: synaptics-r63353: Fix regulator unbalance
  2024-06-24 18:53 [RFC PATCH] drm/panel: synaptics-r63353: Fix regulator unbalance Michael Trimarchi
@ 2024-08-07 12:38 ` Michael Nazzareno Trimarchi
  2024-08-07 21:02   ` Doug Anderson
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Nazzareno Trimarchi @ 2024-08-07 12:38 UTC (permalink / raw)
  To: neil.armstrong, Doug Anderson
  Cc: quic_jesszhan, sam, mripard, tzimmermann, airlied, daniel,
	dri-devel, linux-kernel

Hi Doug

+cc Doug

I have seen that you have done some re-working and investigation on
drm stack, do you have some
suggestion on this case?

On Mon, Jun 24, 2024 at 8:53 PM Michael Trimarchi
<michael@amarulasolutions.com> wrote:
>
> The shutdown function can be called when the display is already
> unprepared. For example during reboot this trigger a kernel
> backlog. Calling the drm_panel_unprepare, allow us to avoid
> to trigger the kernel warning
>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
>
> It's not obviovus if shutdown can be dropped or this problem depends
> on the display stack as it is implmented. More feedback is required
> here
>
> ---
>  drivers/gpu/drm/panel/panel-synaptics-r63353.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c
> index 169c629746c7..17349825543f 100644
> --- a/drivers/gpu/drm/panel/panel-synaptics-r63353.c
> +++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c
> @@ -325,7 +325,7 @@ static void r63353_panel_shutdown(struct mipi_dsi_device *dsi)
>  {
>         struct r63353_panel *rpanel = mipi_dsi_get_drvdata(dsi);
>
> -       r63353_panel_unprepare(&rpanel->base);
> +       drm_panel_unprepare(&rpanel->base);
>  }
>
>  static const struct r63353_desc sharp_ls068b3sx02_data = {
> --
> 2.43.0
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

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

* Re: [RFC PATCH] drm/panel: synaptics-r63353: Fix regulator unbalance
  2024-08-07 12:38 ` Michael Nazzareno Trimarchi
@ 2024-08-07 21:02   ` Doug Anderson
  2024-08-07 21:05     ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 4+ messages in thread
From: Doug Anderson @ 2024-08-07 21:02 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi
  Cc: neil.armstrong, quic_jesszhan, sam, mripard, tzimmermann,
	airlied, daniel, dri-devel, linux-kernel

Hi,

On Wed, Aug 7, 2024 at 5:39 AM Michael Nazzareno Trimarchi
<michael@amarulasolutions.com> wrote:
>
> Hi Doug
>
> +cc Doug
>
> I have seen that you have done some re-working and investigation on
> drm stack, do you have some
> suggestion on this case?
>
> On Mon, Jun 24, 2024 at 8:53 PM Michael Trimarchi
> <michael@amarulasolutions.com> wrote:
> >
> > The shutdown function can be called when the display is already
> > unprepared. For example during reboot this trigger a kernel
> > backlog. Calling the drm_panel_unprepare, allow us to avoid
> > to trigger the kernel warning
> >
> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> > ---
> >
> > It's not obviovus if shutdown can be dropped or this problem depends
> > on the display stack as it is implmented. More feedback is required
> > here

In general the shutdown should be dropped and it should be up to the
display driver to do the shutdown. If your panel needs to be used with
a DRM Modeset driver that doesn't properly call shutdown then the
ideal solution would be to fix the DRM Modeset driver. If this is
somehow impossible, I suspect folks would (begrudgingly) accept some
other solution.

From a super quick look, I see:

* This panel seems to be used upstream by "imx8mn-bsh-smm-s2-display.dtsi"

* In "imx8mn.dtsi" I see "lcdif" is "fsl,imx6sx-lcdif".

* "fsl,imx6sx-lcdif" seems to be handled by "drivers/gpu/drm/mxsfb/mxsfb_drv.c"

* Previously I determined that "mxsfb-drm" was indeed calling
drm_atomic_helper_shutdown() properly [1]

...so it seems like just dropping the shutdown handler in this panel is correct.


[1] https://lore.kernel.org/r/20240611074846.1.Ieb287c2c3ee3f6d3b0d5f49b29f746b93621749c@changeid

-Doug

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

* Re: [RFC PATCH] drm/panel: synaptics-r63353: Fix regulator unbalance
  2024-08-07 21:02   ` Doug Anderson
@ 2024-08-07 21:05     ` Michael Nazzareno Trimarchi
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Nazzareno Trimarchi @ 2024-08-07 21:05 UTC (permalink / raw)
  To: Doug Anderson
  Cc: neil.armstrong, quic_jesszhan, sam, mripard, tzimmermann,
	airlied, daniel, dri-devel, linux-kernel

Hi Doug

On Wed, Aug 7, 2024 at 11:02 PM Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Wed, Aug 7, 2024 at 5:39 AM Michael Nazzareno Trimarchi
> <michael@amarulasolutions.com> wrote:
> >
> > Hi Doug
> >
> > +cc Doug
> >
> > I have seen that you have done some re-working and investigation on
> > drm stack, do you have some
> > suggestion on this case?
> >
> > On Mon, Jun 24, 2024 at 8:53 PM Michael Trimarchi
> > <michael@amarulasolutions.com> wrote:
> > >
> > > The shutdown function can be called when the display is already
> > > unprepared. For example during reboot this trigger a kernel
> > > backlog. Calling the drm_panel_unprepare, allow us to avoid
> > > to trigger the kernel warning
> > >
> > > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> > > ---
> > >
> > > It's not obviovus if shutdown can be dropped or this problem depends
> > > on the display stack as it is implmented. More feedback is required
> > > here
>
> In general the shutdown should be dropped and it should be up to the
> display driver to do the shutdown. If your panel needs to be used with
> a DRM Modeset driver that doesn't properly call shutdown then the
> ideal solution would be to fix the DRM Modeset driver. If this is
> somehow impossible, I suspect folks would (begrudgingly) accept some
> other solution.
>
> From a super quick look, I see:
>
> * This panel seems to be used upstream by "imx8mn-bsh-smm-s2-display.dtsi"
>
> * In "imx8mn.dtsi" I see "lcdif" is "fsl,imx6sx-lcdif".
>
> * "fsl,imx6sx-lcdif" seems to be handled by "drivers/gpu/drm/mxsfb/mxsfb_drv.c"
>
> * Previously I determined that "mxsfb-drm" was indeed calling
> drm_atomic_helper_shutdown() properly [1]
>
> ...so it seems like just dropping the shutdown handler in this panel is correct.
>
>
> [1] https://lore.kernel.org/r/20240611074846.1.Ieb287c2c3ee3f6d3b0d5f49b29f746b93621749c@changeid
>

Good, that is the information I need to know, I have read some of your
threads and it's ok for me to just drop it.
I will resend a proper patch for it

Michael

> -Doug



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

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

end of thread, other threads:[~2024-08-07 21:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-24 18:53 [RFC PATCH] drm/panel: synaptics-r63353: Fix regulator unbalance Michael Trimarchi
2024-08-07 12:38 ` Michael Nazzareno Trimarchi
2024-08-07 21:02   ` Doug Anderson
2024-08-07 21:05     ` Michael Nazzareno Trimarchi

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

all inboxes | Powered by JetHome®