From: Elkin Cruz <elkin@google.com>
To: Iker Pedrosa <ikerpedrosam@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, irogers@google.com,
Elkin Cruz <elkin@google.com>,
stable@vger.kernel.org
Subject: [PATCH 2/3] drm/sitronix: st7920: Check drm_dev_enter() in crtc atomic disable
Date: Wed, 25 Nov 2026 22:25:12 +0000 [thread overview]
Message-ID: <20261125222513.1446099-3-elkin@google.com> (raw)
In-Reply-To: <20261125222513.1446099-1-elkin@google.com>
st7920_crtc_atomic_disable() ignores the return value of
drm_dev_enter(), allowing SPI power-off writes to proceed after the DRM
device has been unplugged and unconditionally calling drm_dev_exit().
Return early when drm_dev_enter() returns false.
Fixes: 88b09229f34a ("drm: Add driver for Sitronix ST7920 LCD displays")
Cc: stable@vger.kernel.org
Signed-off-by: Elkin Cruz <elkin@google.com>
---
drivers/gpu/drm/sitronix/st7920.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sitronix/st7920.c b/drivers/gpu/drm/sitronix/st7920.c
index 091e80d8bda5..ea4566009c4b 100644
--- a/drivers/gpu/drm/sitronix/st7920.c
+++ b/drivers/gpu/drm/sitronix/st7920.c
@@ -580,7 +580,8 @@ static void st7920_crtc_atomic_disable(struct drm_crtc *crtc,
struct st7920_device *st7920 = drm_to_st7920(drm);
int idx;
- drm_dev_enter(drm, &idx);
+ if (!drm_dev_enter(drm, &idx))
+ return;
st7920_power_off(st7920, &err);
--
2.56.1.839.g22a8290db9-goog
next prev parent reply other threads:[~2026-11-25 22:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261125222513.1446099-1-elkin@google.com>
2026-11-25 22:25 ` [PATCH 1/3] drm/sitronix: st7920: Use DMA-safe serialized TX buffer for SPI writes Elkin Cruz
2026-11-25 22:25 ` Elkin Cruz [this message]
2026-11-25 22:25 ` [PATCH 3/3] drm/sitronix: st7920: Pass u8 row address when setting GDRAM address Elkin Cruz
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=20261125222513.1446099-3-elkin@google.com \
--to=elkin@google.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ikerpedrosam@gmail.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=tzimmermann@suse.de \
/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