diff mbox series

[2/4] drm/panel-elida-kd35t133: hold panel in reset for unprepare

Message ID 20231115152647.2303283-3-macroalpha82@gmail.com (mailing list archive)
State New, archived
Headers show
Series Elida KD35T133 Panel Improvements | expand

Commit Message

Chris Morgan Nov. 15, 2023, 3:26 p.m. UTC
From: Chris Morgan <macromorgan@hotmail.com>

For devices like the Anbernic RG351M and RG351P the panel is wired to
an always on regulator. When the device suspends and wakes up, there
are some slight artifacts on the screen that go away over time. If
instead we hold the panel in reset status after it is unprepared,
this does not happen.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 drivers/gpu/drm/panel/panel-elida-kd35t133.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jessica Zhang Nov. 15, 2023, 9:38 p.m. UTC | #1
On 11/15/2023 7:26 AM, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> For devices like the Anbernic RG351M and RG351P the panel is wired to
> an always on regulator. When the device suspends and wakes up, there
> are some slight artifacts on the screen that go away over time. If
> instead we hold the panel in reset status after it is unprepared,
> this does not happen.

Hi Chris,

LGTM, though if this is fixing something maybe we can add

Fixes: 5b6603360c12 ("drm/panel: add panel driver for Elida KD35T133 
panels")

> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>

Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>

Thanks,

Jessica Zhang

> ---
>   drivers/gpu/drm/panel/panel-elida-kd35t133.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> index 6cd8536c09ff..f1fc4a26f447 100644
> --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> @@ -104,6 +104,8 @@ static int kd35t133_unprepare(struct drm_panel *panel)
>   		return ret;
>   	}
>   
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> +
>   	regulator_disable(ctx->iovcc);
>   	regulator_disable(ctx->vdd);
>   
> -- 
> 2.34.1
>
Chris Morgan Nov. 16, 2023, 3:17 p.m. UTC | #2
On Wed, Nov 15, 2023 at 01:38:11PM -0800, Jessica Zhang wrote:
> 
> 
> On 11/15/2023 7:26 AM, Chris Morgan wrote:
> > From: Chris Morgan <macromorgan@hotmail.com>
> > 
> > For devices like the Anbernic RG351M and RG351P the panel is wired to
> > an always on regulator. When the device suspends and wakes up, there
> > are some slight artifacts on the screen that go away over time. If
> > instead we hold the panel in reset status after it is unprepared,
> > this does not happen.
> 
> Hi Chris,
> 
> LGTM, though if this is fixing something maybe we can add
> 
> Fixes: 5b6603360c12 ("drm/panel: add panel driver for Elida KD35T133
> panels")

It *may* fix an intermittent issue with the panel resuming from
suspend, but it really more solves an issue with devices for which
we're still adding support.

Should I still tag it as a "fixes" then?

Thank you.

> 
> > 
> > Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> 
> Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
> 
> Thanks,
> 
> Jessica Zhang
> 
> > ---
> >   drivers/gpu/drm/panel/panel-elida-kd35t133.c | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> > index 6cd8536c09ff..f1fc4a26f447 100644
> > --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> > +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> > @@ -104,6 +104,8 @@ static int kd35t133_unprepare(struct drm_panel *panel)
> >   		return ret;
> >   	}
> > +	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> > +
> >   	regulator_disable(ctx->iovcc);
> >   	regulator_disable(ctx->vdd);
> > -- 
> > 2.34.1
> >
Jessica Zhang Nov. 16, 2023, 9:40 p.m. UTC | #3
On 11/16/2023 7:17 AM, Chris Morgan wrote:
> On Wed, Nov 15, 2023 at 01:38:11PM -0800, Jessica Zhang wrote:
>>
>>
>> On 11/15/2023 7:26 AM, Chris Morgan wrote:
>>> From: Chris Morgan <macromorgan@hotmail.com>
>>>
>>> For devices like the Anbernic RG351M and RG351P the panel is wired to
>>> an always on regulator. When the device suspends and wakes up, there
>>> are some slight artifacts on the screen that go away over time. If
>>> instead we hold the panel in reset status after it is unprepared,
>>> this does not happen.
>>
>> Hi Chris,
>>
>> LGTM, though if this is fixing something maybe we can add
>>
>> Fixes: 5b6603360c12 ("drm/panel: add panel driver for Elida KD35T133
>> panels")
> 
> It *may* fix an intermittent issue with the panel resuming from
> suspend, but it really more solves an issue with devices for which
> we're still adding support.
> 
> Should I still tag it as a "fixes" then?

 From my understanding of the submitting patches docs [1], I think this 
warrants a "Fixes" since it's fixing an issue you're seeing with the 
original driver.

Thanks,

Jessica Zhang

[1] 
https://docs.kernel.org/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes

> 
> Thank you.
> 
>>
>>>
>>> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
>>
>> Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
>>
>> Thanks,
>>
>> Jessica Zhang
>>
>>> ---
>>>    drivers/gpu/drm/panel/panel-elida-kd35t133.c | 2 ++
>>>    1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
>>> index 6cd8536c09ff..f1fc4a26f447 100644
>>> --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
>>> +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
>>> @@ -104,6 +104,8 @@ static int kd35t133_unprepare(struct drm_panel *panel)
>>>    		return ret;
>>>    	}
>>> +	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
>>> +
>>>    	regulator_disable(ctx->iovcc);
>>>    	regulator_disable(ctx->vdd);
>>> -- 
>>> 2.34.1
>>>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
index 6cd8536c09ff..f1fc4a26f447 100644
--- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
+++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
@@ -104,6 +104,8 @@  static int kd35t133_unprepare(struct drm_panel *panel)
 		return ret;
 	}
 
+	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+
 	regulator_disable(ctx->iovcc);
 	regulator_disable(ctx->vdd);