From: Aradhya Bhatia <a-bhatia1@ti.com>
To: Tomi Valkeinen <tomba@kernel.org>, Jyri Sarha <jyri.sarha@iki.fi>,
Rob Herring <robh+dt@kernel.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: DRI Development List <dri-devel@lists.freedesktop.org>,
Devicetree List <devicetree@vger.kernel.org>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
Rahul T R <r-ravikumar@ti.com>, Devarsh Thakkar <devarsht@ti.com>,
Jayesh Choudhary <j-choudhary@ti.com>,
Aradhya Bhatia <a-bhatia1@ti.com>
Subject: [PATCH v6 5/5] drm/tidss: Enable Dual and Duplicate Modes for OLDI
Date: Sat, 19 Nov 2022 23:00:19 +0530 [thread overview]
Message-ID: <20221119173019.15643-6-a-bhatia1@ti.com> (raw)
In-Reply-To: <20221119173019.15643-1-a-bhatia1@ti.com>
The AM625 DSS IP contains 2 OLDI TXes which can work together to enable 2
cloned displays of or even a single dual-link display with higher
resolutions like WUXGA (1920x1200@60fps) with a reduced OLDI clock
frequency.
Configure the necessary register to enable and disable the OLDI TXes
with required modes configurations.
Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
---
drivers/gpu/drm/tidss/tidss_dispc.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c
index f26129fb1d8f..cf43de6216a5 100644
--- a/drivers/gpu/drm/tidss/tidss_dispc.c
+++ b/drivers/gpu/drm/tidss/tidss_dispc.c
@@ -1012,8 +1012,8 @@ static void dispc_enable_oldi(struct dispc_device *dispc, u32 hw_videoport,
int count = 0;
/*
- * For the moment DUALMODESYNC, MASTERSLAVE, MODE, and SRC
- * bits of DISPC_VP_DSS_OLDI_CFG are set statically to 0.
+ * For the moment MASTERSLAVE, and SRC bits of DISPC_VP_DSS_OLDI_CFG are
+ * always set to 0.
*/
if (fmt->data_width == 24)
@@ -1030,6 +1030,26 @@ static void dispc_enable_oldi(struct dispc_device *dispc, u32 hw_videoport,
oldi_cfg |= BIT(0); /* ENABLE */
+ switch (dispc->oldi_mode) {
+ case OLDI_SINGLE_LINK_SINGLE_MODE:
+ /* All configuration is done for this mode. */
+ break;
+
+ case OLDI_SINGLE_LINK_CLONE_MODE:
+ oldi_cfg |= BIT(5); /* CLONE MODE */
+ break;
+
+ case OLDI_DUAL_LINK_MODE:
+ oldi_cfg |= BIT(11); /* DUALMODESYNC */
+ oldi_cfg |= BIT(3); /* data-mapping field also indicates dual-link mode */
+ break;
+
+ default:
+ dev_warn(dispc->dev, "%s: Incorrect oldi mode. Returning.\n",
+ __func__);
+ return;
+ }
+
dispc_vp_write(dispc, hw_videoport, DISPC_VP_DSS_OLDI_CFG, oldi_cfg);
while (!(oldi_reset_bit & dispc_read(dispc, DSS_SYSSTATUS)) &&
--
2.38.1
next prev parent reply other threads:[~2022-11-19 17:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-19 17:30 [PATCH v6 0/5] Add DSS support for AM625 SoC Aradhya Bhatia
2022-11-19 17:30 ` [PATCH v6 1/5] dt-bindings: display: ti,am65x-dss: Add support for am625 dss Aradhya Bhatia
2022-11-19 17:30 ` [PATCH v6 2/5] drm/tidss: Add support for AM625 DSS Aradhya Bhatia
2022-12-20 12:52 ` Tomi Valkeinen
2022-11-19 17:30 ` [PATCH v6 3/5] drm/tidss: Add support to configure OLDI mode for am625-dss Aradhya Bhatia
2022-12-20 12:52 ` Tomi Valkeinen
2023-01-24 6:40 ` Aradhya Bhatia
2022-11-19 17:30 ` [PATCH v6 4/5] drm/tidss: Add IO CTRL and Power support for OLDI TX in am625 Aradhya Bhatia
2022-12-20 13:02 ` Tomi Valkeinen
2022-11-19 17:30 ` Aradhya Bhatia [this message]
2022-12-20 13:04 ` [PATCH v6 5/5] drm/tidss: Enable Dual and Duplicate Modes for OLDI Tomi Valkeinen
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=20221119173019.15643-6-a-bhatia1@ti.com \
--to=a-bhatia1@ti.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=devarsht@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=j-choudhary@ti.com \
--cc=jyri.sarha@iki.fi \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=r-ravikumar@ti.com \
--cc=robh+dt@kernel.org \
--cc=tomba@kernel.org \
--cc=vigneshr@ti.com \
/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
all inboxes | Powered by JetHome®