All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Devarsh Thakkar" <devarsht@ti.com>
Cc: robh@kernel.org, conor+dt@kernel.org,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 10/14] drm/solomon: ssd16xx: Expose session management as plane properties
Date: Sun, 27 Sep 2026 18:38:48 +0000	[thread overview]
Message-ID: <20260927183848.D3E8A1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260927182329.4193961-11-devarsht@ti.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] drm/solomon: stale plane properties used in CRTC hooks due to sync ordering
- [Medium] drm/solomon: unprotected concurrent access to global device properties
--

commit 16a8f4fa23daecbcef4ac45581fba368964d7807
Author: Devarsh Thakkar <devarsht@ti.com>

drm/solomon: ssd16xx: Expose session management as plane properties

This commit adds DRM plane properties for session management flags,
allowing userspace to control automatic display clear/refresh behavior
at lifecycle transitions.

> diff --git a/drivers/gpu/drm/solomon/ssd16xx.c b/drivers/gpu/drm/solomon/ssd16xx.c
> index 3815af0cee5c5..6331f367d8649 100644
> --- a/drivers/gpu/drm/solomon/ssd16xx.c
> +++ b/drivers/gpu/drm/solomon/ssd16xx.c
[ ... ]
> @@ -1588,6 +1670,10 @@ static void ssd16xx_plane_atomic_update(struct drm_plane *plane,
>  
>  	device->refresh_mode = new_ssd->refresh_mode;
>  	device->color_mode = new_ssd->color_mode;
> +	device->clear_on_init = new_ssd->clear_on_init;
> +	device->clear_on_close = new_ssd->clear_on_close;
> +	device->clear_on_disable = new_ssd->clear_on_disable;
> +	device->refresh_mode_init = new_ssd->refresh_mode_init;

[Severity: Medium]
Since ssd16xx_plane_atomic_update() returns early if there is no framebuffer:

static void ssd16xx_plane_atomic_update(...)
{
        ...
        if (!fb)
                return;

Will these device property assignments be skipped entirely when the plane
is being disabled?

Additionally, doesn't drm_atomic_helper_commit_tail_rpm() call the CRTC
enable and disable hooks before the plane update? If a user submits an
atomic commit that updates clear_on_disable and disables the CRTC at
the same time, won't ssd16xx_crtc_atomic_disable() read the stale global
device property before this plane update has a chance to synchronize the
new atomic state?

[Severity: Medium]
Is it safe to write to global device properties like device->clear_on_close
here? This code executes under DRM modeset locks, but if another client
closes its DRM file descriptor, wouldn't ssd16xx_drm_master_drop() read
these same properties under drm_device->master_mutex?

Since they don't share locks, could this lead to a data race where the
master drop path reads torn or stale values while an atomic commit is
processing?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260927182329.4193961-1-devarsht@ti.com?part=10

  reply	other threads:[~2026-09-27 18:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-27 18:23 [PATCH v2 00/14] Add DRM driver for Solomon SSD16xx e-paper display controllers Devarsh Thakkar
2026-09-27 18:23 ` [PATCH v2 01/14] dt-bindings: vendor-prefixes: Add Dalian Good Display Co., Ltd Devarsh Thakkar
2026-09-27 18:23 ` [PATCH v2 02/14] dt-bindings: display: Add Solomon SSD16xx e-paper controller binding Devarsh Thakkar
2026-09-27 18:37   ` sashiko-bot
2026-10-01  6:28   ` Krzysztof Kozlowski
2026-10-05 16:36     ` Devarsh Thakkar
2026-09-27 18:23 ` [PATCH v2 03/14] dt-bindings: display: solomon,ssd16xx: Add Solomon SSD1677 controller Devarsh Thakkar
2026-09-27 18:23   ` [PATCH v2 03/14] dt-bindings: display: solomon, ssd16xx: " Devarsh Thakkar
2026-09-27 18:35   ` [PATCH v2 03/14] dt-bindings: display: solomon,ssd16xx: " sashiko-bot
2026-10-01  6:26   ` Krzysztof Kozlowski
2026-09-27 18:23 ` [PATCH v2 04/14] drm/solomon: Add DRM driver for Solomon SSD16xx e-paper display controllers Devarsh Thakkar
2026-09-27 18:42   ` sashiko-bot
2026-09-28  7:00   ` Thomas Zimmermann
2026-09-29 16:43     ` Devarsh Thakkar
2026-09-27 18:23 ` [PATCH v2 05/14] drm/solomon: ssd16xx: Add clear_on_init/close/disable session management Devarsh Thakkar
2026-09-27 18:38   ` sashiko-bot
2026-09-27 18:23 ` [PATCH v2 06/14] drm/solomon: ssd16xx: Add support for Solomon SSD1677 controller Devarsh Thakkar
2026-09-27 18:40   ` sashiko-bot
2026-09-27 18:23 ` [PATCH v2 07/14] drm/solomon: ssd16xx: Add power management support Devarsh Thakkar
2026-09-27 18:41   ` sashiko-bot
2026-09-27 18:23 ` [PATCH v2 08/14] drm/solomon: ssd16xx: Expose refresh mode as plane property Devarsh Thakkar
2026-09-27 18:43   ` sashiko-bot
2026-09-27 18:23 ` [PATCH v2 09/14] drm/solomon: ssd16xx: Expose color " Devarsh Thakkar
2026-09-27 18:43   ` sashiko-bot
2026-09-27 18:23 ` [PATCH v2 10/14] drm/solomon: ssd16xx: Expose session management as plane properties Devarsh Thakkar
2026-09-27 18:38   ` sashiko-bot [this message]
2026-09-27 18:23 ` [PATCH v2 11/14] drm/solomon: ssd16xx: support panels whose RAM X order is reversed Devarsh Thakkar
2026-09-27 18:23 ` [PATCH v2 12/14] MAINTAINERS: Add entry for Solomon SSD16xx DRM driver Devarsh Thakkar
2026-09-27 18:23 ` [PATCH v2 13/14] arm64: defconfig: Enable DRM_SSD16XX for AM62L3 EVM Devarsh Thakkar
2026-09-27 18:23 ` [DO_NOT_MERGE PATCH v2 14/14] arm64: dts: ti: Add AM62L3 EVM overlay for GDEY042T81 e-paper display Devarsh Thakkar
2026-09-27 18:40   ` sashiko-bot
2026-10-02  8:56 ` [PATCH v2 00/14] Add DRM driver for Solomon SSD16xx e-paper display controllers LiangCheng Wang

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=20260927183848.D3E8A1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devarsht@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.