2023-05-16 16:52:42

by Alexandru Ardelean

[permalink] [raw]
Subject: [PATCH] drm: adv7511: Fix low refresh rate register for ADV7533/5

From: Bogdan Togorean <[email protected]>

For ADV7533 and ADV7535 low refresh rate is selected using
bits [3:2] of 0x4a main register.
So depending on ADV model write 0xfb or 0x4a register.

Signed-off-by: Bogdan Togorean <[email protected]>
Signed-off-by: Alexandru Ardelean <[email protected]>
---
drivers/gpu/drm/i2c/adv7511.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c
index 61aa824d45d2..e016105a8fbe 100644
--- a/drivers/gpu/drm/i2c/adv7511.c
+++ b/drivers/gpu/drm/i2c/adv7511.c
@@ -729,8 +729,13 @@ static void adv7511_encoder_mode_set(struct drm_encoder *encoder,
else
low_refresh_rate = ADV7511_LOW_REFRESH_RATE_NONE;

- regmap_update_bits(adv7511->regmap, 0xfb,
- 0x6, low_refresh_rate << 1);
+ if (adv7511->type == ADV7511)
+ regmap_update_bits(adv7511->regmap, 0xfb,
+ 0x6, low_refresh_rate << 1);
+ else
+ regmap_update_bits(adv7511->regmap, 0x4a,
+ 0xc, low_refresh_rate << 2);
+
regmap_update_bits(adv7511->regmap, 0x17,
0x60, (vsync_polarity << 6) | (hsync_polarity << 5));

--
2.40.1



2023-07-13 20:20:23

by Alexandru Ardelean

[permalink] [raw]
Subject: Re: [PATCH] drm: adv7511: Fix low refresh rate register for ADV7533/5

On Tue, May 16, 2023 at 7:44 PM Alexandru Ardelean <[email protected]> wrote:
>
> From: Bogdan Togorean <[email protected]>
>
> For ADV7533 and ADV7535 low refresh rate is selected using
> bits [3:2] of 0x4a main register.
> So depending on ADV model write 0xfb or 0x4a register.
>

Ping on this patch :)

> Signed-off-by: Bogdan Togorean <[email protected]>
> Signed-off-by: Alexandru Ardelean <[email protected]>
> ---
> drivers/gpu/drm/i2c/adv7511.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c
> index 61aa824d45d2..e016105a8fbe 100644
> --- a/drivers/gpu/drm/i2c/adv7511.c
> +++ b/drivers/gpu/drm/i2c/adv7511.c
> @@ -729,8 +729,13 @@ static void adv7511_encoder_mode_set(struct drm_encoder *encoder,
> else
> low_refresh_rate = ADV7511_LOW_REFRESH_RATE_NONE;
>
> - regmap_update_bits(adv7511->regmap, 0xfb,
> - 0x6, low_refresh_rate << 1);
> + if (adv7511->type == ADV7511)
> + regmap_update_bits(adv7511->regmap, 0xfb,
> + 0x6, low_refresh_rate << 1);
> + else
> + regmap_update_bits(adv7511->regmap, 0x4a,
> + 0xc, low_refresh_rate << 2);
> +
> regmap_update_bits(adv7511->regmap, 0x17,
> 0x60, (vsync_polarity << 6) | (hsync_polarity << 5));
>
> --
> 2.40.1
>

2023-07-13 20:25:22

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH] drm: adv7511: Fix low refresh rate register for ADV7533/5

On Wed, May 17, 2023 at 4:08 AM Alexandru Ardelean <[email protected]> wrote:
>
> From: Bogdan Togorean <[email protected]>
>
> For ADV7533 and ADV7535 low refresh rate is selected using
> bits [3:2] of 0x4a main register.
> So depending on ADV model write 0xfb or 0x4a register.
>
> Signed-off-by: Bogdan Togorean <[email protected]>
> Signed-off-by: Alexandru Ardelean <[email protected]>

Should this contain a Fixes tag so that it could be backported to
stable kernels?

2023-07-14 07:53:46

by Nuno Sá

[permalink] [raw]
Subject: Re: [PATCH] drm: adv7511: Fix low refresh rate register for ADV7533/5

Hey Alex,

On Thu, 2023-07-13 at 17:19 -0300, Fabio Estevam wrote:
> On Wed, May 17, 2023 at 4:08 AM Alexandru Ardelean <[email protected]> wrote:
> >
> > From: Bogdan Togorean <[email protected]>
> >
> > For ADV7533 and ADV7535 low refresh rate is selected using
> > bits [3:2] of 0x4a main register.
> > So depending on ADV model write 0xfb or 0x4a register.
> >
> > Signed-off-by: Bogdan Togorean <[email protected]>
> > Signed-off-by: Alexandru Ardelean <[email protected]>
>
> Should this contain a Fixes tag so that it could be backported to
> stable kernels?

Yeah, most likely yes... With that:

Reviewed-by: Nuno Sa <[email protected]>



2023-07-18 06:29:48

by Alexandru Ardelean

[permalink] [raw]
Subject: Re: [PATCH] drm: adv7511: Fix low refresh rate register for ADV7533/5

On Fri, Jul 14, 2023 at 10:48 AM Nuno Sá <[email protected]> wrote:
>
> Hey Alex,

Hey Nuno :)

>
> On Thu, 2023-07-13 at 17:19 -0300, Fabio Estevam wrote:
> > On Wed, May 17, 2023 at 4:08 AM Alexandru Ardelean <[email protected]> wrote:
> > >
> > > From: Bogdan Togorean <[email protected]>
> > >
> > > For ADV7533 and ADV7535 low refresh rate is selected using
> > > bits [3:2] of 0x4a main register.
> > > So depending on ADV model write 0xfb or 0x4a register.
> > >
> > > Signed-off-by: Bogdan Togorean <[email protected]>
> > > Signed-off-by: Alexandru Ardelean <[email protected]>
> >
> > Should this contain a Fixes tag so that it could be backported to
> > stable kernels?
>
> Yeah, most likely yes... With that:

I'll add one.
I seem to forget some upstreaming routines, since I started doing less
upstreaming.

Thanks
Alex

>
> Reviewed-by: Nuno Sa <[email protected]>
>
>