linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Devarsh Thakkar <devarsht@ti.com>,
	linux-kernel@vger.kernel.org, jyri.sarha@iki.fi,
	tomba@kernel.org, airlied@linux.ie, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org
Cc: nm@ti.com, a-bhatia1@ti.com, r-ravikumar@ti.com,
	nikhil.nd@ti.com, linux-arm-kernel@lists.infradead.org,
	vigneshr@ti.com, laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH] drm/tidss: Soft Reset DISPC on startup
Date: Tue, 12 Apr 2022 17:24:58 +0300	[thread overview]
Message-ID: <86a07099-1074-e8d1-6d0e-1ce68414b627@ideasonboard.com> (raw)
In-Reply-To: <20220314113739.18000-1-devarsht@ti.com>

Hi,

On 14/03/2022 13:37, Devarsh Thakkar wrote:
> Soft reset the display subsystem controller on startup and wait for
> the reset to complete. This helps the scenario where display was
> already in use by some other core before the linux was booted.

The reason the omapdrm doesn't do a reset is that the PM features on 
some of the DSS registers were set and controlled outside dss driver, so 
the dss driver could not do a reset just like that. That design was 
carried to the tidss driver, although I'm not sure if the reason is 
valid on AM6 and J7 platforms.

If that reasoning is not valid, this patch is ok and:

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

  Tomi

> Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
> ---
>   drivers/gpu/drm/tidss/tidss_dispc.c | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c
> index 60b92df615aa..dae47853b728 100644
> --- a/drivers/gpu/drm/tidss/tidss_dispc.c
> +++ b/drivers/gpu/drm/tidss/tidss_dispc.c
> @@ -2650,6 +2650,20 @@ static void dispc_init_errata(struct dispc_device *dispc)
>   	}
>   }
>   
> +static void dispc_softreset(struct dispc_device *dispc)
> +{
> +	u32 val;
> +	int ret = 0;
> +
> +	/* Soft reset */
> +	REG_FLD_MOD(dispc, DSS_SYSCONFIG, 1, 1, 1);
> +	/* Wait for reset to complete */
> +	ret = readl_poll_timeout(dispc->base_common + DSS_SYSSTATUS,
> +				 val, val & 1, 100, 5000);
> +	if (ret)
> +		dev_warn(dispc->dev, "failed to reset dispc\n");
> +}
> +
>   int dispc_init(struct tidss_device *tidss)
>   {
>   	struct device *dev = tidss->dev;
> @@ -2709,6 +2723,10 @@ int dispc_init(struct tidss_device *tidss)
>   			return r;
>   	}
>   
> +	/* K2G display controller does not support soft reset */
> +	if (feat->subrev != DISPC_K2G)
> +		dispc_softreset(dispc);
> +
>   	for (i = 0; i < dispc->feat->num_vps; i++) {
>   		u32 gamma_size = dispc->feat->vp_feat.color.gamma_size;
>   		u32 *gamma_table;


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-04-12 14:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 11:37 [PATCH] drm/tidss: Soft Reset DISPC on startup Devarsh Thakkar
2022-04-12  9:10 ` Devarsh Thakkar
2022-04-12 14:24 ` Tomi Valkeinen [this message]
2022-04-12 21:20   ` Nishanth Menon
2022-04-13  5:32     ` Tony Lindgren
2022-04-19 12:19 ` 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=86a07099-1074-e8d1-6d0e-1ce68414b627@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=a-bhatia1@ti.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devarsht@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jyri.sarha@iki.fi \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikhil.nd@ti.com \
    --cc=nm@ti.com \
    --cc=r-ravikumar@ti.com \
    --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;
as well as URLs for NNTP newsgroup(s).