From: sashiko-bot@kernel.org
To: "Yashas D" <y-d@ti.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/tidss: Fix synclost issue while disabling layer due to erratum i2097
Date: Wed, 01 Jul 2026 06:51:44 +0000 [thread overview]
Message-ID: <20260701065145.0D4751F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260701063337.2165966-1-y-d@ti.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The workaround for erratum i2097 incorrectly moves disabled layers to (-1, -1) on-screen instead of a non-visible off-screen area, causing a visual glitch.
--
commit 80e2da1fc464e6c124d0362e7f424161a94f05ab
Author: Yashas D <y-d@ti.com>
drm/tidss: Fix synclost issue while disabling layer due to erratum i2097
A gap beyond a frame duration for disabling the layer in overlay manager
and go bit setting on the corresponding video port may lead to SYNC_LOST.
Fix by moving the layer to the non-visible area and deferring the ENABLE=0
write, immediately before the GO bit, guaranteeing both occur within the
same frame window.
Link: https://www.ti.com/lit/pdf/sprz530 # i2097
> diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c
> index 58d5eb033bdbb..02a3cf50e0ceb 100644
> --- a/drivers/gpu/drm/tidss/tidss_dispc.c
> +++ b/drivers/gpu/drm/tidss/tidss_dispc.c
> @@ -38,6 +38,8 @@
> #include "tidss_dispc_regs.h"
> #include "tidss_scale_coefs.h"
>
> +#define OVR_LAYER_MAX_POS(mask) FIELD_MAX(mask)
> +
> static const u16 tidss_k2g_common_regs[DISPC_COMMON_REG_TABLE_LEN] = {
> [DSS_REVISION_OFF] = 0x00,
[ ... ]
> @@ -1503,6 +1565,53 @@ void dispc_ovr_enable_layer(struct dispc_device *dispc,
> if (dispc->feat->subrev == DISPC_K2G)
> return;
>
> + if (dispc->errata.i2097 && !enable) {
> + /*
> + * WA for erratum i2097:
> + *
> + * Do not write ENABLE=0 directly. Instead move the layer to
> + * the non-visible area so it contributes no pixels.
> + *
> + * Position register layout differs per SoC:
> + * J721E : DISPC_OVR_ATTRIBUTES2, X[13:0], Y[29:16] (14-bit)
> + * Others: DISPC_OVR_ATTRIBUTES, X[17:6], Y[30:19] (12-bit)
> + */
> + switch (dispc->feat->subrev) {
> + case DISPC_J721E:
> + OVR_REG_FLD_MOD(dispc, hw_videoport,
> + DISPC_OVR_ATTRIBUTES2(layer),
> + OVR_LAYER_MAX_POS(DISPC_OVR_ATTRIBUTES2_POSX_MASK),
> + DISPC_OVR_ATTRIBUTES2_POSX_MASK);
> + OVR_REG_FLD_MOD(dispc, hw_videoport,
> + DISPC_OVR_ATTRIBUTES2(layer),
> + OVR_LAYER_MAX_POS(DISPC_OVR_ATTRIBUTES2_POSY_MASK),
> + DISPC_OVR_ATTRIBUTES2_POSY_MASK);
> + break;
> + default:
> + OVR_REG_FLD_MOD(dispc, hw_videoport,
> + DISPC_OVR_ATTRIBUTES(layer),
> + OVR_LAYER_MAX_POS(DISPC_OVR_ATTRIBUTES_POSX_MASK),
> + DISPC_OVR_ATTRIBUTES_POSX_MASK);
[Severity: Medium]
Will this move the disabled layer to position (-1, -1) rather than a
non-visible off-screen area?
If the hardware interprets the POSX and POSY register bitfields as signed
integers (two's complement), setting the coordinates using OVR_LAYER_MAX_POS
which evaluates to FIELD_MAX(mask) (an all-ones bit pattern) will result
in -1.
This could cause a visual glitch where the disabled layer flashes at the
top-left corner of the screen instead of being hidden.
Does OVR_LAYER_MAX_POS in dispc_ovr_enable_layer() need to avoid setting the
sign bit to properly move the layer off-screen during normal KMS operations?
> + OVR_REG_FLD_MOD(dispc, hw_videoport,
> + DISPC_OVR_ATTRIBUTES(layer),
> + OVR_LAYER_MAX_POS(DISPC_OVR_ATTRIBUTES_POSY_MASK),
> + DISPC_OVR_ATTRIBUTES_POSY_MASK);
> + break;
> + }
> +
> + dispc->pending_disable_layers[hw_videoport] |= BIT(layer);
> + return;
> + }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260701063337.2165966-1-y-d@ti.com?part=1
prev parent reply other threads:[~2026-07-01 6:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 6:33 [PATCH v2] drm/tidss: Fix synclost issue while disabling layer due to erratum i2097 Yashas D
2026-07-01 6:51 ` sashiko-bot [this message]
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=20260701065145.0D4751F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=y-d@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.