All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org, conor+dt@kernel.org,
	robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 08/10] drm/tidss: oldi: Fix OLDI signal polarities
Date: Thu, 03 Sep 2026 12:21:45 +0000	[thread overview]
Message-ID: <20260903122145.B60691F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260903-tidss-pre-beagley-v1-8-93928baa8b12@ideasonboard.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Modifying driver-private state in atomic check callback violates atomic modesetting semantics.
--

commit 3406ad4360f9e6a4eda4b2203c1f6400e5e7ab77
Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

drm/tidss: oldi: Fix OLDI signal polarities

This commit fixes OLDI signal polarities by removing drm_bridge_timings
and properly setting input_bus_cfg.flags in tidss_oldi_atomic_check(),
as well as setting OLDI_DEPOL based on the DE bus flag.

> diff --git a/drivers/gpu/drm/tidss/tidss_oldi.c b/drivers/gpu/drm/tidss/tidss_oldi.c
> index 5eb749f495d59..624f1646fb07a 100644
> --- a/drivers/gpu/drm/tidss/tidss_oldi.c
> +++ b/drivers/gpu/drm/tidss/tidss_oldi.c

[ ... ]

> @@ -329,7 +352,8 @@ tidss_oldi_mode_valid(struct drm_bridge *bridge,
>  }
>  
>  static const struct drm_bridge_funcs tidss_oldi_bridge_funcs = {
> -	.attach	= tidss_oldi_bridge_attach,
> +	.attach = tidss_oldi_bridge_attach,
> +	.atomic_check = tidss_oldi_atomic_check,
>  	.atomic_pre_enable = tidss_oldi_atomic_pre_enable,
>  	.atomic_post_disable = tidss_oldi_atomic_post_disable,
>  	.atomic_get_input_bus_fmts = tidss_oldi_atomic_get_input_bus_fmts,

[Severity: High]
This isn't a bug introduced by this patch, but does the implementation of
tidss_oldi_atomic_get_input_bus_fmts() violate atomic modesetting
semantics by modifying driver-private state during the check phase?

In drivers/gpu/drm/tidss/tidss_oldi.c:tidss_oldi_atomic_get_input_bus_fmts():

        input_fmts[0] = oldi_bus_formats[i].input_bus_fmt;
        oldi->bus_format = &oldi_bus_formats[i];

A TEST_ONLY atomic commit or concurrent commits can alter the global
driver-private state (oldi->bus_format). This could cause a subsequent
real commit to program the hardware with an incorrect bus format, leading
to display corruption.

Should this configuration decision be stored in the drm_bridge_state object
instead of the driver-private tidss_oldi structure?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260903-tidss-pre-beagley-v1-0-93928baa8b12@ideasonboard.com?part=8

  reply	other threads:[~2026-09-03 12:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 12:09 [PATCH 00/10] drm/tidss: Preparation for AM62P and BeagleY-AI display support Tomi Valkeinen
2026-09-03 12:09 ` [PATCH 01/10] dt-bindings: display: ti: Move ti,am62l-dss binding to a new binding file Tomi Valkeinen
2026-09-03 12:09 ` [PATCH 02/10] dt-bindings: display: ti,am65x-dss: Simplify binding Tomi Valkeinen
2026-09-03 12:09 ` [PATCH 03/10] dt-bindings: display: ti,am625-oldi: Add optional power-domain for OLDI Tomi Valkeinen
2026-09-03 12:09 ` [PATCH 04/10] drm/tidss: Remove extra pm_runtime_mark_last_busy Tomi Valkeinen
2026-09-03 12:09 ` [PATCH 05/10] drm/tidss: oldi: Remove define for unused register OLDI_LB_CTRL Tomi Valkeinen
2026-09-03 12:09 ` [PATCH 06/10] drm/tidss: Add mechanism to detect DPI output Tomi Valkeinen
2026-09-28 11:57   ` Swamil Jain
2026-09-03 12:09 ` [PATCH 07/10] drm/tidss: Add support for DPIENABLE bit Tomi Valkeinen
2026-09-03 12:09 ` [PATCH 08/10] drm/tidss: oldi: Fix OLDI signal polarities Tomi Valkeinen
2026-09-03 12:21   ` sashiko-bot [this message]
2026-09-03 12:09 ` [PATCH 09/10] drm/tidss: Drop WARN_ON() from tidss_runtime_put() Tomi Valkeinen
2026-09-03 12:23   ` sashiko-bot
2026-09-28 11:58   ` Swamil Jain
2026-09-03 12:10 ` [PATCH 10/10] drm/tidss: oldi: Fix missing of_node_put()s in error paths Tomi Valkeinen
2026-09-28 12:00   ` Swamil Jain
2026-09-28 11:08 ` [PATCH 00/10] drm/tidss: Preparation for AM62P and BeagleY-AI display support Swamil Jain

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=20260903122145.B60691F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tomi.valkeinen@ideasonboard.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.