Subject: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot

Since the pwm-mtk-disp driver was fixed to get PWM_EN state from the
right register, an old two-wrongs-make-one-right issue emerged: as a
result, MT8192 Asurada Spherion got no backlight at boot unless a
suspend/resume cycle was performed.
Also, the backlight would sometimes not get updated with the requested
value, requiring the user to change it back and forth until it worked.

This series fixes both of the aforementioned issues found on MT8192.

AngeloGioacchino Del Regno (2):
pwm: mtk-disp: Disable shadow registers before setting backlight
values
pwm: mtk-disp: Configure double buffering before reading in
.get_state()

drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 11 deletions(-)

--
2.39.0



Subject: [PATCH 2/2] pwm: mtk-disp: Configure double buffering before reading in .get_state()

The DISP_PWM controller's default behavior is to always use register
double buffering: all reads/writes are then performed on shadow
registers instead of working registers and this becomes an issue
in case our chosen configuration in Linux is different from the
default (or from the one that was pre-applied by the bootloader).

An example of broken behavior is when the controller is configured
to use shadow registers, but this driver wants to configure it
otherwise: what happens is that the .get_state() callback is called
right after registering the pwmchip and checks whether the PWM is
enabled by reading the DISP_PWM_EN register;
At this point, if shadow registers are enabled but their content
was not committed before booting Linux, we are *not* reading the
current PWM enablement status, leading to the kernel knowing that
the hardware is actually enabled when, in reality, it's not.

The aforementioned issue emerged since this driver was fixed with
commit 0b5ef3429d8f ("pwm: mtk-disp: Fix the parameters calculated
by the enabled flag of disp_pwm") making it to read the enablement
status from the right register.

Configure the controller in the .get_state() callback to avoid
this desync issue and get the backlight properly working again.

Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()")
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
drivers/pwm/pwm-mtk-disp.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c
index 82b430d881a2..fe9593f968ee 100644
--- a/drivers/pwm/pwm-mtk-disp.c
+++ b/drivers/pwm/pwm-mtk-disp.c
@@ -196,6 +196,16 @@ static int mtk_disp_pwm_get_state(struct pwm_chip *chip,
return err;
}

+ /*
+ * Apply DISP_PWM_DEBUG settings to choose whether to enable or disable
+ * registers double buffer and manual commit to working register before
+ * performing any read/write operation
+ */
+ if (mdp->data->bls_debug)
+ mtk_disp_pwm_update_bits(mdp, mdp->data->bls_debug,
+ mdp->data->bls_debug_mask,
+ mdp->data->bls_debug_mask);
+
rate = clk_get_rate(mdp->clk_main);
con0 = readl(mdp->base + mdp->data->con0);
con1 = readl(mdp->base + mdp->data->con1);
--
2.39.0


2023-01-26 15:20:55

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: Re: [PATCH 2/2] pwm: mtk-disp: Configure double buffering before reading in .get_state()

On Mon, Jan 23, 2023 at 05:06:15PM +0100, AngeloGioacchino Del Regno wrote:
> The DISP_PWM controller's default behavior is to always use register
> double buffering: all reads/writes are then performed on shadow
> registers instead of working registers and this becomes an issue
> in case our chosen configuration in Linux is different from the
> default (or from the one that was pre-applied by the bootloader).
>
> An example of broken behavior is when the controller is configured
> to use shadow registers, but this driver wants to configure it
> otherwise: what happens is that the .get_state() callback is called
> right after registering the pwmchip and checks whether the PWM is
> enabled by reading the DISP_PWM_EN register;
> At this point, if shadow registers are enabled but their content
> was not committed before booting Linux, we are *not* reading the
> current PWM enablement status, leading to the kernel knowing that
> the hardware is actually enabled when, in reality, it's not.
>
> The aforementioned issue emerged since this driver was fixed with
> commit 0b5ef3429d8f ("pwm: mtk-disp: Fix the parameters calculated
> by the enabled flag of disp_pwm") making it to read the enablement
> status from the right register.
>
> Configure the controller in the .get_state() callback to avoid
> this desync issue and get the backlight properly working again.
>
> Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()")
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> ---
> drivers/pwm/pwm-mtk-disp.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c
> index 82b430d881a2..fe9593f968ee 100644
> --- a/drivers/pwm/pwm-mtk-disp.c
> +++ b/drivers/pwm/pwm-mtk-disp.c
> @@ -196,6 +196,16 @@ static int mtk_disp_pwm_get_state(struct pwm_chip *chip,
> return err;
> }
>
> + /*
> + * Apply DISP_PWM_DEBUG settings to choose whether to enable or disable
> + * registers double buffer and manual commit to working register before
> + * performing any read/write operation
> + */
> + if (mdp->data->bls_debug)

I feel like this condition should be the same as in the apply() callback, since
they're doing the same write operation, so also have '&& !has_commit'.

Reviewed-by: N?colas F. R. A. Prado <[email protected]>
Tested-by: N?colas F. R. A. Prado <[email protected]>

On MT8192 Asurada Spherion.

Thanks,
N?colas

> + mtk_disp_pwm_update_bits(mdp, mdp->data->bls_debug,
> + mdp->data->bls_debug_mask,
> + mdp->data->bls_debug_mask);
> +
> rate = clk_get_rate(mdp->clk_main);
> con0 = readl(mdp->base + mdp->data->con0);
> con1 = readl(mdp->base + mdp->data->con1);
> --
> 2.39.0
>
>

Subject: Re: [PATCH 2/2] pwm: mtk-disp: Configure double buffering before reading in .get_state()

Il 26/01/23 16:19, Nícolas F. R. A. Prado ha scritto:
> On Mon, Jan 23, 2023 at 05:06:15PM +0100, AngeloGioacchino Del Regno wrote:
>> The DISP_PWM controller's default behavior is to always use register
>> double buffering: all reads/writes are then performed on shadow
>> registers instead of working registers and this becomes an issue
>> in case our chosen configuration in Linux is different from the
>> default (or from the one that was pre-applied by the bootloader).
>>
>> An example of broken behavior is when the controller is configured
>> to use shadow registers, but this driver wants to configure it
>> otherwise: what happens is that the .get_state() callback is called
>> right after registering the pwmchip and checks whether the PWM is
>> enabled by reading the DISP_PWM_EN register;
>> At this point, if shadow registers are enabled but their content
>> was not committed before booting Linux, we are *not* reading the
>> current PWM enablement status, leading to the kernel knowing that
>> the hardware is actually enabled when, in reality, it's not.
>>
>> The aforementioned issue emerged since this driver was fixed with
>> commit 0b5ef3429d8f ("pwm: mtk-disp: Fix the parameters calculated
>> by the enabled flag of disp_pwm") making it to read the enablement
>> status from the right register.
>>
>> Configure the controller in the .get_state() callback to avoid
>> this desync issue and get the backlight properly working again.
>>
>> Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()")
>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>> ---
>> drivers/pwm/pwm-mtk-disp.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c
>> index 82b430d881a2..fe9593f968ee 100644
>> --- a/drivers/pwm/pwm-mtk-disp.c
>> +++ b/drivers/pwm/pwm-mtk-disp.c
>> @@ -196,6 +196,16 @@ static int mtk_disp_pwm_get_state(struct pwm_chip *chip,
>> return err;
>> }
>>
>> + /*
>> + * Apply DISP_PWM_DEBUG settings to choose whether to enable or disable
>> + * registers double buffer and manual commit to working register before
>> + * performing any read/write operation
>> + */
>> + if (mdp->data->bls_debug)
>
> I feel like this condition should be the same as in the apply() callback, since
> they're doing the same write operation, so also have '&& !has_commit'.
>

The bls_debug register is used to both enable and/or disable various features,
including the one that I'm targeting in this commit, which is disabling shadow
registers.

As I explained in the commit message, we don't want to - and cannot - assume that
the bootloader doesn't *reset* the backlight controller before booting Linux: a
reset would re-enable the shadow registers, and this function being called as
first to check the backlight EN status may fail to do so.

This is as well true in the opposite situation where, in the future, we may want
to set shadow registers ON, while the bootloader sets them OFF before booting:
adding a (x && !has_commit) check in this branch would defeat that purpose and
make this commit... well.. partially broken! :-)

Cheers!
Angelo

> Reviewed-by: Nícolas F. R. A. Prado <[email protected]>
> Tested-by: Nícolas F. R. A. Prado <[email protected]>
>
> On MT8192 Asurada Spherion.
>
> Thanks,
> Nícolas
>
>> + mtk_disp_pwm_update_bits(mdp, mdp->data->bls_debug,
>> + mdp->data->bls_debug_mask,
>> + mdp->data->bls_debug_mask);
>> +
>> rate = clk_get_rate(mdp->clk_main);
>> con0 = readl(mdp->base + mdp->data->con0);
>> con1 = readl(mdp->base + mdp->data->con1);
>> --
>> 2.39.0
>>
>>



2023-01-26 15:31:11

by Adrian Ratiu

[permalink] [raw]
Subject: Re: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot

On Mon, 23 Jan 2023, AngeloGioacchino Del Regno
<[email protected]> wrote:
> Since the pwm-mtk-disp driver was fixed to get PWM_EN state from
> the right register, an old two-wrongs-make-one-right issue
> emerged: as a result, MT8192 Asurada Spherion got no backlight
> at boot unless a suspend/resume cycle was performed. Also, the
> backlight would sometimes not get updated with the requested
> value, requiring the user to change it back and forth until it
> worked.
>
> This series fixes both of the aforementioned issues found on
> MT8192.

Thanks for the series. This also improves backlight on MT8183.

I've been testing using the panfrost driver on a ChromiumOS
userspace on a jacuzzi board and I've had issues like the screen
going blank then not coming back, which these patches appear to
solve. Many thanks!

Tested-by: Adrian Ratiu <[email protected]>

>
> AngeloGioacchino Del Regno (2):
> pwm: mtk-disp: Disable shadow registers before setting backlight
> values
> pwm: mtk-disp: Configure double buffering before reading in
> .get_state()
>
> drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++-----------
> 1 file changed, 23 insertions(+), 11 deletions(-)
>
> --
> 2.39.0

2023-01-26 16:09:55

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: Re: [PATCH 2/2] pwm: mtk-disp: Configure double buffering before reading in .get_state()

On Thu, Jan 26, 2023 at 04:24:29PM +0100, AngeloGioacchino Del Regno wrote:
> Il 26/01/23 16:19, N?colas F. R. A. Prado ha scritto:
> > On Mon, Jan 23, 2023 at 05:06:15PM +0100, AngeloGioacchino Del Regno wrote:
> > > The DISP_PWM controller's default behavior is to always use register
> > > double buffering: all reads/writes are then performed on shadow
> > > registers instead of working registers and this becomes an issue
> > > in case our chosen configuration in Linux is different from the
> > > default (or from the one that was pre-applied by the bootloader).
> > >
> > > An example of broken behavior is when the controller is configured
> > > to use shadow registers, but this driver wants to configure it
> > > otherwise: what happens is that the .get_state() callback is called
> > > right after registering the pwmchip and checks whether the PWM is
> > > enabled by reading the DISP_PWM_EN register;
> > > At this point, if shadow registers are enabled but their content
> > > was not committed before booting Linux, we are *not* reading the
> > > current PWM enablement status, leading to the kernel knowing that
> > > the hardware is actually enabled when, in reality, it's not.
> > >
> > > The aforementioned issue emerged since this driver was fixed with
> > > commit 0b5ef3429d8f ("pwm: mtk-disp: Fix the parameters calculated
> > > by the enabled flag of disp_pwm") making it to read the enablement
> > > status from the right register.
> > >
> > > Configure the controller in the .get_state() callback to avoid
> > > this desync issue and get the backlight properly working again.
> > >
> > > Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()")
> > > Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
> > > ---
> > > drivers/pwm/pwm-mtk-disp.c | 10 ++++++++++
> > > 1 file changed, 10 insertions(+)
> > >
> > > diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c
> > > index 82b430d881a2..fe9593f968ee 100644
> > > --- a/drivers/pwm/pwm-mtk-disp.c
> > > +++ b/drivers/pwm/pwm-mtk-disp.c
> > > @@ -196,6 +196,16 @@ static int mtk_disp_pwm_get_state(struct pwm_chip *chip,
> > > return err;
> > > }
> > > + /*
> > > + * Apply DISP_PWM_DEBUG settings to choose whether to enable or disable
> > > + * registers double buffer and manual commit to working register before
> > > + * performing any read/write operation
> > > + */
> > > + if (mdp->data->bls_debug)
> >
> > I feel like this condition should be the same as in the apply() callback, since
> > they're doing the same write operation, so also have '&& !has_commit'.
> >
>
> The bls_debug register is used to both enable and/or disable various features,
> including the one that I'm targeting in this commit, which is disabling shadow
> registers.
>
> As I explained in the commit message, we don't want to - and cannot - assume that
> the bootloader doesn't *reset* the backlight controller before booting Linux: a
> reset would re-enable the shadow registers, and this function being called as
> first to check the backlight EN status may fail to do so.
>
> This is as well true in the opposite situation where, in the future, we may want
> to set shadow registers ON, while the bootloader sets them OFF before booting:
> adding a (x && !has_commit) check in this branch would defeat that purpose and
> make this commit... well.. partially broken! :-)

Makes sense, but in that case shouldn't we drop the (&& !has_commit) in the
check of the previous commit too? I get that in the pwm's core current logic,
get_state() is run before apply(), but given that we also write the debug
register in apply(), we're not relying on that. So as it currently stands, if in
the future the bootloader sets shadow registers OFF, and we want to set them ON,
and we call apply() before having called get_state(), we'd be back to the broken
behavior.

Thanks,
N?colas

>
> Cheers!
> Angelo
>
> > Reviewed-by: N?colas F. R. A. Prado <[email protected]>
> > Tested-by: N?colas F. R. A. Prado <[email protected]>
> >
> > On MT8192 Asurada Spherion.
> >
> > Thanks,
> > N?colas
> >
> > > + mtk_disp_pwm_update_bits(mdp, mdp->data->bls_debug,
> > > + mdp->data->bls_debug_mask,
> > > + mdp->data->bls_debug_mask);
> > > +
> > > rate = clk_get_rate(mdp->clk_main);
> > > con0 = readl(mdp->base + mdp->data->con0);
> > > con1 = readl(mdp->base + mdp->data->con1);
> > > --
> > > 2.39.0
> > >
> > >
>
>

Subject: Re: [PATCH 2/2] pwm: mtk-disp: Configure double buffering before reading in .get_state()

Il 26/01/23 17:09, Nícolas F. R. A. Prado ha scritto:
> On Thu, Jan 26, 2023 at 04:24:29PM +0100, AngeloGioacchino Del Regno wrote:
>> Il 26/01/23 16:19, Nícolas F. R. A. Prado ha scritto:
>>> On Mon, Jan 23, 2023 at 05:06:15PM +0100, AngeloGioacchino Del Regno wrote:
>>>> The DISP_PWM controller's default behavior is to always use register
>>>> double buffering: all reads/writes are then performed on shadow
>>>> registers instead of working registers and this becomes an issue
>>>> in case our chosen configuration in Linux is different from the
>>>> default (or from the one that was pre-applied by the bootloader).
>>>>
>>>> An example of broken behavior is when the controller is configured
>>>> to use shadow registers, but this driver wants to configure it
>>>> otherwise: what happens is that the .get_state() callback is called
>>>> right after registering the pwmchip and checks whether the PWM is
>>>> enabled by reading the DISP_PWM_EN register;
>>>> At this point, if shadow registers are enabled but their content
>>>> was not committed before booting Linux, we are *not* reading the
>>>> current PWM enablement status, leading to the kernel knowing that
>>>> the hardware is actually enabled when, in reality, it's not.
>>>>
>>>> The aforementioned issue emerged since this driver was fixed with
>>>> commit 0b5ef3429d8f ("pwm: mtk-disp: Fix the parameters calculated
>>>> by the enabled flag of disp_pwm") making it to read the enablement
>>>> status from the right register.
>>>>
>>>> Configure the controller in the .get_state() callback to avoid
>>>> this desync issue and get the backlight properly working again.
>>>>
>>>> Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()")
>>>> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
>>>> ---
>>>> drivers/pwm/pwm-mtk-disp.c | 10 ++++++++++
>>>> 1 file changed, 10 insertions(+)
>>>>
>>>> diff --git a/drivers/pwm/pwm-mtk-disp.c b/drivers/pwm/pwm-mtk-disp.c
>>>> index 82b430d881a2..fe9593f968ee 100644
>>>> --- a/drivers/pwm/pwm-mtk-disp.c
>>>> +++ b/drivers/pwm/pwm-mtk-disp.c
>>>> @@ -196,6 +196,16 @@ static int mtk_disp_pwm_get_state(struct pwm_chip *chip,
>>>> return err;
>>>> }
>>>> + /*
>>>> + * Apply DISP_PWM_DEBUG settings to choose whether to enable or disable
>>>> + * registers double buffer and manual commit to working register before
>>>> + * performing any read/write operation
>>>> + */
>>>> + if (mdp->data->bls_debug)
>>>
>>> I feel like this condition should be the same as in the apply() callback, since
>>> they're doing the same write operation, so also have '&& !has_commit'.
>>>
>>
>> The bls_debug register is used to both enable and/or disable various features,
>> including the one that I'm targeting in this commit, which is disabling shadow
>> registers.
>>
>> As I explained in the commit message, we don't want to - and cannot - assume that
>> the bootloader doesn't *reset* the backlight controller before booting Linux: a
>> reset would re-enable the shadow registers, and this function being called as
>> first to check the backlight EN status may fail to do so.
>>
>> This is as well true in the opposite situation where, in the future, we may want
>> to set shadow registers ON, while the bootloader sets them OFF before booting:
>> adding a (x && !has_commit) check in this branch would defeat that purpose and
>> make this commit... well.. partially broken! :-)
>
> Makes sense, but in that case shouldn't we drop the (&& !has_commit) in the
> check of the previous commit too? I get that in the pwm's core current logic,

No. The previous commit checks !has_commit to select a register write strategy
between "shadow -> commit" and "working registers - no commit necessary".

If you drop that check from the previous commit, how can you choose the write
strategy to use?! :-)

You can't rely on reading the bls_debug register, either, because it may be
holding different values compared to what we want due to, for example, a reset
and you can't rely on checking bls_debug_mask because in the future this kind
of selector may be residing in an entirely different register.

> get_state() is run before apply(), but given that we also write the debug
> register in apply(), we're not relying on that. So as it currently stands, if in
> the future the bootloader sets shadow registers OFF, and we want to set them ON,
> and we call apply() before having called get_state(), we'd be back to the broken
> behavior.

No, because the default BLS_DEBUG register value at IP reset is 0 - where 0 means
"do not disable commit, do not disable shadow register read, do not disable shadow
register write" :-)

Cheers,
Angelo

>
> Thanks,
> Nícolas
>
>>
>> Cheers!
>> Angelo
>>
>>> Reviewed-by: Nícolas F. R. A. Prado <[email protected]>
>>> Tested-by: Nícolas F. R. A. Prado <[email protected]>
>>>
>>> On MT8192 Asurada Spherion.
>>>
>>> Thanks,
>>> Nícolas
>>>
>>>> + mtk_disp_pwm_update_bits(mdp, mdp->data->bls_debug,
>>>> + mdp->data->bls_debug_mask,
>>>> + mdp->data->bls_debug_mask);
>>>> +
>>>> rate = clk_get_rate(mdp->clk_main);
>>>> con0 = readl(mdp->base + mdp->data->con0);
>>>> con1 = readl(mdp->base + mdp->data->con1);
>>>> --
>>>> 2.39.0
>>>>
>>>>
>>
>>



Subject: Re: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot

Il 23/01/23 17:06, AngeloGioacchino Del Regno ha scritto:
> Since the pwm-mtk-disp driver was fixed to get PWM_EN state from the
> right register, an old two-wrongs-make-one-right issue emerged: as a
> result, MT8192 Asurada Spherion got no backlight at boot unless a
> suspend/resume cycle was performed.
> Also, the backlight would sometimes not get updated with the requested
> value, requiring the user to change it back and forth until it worked.
>
> This series fixes both of the aforementioned issues found on MT8192.
>
> AngeloGioacchino Del Regno (2):
> pwm: mtk-disp: Disable shadow registers before setting backlight
> values
> pwm: mtk-disp: Configure double buffering before reading in
> .get_state()
>
> drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++-----------
> 1 file changed, 23 insertions(+), 11 deletions(-)
>

Gentle ping for this one: this is fixing backlight issues on multiple MediaTek
SoCs and was well tested.

Thanks,
Angelo

Subject: Re: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot

Il 23/02/23 15:16, AngeloGioacchino Del Regno ha scritto:
> Il 23/01/23 17:06, AngeloGioacchino Del Regno ha scritto:
>> Since the pwm-mtk-disp driver was fixed to get PWM_EN state from the
>> right register, an old two-wrongs-make-one-right issue emerged: as a
>> result, MT8192 Asurada Spherion got no backlight at boot unless a
>> suspend/resume cycle was performed.
>> Also, the backlight would sometimes not get updated with the requested
>> value, requiring the user to change it back and forth until it worked.
>>
>> This series fixes both of the aforementioned issues found on MT8192.
>>
>> AngeloGioacchino Del Regno (2):
>>    pwm: mtk-disp: Disable shadow registers before setting backlight
>>      values
>>    pwm: mtk-disp: Configure double buffering before reading in
>>      .get_state()
>>
>>   drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++-----------
>>   1 file changed, 23 insertions(+), 11 deletions(-)
>>
>
> Gentle ping for this one: this is fixing backlight issues on multiple MediaTek
> SoCs and was well tested.
>
> Thanks,
> Angelo

Since this series was sent more than one month ago, and since this fixes broken
backlight on a number of Chromebooks with MT8183 and MT8192 SoCs, and seen the
urgency of getting these fixes in, I'm adding Greg to the loop.

Regards,
Angelo

2023-03-08 14:51:39

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot

On Wed, Mar 08, 2023 at 12:46:07PM +0100, AngeloGioacchino Del Regno wrote:
> Il 23/02/23 15:16, AngeloGioacchino Del Regno ha scritto:
> > Il 23/01/23 17:06, AngeloGioacchino Del Regno ha scritto:
> > > Since the pwm-mtk-disp driver was fixed to get PWM_EN state from the
> > > right register, an old two-wrongs-make-one-right issue emerged: as a
> > > result, MT8192 Asurada Spherion got no backlight at boot unless a
> > > suspend/resume cycle was performed.
> > > Also, the backlight would sometimes not get updated with the requested
> > > value, requiring the user to change it back and forth until it worked.
> > >
> > > This series fixes both of the aforementioned issues found on MT8192.
> > >
> > > AngeloGioacchino Del Regno (2):
> > > ?? pwm: mtk-disp: Disable shadow registers before setting backlight
> > > ???? values
> > > ?? pwm: mtk-disp: Configure double buffering before reading in
> > > ???? .get_state()
> > >
> > > ? drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++-----------
> > > ? 1 file changed, 23 insertions(+), 11 deletions(-)
> > >
> >
> > Gentle ping for this one: this is fixing backlight issues on multiple MediaTek
> > SoCs and was well tested.
> >
> > Thanks,
> > Angelo
>
> Since this series was sent more than one month ago, and since this fixes broken
> backlight on a number of Chromebooks with MT8183 and MT8192 SoCs, and seen the
> urgency of getting these fixes in, I'm adding Greg to the loop.

$ ./scripts/get_maintainer.pl drivers/pwm/pwm-mtk-disp.c
Thierry Reding <[email protected]> (maintainer:PWM SUBSYSTEM)
"Uwe Kleine-K?nig" <[email protected]> (reviewer:PWM SUBSYSTEM)
Matthias Brugger <[email protected]> (maintainer:ARM/Mediatek SoC support)
AngeloGioacchino Del Regno <[email protected]> (reviewer:ARM/Mediatek SoC support)
[email protected] (open list:PWM SUBSYSTEM)
[email protected] (open list:ARM/Mediatek SoC support)
[email protected] (moderated list:ARM/Mediatek SoC support)
[email protected] (moderated list:ARM/Mediatek SoC support)

I don't see my name in there, did I become the PWM maintainer somehow?

What's wrong with Thierry taking this like normal?

thanks,

greg k-h

Subject: Re: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot

Il 08/03/23 15:50, Greg Kroah-Hartman ha scritto:
> On Wed, Mar 08, 2023 at 12:46:07PM +0100, AngeloGioacchino Del Regno wrote:
>> Il 23/02/23 15:16, AngeloGioacchino Del Regno ha scritto:
>>> Il 23/01/23 17:06, AngeloGioacchino Del Regno ha scritto:
>>>> Since the pwm-mtk-disp driver was fixed to get PWM_EN state from the
>>>> right register, an old two-wrongs-make-one-right issue emerged: as a
>>>> result, MT8192 Asurada Spherion got no backlight at boot unless a
>>>> suspend/resume cycle was performed.
>>>> Also, the backlight would sometimes not get updated with the requested
>>>> value, requiring the user to change it back and forth until it worked.
>>>>
>>>> This series fixes both of the aforementioned issues found on MT8192.
>>>>
>>>> AngeloGioacchino Del Regno (2):
>>>>    pwm: mtk-disp: Disable shadow registers before setting backlight
>>>>      values
>>>>    pwm: mtk-disp: Configure double buffering before reading in
>>>>      .get_state()
>>>>
>>>>   drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++-----------
>>>>   1 file changed, 23 insertions(+), 11 deletions(-)
>>>>
>>>
>>> Gentle ping for this one: this is fixing backlight issues on multiple MediaTek
>>> SoCs and was well tested.
>>>
>>> Thanks,
>>> Angelo
>>
>> Since this series was sent more than one month ago, and since this fixes broken
>> backlight on a number of Chromebooks with MT8183 and MT8192 SoCs, and seen the
>> urgency of getting these fixes in, I'm adding Greg to the loop.
>
> $ ./scripts/get_maintainer.pl drivers/pwm/pwm-mtk-disp.c
> Thierry Reding <[email protected]> (maintainer:PWM SUBSYSTEM)
> "Uwe Kleine-König" <[email protected]> (reviewer:PWM SUBSYSTEM)
> Matthias Brugger <[email protected]> (maintainer:ARM/Mediatek SoC support)
> AngeloGioacchino Del Regno <[email protected]> (reviewer:ARM/Mediatek SoC support)
> [email protected] (open list:PWM SUBSYSTEM)
> [email protected] (open list:ARM/Mediatek SoC support)
> [email protected] (moderated list:ARM/Mediatek SoC support)
> [email protected] (moderated list:ARM/Mediatek SoC support)
>
> I don't see my name in there, did I become the PWM maintainer somehow?
>
> What's wrong with Thierry taking this like normal?
>

Nothing wrong with that. I felt like this series got ignored as I've never
received any reply from Thierry, even though it's a Fixes series that I deem
to be moderately urgent; that's why I added you to the loop.

If that created unnecessary noise, I'm extremely sorry and won't happen again.

Regards,
Angelo


2023-03-08 15:45:11

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot

On Wed, Mar 08, 2023 at 03:55:59PM +0100, AngeloGioacchino Del Regno wrote:
> Il 08/03/23 15:50, Greg Kroah-Hartman ha scritto:
> > On Wed, Mar 08, 2023 at 12:46:07PM +0100, AngeloGioacchino Del Regno wrote:
> > > Il 23/02/23 15:16, AngeloGioacchino Del Regno ha scritto:
> > > > Il 23/01/23 17:06, AngeloGioacchino Del Regno ha scritto:
> > > > > Since the pwm-mtk-disp driver was fixed to get PWM_EN state from the
> > > > > right register, an old two-wrongs-make-one-right issue emerged: as a
> > > > > result, MT8192 Asurada Spherion got no backlight at boot unless a
> > > > > suspend/resume cycle was performed.
> > > > > Also, the backlight would sometimes not get updated with the requested
> > > > > value, requiring the user to change it back and forth until it worked.
> > > > >
> > > > > This series fixes both of the aforementioned issues found on MT8192.
> > > > >
> > > > > AngeloGioacchino Del Regno (2):
> > > > > ?? pwm: mtk-disp: Disable shadow registers before setting backlight
> > > > > ???? values
> > > > > ?? pwm: mtk-disp: Configure double buffering before reading in
> > > > > ???? .get_state()
> > > > >
> > > > > ? drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++-----------
> > > > > ? 1 file changed, 23 insertions(+), 11 deletions(-)
> > > > >
> > > >
> > > > Gentle ping for this one: this is fixing backlight issues on multiple MediaTek
> > > > SoCs and was well tested.
> > > >
> > > > Thanks,
> > > > Angelo
> > >
> > > Since this series was sent more than one month ago, and since this fixes broken
> > > backlight on a number of Chromebooks with MT8183 and MT8192 SoCs, and seen the
> > > urgency of getting these fixes in, I'm adding Greg to the loop.
> >
> > $ ./scripts/get_maintainer.pl drivers/pwm/pwm-mtk-disp.c
> > Thierry Reding <[email protected]> (maintainer:PWM SUBSYSTEM)
> > "Uwe Kleine-K?nig" <[email protected]> (reviewer:PWM SUBSYSTEM)
> > Matthias Brugger <[email protected]> (maintainer:ARM/Mediatek SoC support)
> > AngeloGioacchino Del Regno <[email protected]> (reviewer:ARM/Mediatek SoC support)
> > [email protected] (open list:PWM SUBSYSTEM)
> > [email protected] (open list:ARM/Mediatek SoC support)
> > [email protected] (moderated list:ARM/Mediatek SoC support)
> > [email protected] (moderated list:ARM/Mediatek SoC support)
> >
> > I don't see my name in there, did I become the PWM maintainer somehow?
> >
> > What's wrong with Thierry taking this like normal?
> >
>
> Nothing wrong with that. I felt like this series got ignored as I've never
> received any reply from Thierry, even though it's a Fixes series that I deem
> to be moderately urgent; that's why I added you to the loop.

Then ask Thierry and Uwe, what would you want to have happen if you were
the maintainer of a subsystem?

> If that created unnecessary noise, I'm extremely sorry and won't happen again.

Not noise, just confusion on my part. I'm glad to take patches that
have no obvious maintainers, or maintainers that have disappeared, but
that doesn't seem to be the case here.

Also remember that we had the merge window, which is 2 weeks of us not
being able to take any new code at all, even for fixes.

And finally, to make it easier for your code to be accepted, please take
the time to review other's code for the subsystems you care about to
make the maintainer's load easier. If you do that, you will often find
your patches getting faster response just by virtue of there being less
work to do on the subsystem overall. Why not do that right now to help
out with other PWM patches?

thanks,

greg k-h

Subject: Re: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot

Il 08/03/23 16:43, Greg Kroah-Hartman ha scritto:
> On Wed, Mar 08, 2023 at 03:55:59PM +0100, AngeloGioacchino Del Regno wrote:
>> Il 08/03/23 15:50, Greg Kroah-Hartman ha scritto:
>>> On Wed, Mar 08, 2023 at 12:46:07PM +0100, AngeloGioacchino Del Regno wrote:
>>>> Il 23/02/23 15:16, AngeloGioacchino Del Regno ha scritto:
>>>>> Il 23/01/23 17:06, AngeloGioacchino Del Regno ha scritto:
>>>>>> Since the pwm-mtk-disp driver was fixed to get PWM_EN state from the
>>>>>> right register, an old two-wrongs-make-one-right issue emerged: as a
>>>>>> result, MT8192 Asurada Spherion got no backlight at boot unless a
>>>>>> suspend/resume cycle was performed.
>>>>>> Also, the backlight would sometimes not get updated with the requested
>>>>>> value, requiring the user to change it back and forth until it worked.
>>>>>>
>>>>>> This series fixes both of the aforementioned issues found on MT8192.
>>>>>>
>>>>>> AngeloGioacchino Del Regno (2):
>>>>>>    pwm: mtk-disp: Disable shadow registers before setting backlight
>>>>>>      values
>>>>>>    pwm: mtk-disp: Configure double buffering before reading in
>>>>>>      .get_state()
>>>>>>
>>>>>>   drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++-----------
>>>>>>   1 file changed, 23 insertions(+), 11 deletions(-)
>>>>>>
>>>>>
>>>>> Gentle ping for this one: this is fixing backlight issues on multiple MediaTek
>>>>> SoCs and was well tested.
>>>>>
>>>>> Thanks,
>>>>> Angelo
>>>>
>>>> Since this series was sent more than one month ago, and since this fixes broken
>>>> backlight on a number of Chromebooks with MT8183 and MT8192 SoCs, and seen the
>>>> urgency of getting these fixes in, I'm adding Greg to the loop.
>>>
>>> $ ./scripts/get_maintainer.pl drivers/pwm/pwm-mtk-disp.c
>>> Thierry Reding <[email protected]> (maintainer:PWM SUBSYSTEM)
>>> "Uwe Kleine-König" <[email protected]> (reviewer:PWM SUBSYSTEM)
>>> Matthias Brugger <[email protected]> (maintainer:ARM/Mediatek SoC support)
>>> AngeloGioacchino Del Regno <[email protected]> (reviewer:ARM/Mediatek SoC support)
>>> [email protected] (open list:PWM SUBSYSTEM)
>>> [email protected] (open list:ARM/Mediatek SoC support)
>>> [email protected] (moderated list:ARM/Mediatek SoC support)
>>> [email protected] (moderated list:ARM/Mediatek SoC support)
>>>
>>> I don't see my name in there, did I become the PWM maintainer somehow?
>>>
>>> What's wrong with Thierry taking this like normal?
>>>
>>
>> Nothing wrong with that. I felt like this series got ignored as I've never
>> received any reply from Thierry, even though it's a Fixes series that I deem
>> to be moderately urgent; that's why I added you to the loop.
>
> Then ask Thierry and Uwe, what would you want to have happen if you were
> the maintainer of a subsystem?
>
>> If that created unnecessary noise, I'm extremely sorry and won't happen again.
>
> Not noise, just confusion on my part. I'm glad to take patches that
> have no obvious maintainers, or maintainers that have disappeared, but
> that doesn't seem to be the case here.
>
> Also remember that we had the merge window, which is 2 weeks of us not
> being able to take any new code at all, even for fixes.
>
> And finally, to make it easier for your code to be accepted, please take
> the time to review other's code for the subsystems you care about to
> make the maintainer's load easier. If you do that, you will often find
> your patches getting faster response just by virtue of there being less
> work to do on the subsystem overall. Why not do that right now to help
> out with other PWM patches?
>
> thanks,
>
> greg k-h
>

That's right, I see the point. Will try to help as soon as I can find BW.

Thanks and sorry again,
Angelo


2023-03-08 16:09:02

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot

On Wed, Mar 08, 2023 at 04:43:25PM +0100, Greg Kroah-Hartman wrote:
> On Wed, Mar 08, 2023 at 03:55:59PM +0100, AngeloGioacchino Del Regno wrote:
> > Il 08/03/23 15:50, Greg Kroah-Hartman ha scritto:
> > > On Wed, Mar 08, 2023 at 12:46:07PM +0100, AngeloGioacchino Del Regno wrote:
> > > > Il 23/02/23 15:16, AngeloGioacchino Del Regno ha scritto:
> > > > > Il 23/01/23 17:06, AngeloGioacchino Del Regno ha scritto:
> > > > > > Since the pwm-mtk-disp driver was fixed to get PWM_EN state from the
> > > > > > right register, an old two-wrongs-make-one-right issue emerged: as a
> > > > > > result, MT8192 Asurada Spherion got no backlight at boot unless a
> > > > > > suspend/resume cycle was performed.
> > > > > > Also, the backlight would sometimes not get updated with the requested
> > > > > > value, requiring the user to change it back and forth until it worked.
> > > > > >
> > > > > > This series fixes both of the aforementioned issues found on MT8192.
> > > > > >
> > > > > > AngeloGioacchino Del Regno (2):
> > > > > > ?? pwm: mtk-disp: Disable shadow registers before setting backlight
> > > > > > ???? values
> > > > > > ?? pwm: mtk-disp: Configure double buffering before reading in
> > > > > > ???? .get_state()
> > > > > >
> > > > > > ? drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++-----------
> > > > > > ? 1 file changed, 23 insertions(+), 11 deletions(-)
> > > > > >
> > > > >
> > > > > Gentle ping for this one: this is fixing backlight issues on multiple MediaTek
> > > > > SoCs and was well tested.
> > > > >
> > > > > Thanks,
> > > > > Angelo
> > > >
> > > > Since this series was sent more than one month ago, and since this fixes broken
> > > > backlight on a number of Chromebooks with MT8183 and MT8192 SoCs, and seen the
> > > > urgency of getting these fixes in, I'm adding Greg to the loop.
> > >
> > > $ ./scripts/get_maintainer.pl drivers/pwm/pwm-mtk-disp.c
> > > Thierry Reding <[email protected]> (maintainer:PWM SUBSYSTEM)
> > > "Uwe Kleine-K?nig" <[email protected]> (reviewer:PWM SUBSYSTEM)
> > > Matthias Brugger <[email protected]> (maintainer:ARM/Mediatek SoC support)
> > > AngeloGioacchino Del Regno <[email protected]> (reviewer:ARM/Mediatek SoC support)
> > > [email protected] (open list:PWM SUBSYSTEM)
> > > [email protected] (open list:ARM/Mediatek SoC support)
> > > [email protected] (moderated list:ARM/Mediatek SoC support)
> > > [email protected] (moderated list:ARM/Mediatek SoC support)
> > >
> > > I don't see my name in there, did I become the PWM maintainer somehow?
> > >
> > > What's wrong with Thierry taking this like normal?
> > >
> >
> > Nothing wrong with that. I felt like this series got ignored as I've never
> > received any reply from Thierry, even though it's a Fixes series that I deem
> > to be moderately urgent; that's why I added you to the loop.
>
> Then ask Thierry and Uwe, what would you want to have happen if you were
> the maintainer of a subsystem?
>
> > If that created unnecessary noise, I'm extremely sorry and won't happen again.
>
> Not noise, just confusion on my part. I'm glad to take patches that
> have no obvious maintainers, or maintainers that have disappeared, but
> that doesn't seem to be the case here.

I'm aware that there is a big backlog on PWM patches. I'm trying to
catch up but there is only so much time. Sorry this results in delays
for you (and others), I'm not happy with this situation either.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (3.63 kB)
signature.asc (488.00 B)
Download all attachments