[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231101142206.GV12764@pendragon.ideasonboard.com>
Date: Wed, 1 Nov 2023 16:22:06 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Cc: Aradhya Bhatia <a-bhatia1@...com>,
Devarsh Thakkar <devarsht@...com>,
Jyri Sarha <jyri.sarha@....fi>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/10] drm/tidss: Check for K2G in in dispc_softreset()
Hi Tomi,
Thank you for the patch.
On Wed, Nov 01, 2023 at 11:17:43AM +0200, Tomi Valkeinen wrote:
> K2G doesn't have softreset feature. Instead of having every caller of
> dispc_softreset() check for K2G, move the check into dispc_softreset(),
> and make dispc_softreset() return 0 in case of K2G.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> ---
> drivers/gpu/drm/tidss/tidss_dispc.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c
> index cdbb88289082..f204a0701e9f 100644
> --- a/drivers/gpu/drm/tidss/tidss_dispc.c
> +++ b/drivers/gpu/drm/tidss/tidss_dispc.c
> @@ -2707,6 +2707,10 @@ static int dispc_softreset(struct dispc_device *dispc)
> u32 val;
> int ret;
>
> + /* K2G display controller does not support soft reset */
> + if (dispc->feat->subrev == DISPC_K2G)
> + return 0;
> +
> /* Soft reset */
> REG_FLD_MOD(dispc, DSS_SYSCONFIG, 1, 1, 1);
> /* Wait for reset to complete */
> @@ -2831,12 +2835,9 @@ int dispc_init(struct tidss_device *tidss)
>
> tidss->dispc = dispc;
>
> - /* K2G display controller does not support soft reset */
> - if (feat->subrev != DISPC_K2G) {
> - r = dispc_softreset(dispc);
> - if (r)
> - return r;
> - }
> + r = dispc_softreset(dispc);
> + if (r)
> + return r;
>
> return 0;
> }
>
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists