linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Vinod Koul <vkoul@kernel.org>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <robert.foss@linaro.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
	linux-arm-msm@vger.kernel.org
Subject: [PATCH v2 09/13] drm/bridge: lt9611: fix sync polarity for DVI output
Date: Sun,  8 Jan 2023 18:56:52 +0200	[thread overview]
Message-ID: <20230108165656.136871-10-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20230108165656.136871-1-dmitry.baryshkov@linaro.org>

Attaching DVI sink to the lt9611 requires different setup. Fix the
register write to make the DVI displays sync onto the correct sync
pulse.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/bridge/lontium-lt9611.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
index 773d7a56f86f..7f9be74acf0d 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
@@ -352,13 +352,16 @@ static int lt9611_video_check(struct lt9611 *lt9611)
 	return temp;
 }
 
-static void lt9611_hdmi_tx_digital(struct lt9611 *lt9611)
+static void lt9611_hdmi_tx_digital(struct lt9611 *lt9611, bool is_hdmi)
 {
 	regmap_write(lt9611->regmap, 0x8443, 0x46 - lt9611->vic);
 	regmap_write(lt9611->regmap, 0x8447, lt9611->vic);
 	regmap_write(lt9611->regmap, 0x843d, 0x0a); /* UD1 infoframe */
 
-	regmap_write(lt9611->regmap, 0x82d6, 0x8c);
+	if (is_hdmi)
+		regmap_write(lt9611->regmap, 0x82d6, 0x8c);
+	else
+		regmap_write(lt9611->regmap, 0x82d6, 0x0c);
 	regmap_write(lt9611->regmap, 0x82d7, 0x04);
 }
 
@@ -719,7 +722,7 @@ lt9611_bridge_atomic_enable(struct drm_bridge *bridge,
 	}
 
 	lt9611_mipi_input_analog(lt9611);
-	lt9611_hdmi_tx_digital(lt9611);
+	lt9611_hdmi_tx_digital(lt9611, connector->display_info.is_hdmi);
 	lt9611_hdmi_tx_phy(lt9611);
 
 	msleep(500);
-- 
2.39.0


  parent reply	other threads:[~2023-01-08 16:57 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-08 16:56 [PATCH v2 00/13] drm/bridge: lt9611: several fixes and improvements Dmitry Baryshkov
2023-01-08 16:56 ` [PATCH v2 01/13] drm/bridge: lt9611: fix sleep mode setup Dmitry Baryshkov
2023-01-12  9:24   ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 02/13] drm/bridge: lt9611: fix HPD reenablement Dmitry Baryshkov
2023-01-12  9:24   ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 03/13] drm/bridge: lt9611: fix polarity programming Dmitry Baryshkov
2023-01-12  9:26   ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 04/13] drm/bridge: lt9611: fix programming of video modes Dmitry Baryshkov
2023-01-12  9:27   ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 05/13] drm/bridge: lt9611: fix clock calculation Dmitry Baryshkov
2023-01-12  9:28   ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 06/13] drm/bridge: lt9611: pass a pointer to the of node Dmitry Baryshkov
2023-01-12  9:28   ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 07/13] drm/bridge: lt9611: rework the mode_set function Dmitry Baryshkov
2023-01-11 10:53   ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 08/13] drm/bridge: lt9611: attach to the next bridge Dmitry Baryshkov
2023-01-11 10:56   ` Neil Armstrong
2023-01-08 16:56 ` Dmitry Baryshkov [this message]
2023-01-12  9:28   ` [PATCH v2 09/13] drm/bridge: lt9611: fix sync polarity for DVI output Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 10/13] drm/bridge: lt9611: simplify video timings programming Dmitry Baryshkov
2023-01-11 10:56   ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 11/13] drm/bridge: lt9611: rework infoframes handling Dmitry Baryshkov
2023-01-12 13:51   ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 12/13] drm/bridge: lt9611: stop filtering modes via the table Dmitry Baryshkov
2023-01-11 10:57   ` Neil Armstrong
2023-01-11 15:37     ` Dmitry Baryshkov
2023-01-12  8:43       ` neil.armstrong
2023-01-12  9:19         ` Dmitry Baryshkov
2023-01-08 16:56 ` [PATCH v2 13/13] drm/bridge: lt9611: properly program the dual host mode Dmitry Baryshkov
2023-01-12 13:51   ` Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230108165656.136871-10-dmitry.baryshkov@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robert.foss@linaro.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).