[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200324131027.62836-1-bogdan.togorea@analog.com>
Date: Tue, 24 Mar 2020 15:10:25 +0200
From: Bogdan Togorean <bogdan.togorea@...log.com>
To: <dri-devel@...ts.freedesktop.org>
CC: Bogdan Togorean <bogdan.togorean@...log.com>,
Andrzej Hajda <a.hajda@...sung.com>,
Neil Armstrong <narmstrong@...libre.com>,
"Laurent Pinchart" <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...l.net>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Matt Redfearn <matt.redfearn@...nci.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Sam Ravnborg <sam@...nborg.org>,
Thomas Gleixner <tglx@...utronix.de>,
Rob Clark <robdclark@...omium.org>,
Lars-Peter Clausen <lars@...afoo.de>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] drm: bridge: adv7511: Fix low refresh rate register for ADV7533/5
From: Bogdan Togorean <bogdan.togorean@...log.com>
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 <bogdan.togorean@...log.com>
---
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 9e13e466e72c..2f8f7510f07e 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.17.1
Powered by blists - more mailing lists