[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7df3e5bc-8d37-5f55-1666-9ea88f0c59ce@ideasonboard.com>
Date: Wed, 12 Oct 2022 15:35:51 +0300
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Aradhya Bhatia <a-bhatia1@...com>, Jyri Sarha <jyri.sarha@....fi>,
Rob Herring <robh+dt@...nel.org>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Cc: Nishanth Menon <nm@...com>, Vignesh Raghavendra <vigneshr@...com>,
Rahul T R <r-ravikumar@...com>,
DRI Development List <dri-devel@...ts.freedesktop.org>,
Devicetree List <devicetree@...r.kernel.org>,
Linux Kernel List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v5 6/6] drm/tidss: Enable Dual and Duplicate Modes for
OLDI
On 28/09/2022 20:52, Aradhya Bhatia wrote:
> The AM625 DSS IP contains 2 OLDI TXes which can work to enable 2
> duplicated displays of smaller resolutions or enable a single Dual Link
> display with a higher resolution (1920x1200).
>
> Configure the necessary register to enable and disable the OLDI TXes
> with necessary modes configurations.
>
> Signed-off-by: Aradhya Bhatia <a-bhatia1@...com>
> ---
> drivers/gpu/drm/tidss/tidss_dispc.c | 28 ++++++++++++++++++++++++++--
> 1 file changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c
> index 68444e0cd8d7..fd7f49535f0c 100644
> --- a/drivers/gpu/drm/tidss/tidss_dispc.c
> +++ b/drivers/gpu/drm/tidss/tidss_dispc.c
> @@ -1003,8 +1003,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
> + * set statically to 0.
> */
While at it, maybe say "are always set to 0". At least to me that's much
more understandable.
>
> if (fmt->data_width == 24)
> @@ -1021,6 +1021,30 @@ static void dispc_enable_oldi(struct dispc_device *dispc, u32 hw_videoport,
>
> oldi_cfg |= BIT(0); /* ENABLE */
>
> + switch (dispc->oldi_mode) {
> + case OLDI_MODE_OFF:
> + oldi_cfg &= ~BIT(0); /* DISABLE */
Hmm, do we call this if OLDI_MODE_OFF? The current code always enabled
OLDI here, so I presume we call this only when we actually want to
enable it.
> + break;
> +
> + 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)) &&
Powered by blists - more mailing lists