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.
Fixes: 9c8af882bf12: ("drm: Add adv7511 encoder driver")
Signed-off-by: Bogdan Togorean <[email protected]>
---
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index f6d2681f6927..4508a304d23f 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -756,8 +756,13 @@ static void adv7511_mode_set(struct adv7511 *adv7511,
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.22.0
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.
Fixes: 2437e7cd88e8 ("drm/bridge: adv7533: Initial support for ADV7533")
Reviewed-by: Nuno Sa <[email protected]>
Signed-off-by: Bogdan Togorean <[email protected]>
---
Changelog v1 -> v2:
* https://lore.kernel.org/dri-devel/[email protected]/
* added Fixes: tag
* added Reviewed-by: tag for Nuno
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index ddceafa7b637..09290a377957 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -786,8 +786,13 @@ static void adv7511_mode_set(struct adv7511 *adv7511,
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.41.0
On Tue, 2023-07-18 at 09:28 +0300, Alexandru Ardelean 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.
>
> Fixes: 2437e7cd88e8 ("drm/bridge: adv7533: Initial support for ADV7533")
> Reviewed-by: Nuno Sa <[email protected]>
> Signed-off-by: Bogdan Togorean <[email protected]>
> ---
>
It looks like you dropped your S-o-b tag in v2? I guess it was not on purpose :)
- Nuno Sá
> Changelog v1 -> v2:
> *
> https://lore.kernel.org/dri-devel/[email protected]/
> * added Fixes: tag
> * added Reviewed-by: tag for Nuno
>
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index ddceafa7b637..09290a377957 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -786,8 +786,13 @@ static void adv7511_mode_set(struct adv7511 *adv7511,
> 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));
>
On Tue, Jul 18, 2023 at 10:00 AM Nuno Sá <[email protected]> wrote:
>
> On Tue, 2023-07-18 at 09:28 +0300, Alexandru Ardelean 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.
> >
> > Fixes: 2437e7cd88e8 ("drm/bridge: adv7533: Initial support for ADV7533")
> > Reviewed-by: Nuno Sa <[email protected]>
> > Signed-off-by: Bogdan Togorean <[email protected]>
> > ---
> >
>
> It looks like you dropped your S-o-b tag in v2? I guess it was not on purpose :)
oops; yes;
will send a V3;
thanks for the notification;
>
> - Nuno Sá
>
> > Changelog v1 -> v2:
> > *
> > https://lore.kernel.org/dri-devel/[email protected]/
> > * added Fixes: tag
> > * added Reviewed-by: tag for Nuno
> >
> > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +++++++--
> > 1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > index ddceafa7b637..09290a377957 100644
> > --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > @@ -786,8 +786,13 @@ static void adv7511_mode_set(struct adv7511 *adv7511,
> > 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));
> >
>
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.
Fixes: 2437e7cd88e8 ("drm/bridge: adv7533: Initial support for ADV7533")
Reviewed-by: Nuno Sa <[email protected]>
Signed-off-by: Bogdan Togorean <[email protected]>
Signed-off-by: Alexandru Ardelean <[email protected]>
---
Changelog v2 -> v3:
* https://lore.kernel.org/dri-devel/[email protected]/T/#u
* Added my S-o-b tag back
Changelog v1 -> v2:
* https://lore.kernel.org/dri-devel/[email protected]/
* added Fixes: tag
* added Reviewed-by: tag for Nuno
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index ddceafa7b637..09290a377957 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -786,8 +786,13 @@ static void adv7511_mode_set(struct adv7511 *adv7511,
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.41.0
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.
Fixes: 2437e7cd88e8 ("drm/bridge: adv7533: Initial support for ADV7533")
Reviewed-by: Robert Foss <[email protected]>
Reviewed-by: Nuno Sa <[email protected]>
Signed-off-by: Bogdan Togorean <[email protected]>
Signed-off-by: Alexandru Ardelean <[email protected]>
---
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index ddceafa7b637..8d6c93296503 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -786,8 +786,13 @@ static void adv7511_mode_set(struct adv7511 *adv7511,
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.41.0
On Wed, Jul 19, 2023 at 9:02 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.
>
> Fixes: 2437e7cd88e8 ("drm/bridge: adv7533: Initial support for ADV7533")
> Reviewed-by: Robert Foss <[email protected]>
> Reviewed-by: Nuno Sa <[email protected]>
> Signed-off-by: Bogdan Togorean <[email protected]>
> Signed-off-by: Alexandru Ardelean <[email protected]>
> ---
Right.
I forgot a changelog here.
Apologies
Changelog v3 -> v4:
* Ran ./scripts/checkpatch.pl --strict
* Added Reviewed-by: Robert Foss <[email protected]>
Changelog v2 -> v3:
* https://lore.kernel.org/dri-devel/[email protected]/T/#u
* Added my S-o-b tag back
Changelog v1 -> v2:
* https://lore.kernel.org/dri-devel/[email protected]/
* added Fixes: tag
* added Reviewed-by: tag for Nuno
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index ddceafa7b637..8d6c93296503 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -786,8 +786,13 @@ static void adv7511_mode_set(struct adv7511 *adv7511,
> 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.41.0
>
On 19.07.23 08:01, Alexandru Ardelean 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.
>
> Fixes: 2437e7cd88e8 ("drm/bridge: adv7533: Initial support for ADV7533")
> Reviewed-by: Robert Foss <[email protected]>
> Reviewed-by: Nuno Sa <[email protected]>
> Signed-off-by: Bogdan Togorean <[email protected]>
> Signed-off-by: Alexandru Ardelean <[email protected]>
Reviewed-by: Frieder Schrempf <[email protected]>
On Wed, 19 Jul 2023 09:01:43 +0300, Alexandru Ardelean 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.
>
>
> [...]
Applied, thanks!
[1/1] drm: adv7511: Fix low refresh rate register for ADV7533/5
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=d281eeaa4de2
Rob