From: Chhabilal Dangal <yogeshdangal66@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
devel@driverdev.osuosl.org,
Chhabilal Dangal <yogeshdangal66@gmail.com>
Subject: [PATCH] staging: sm750fb: Add suspend checks to copyarea and imageblit
Date: Thu, 14 May 2026 17:46:02 +0545 [thread overview]
Message-ID: <20260514120102.71615-1-yogeshdangal66@gmail.com> (raw)
lynxfb_ops_fillrect() already checks info->state before accessing
the hardware 2D engine, but lynxfb_ops_copyarea() and
lynxfb_ops_imageblit() do not.
The suspend path calls fb_set_suspend(), which sets the framebuffer
state to FBINFO_STATE_SUSPENDED. Add matching state checks in the
remaining accelerated callbacks for consistency with fillrect().
Assisted-by: Claude Opus 4.6 (Anthropic LLM)
Compile-tested only.
Signed-off-by: Chhabilal Dangal <yogeshdangal66@gmail.com>
---
drivers/staging/sm750fb/sm750.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 9f3e3d37e..025ac8fe3 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -204,6 +204,9 @@ static void lynxfb_ops_copyarea(struct fb_info *info,
struct sm750_dev *sm750_dev;
unsigned int base, pitch, bpp;
+ if (info->state != FBINFO_STATE_RUNNING)
+ return;
+
par = info->par;
sm750_dev = par->dev;
@@ -239,6 +242,9 @@ static void lynxfb_ops_imageblit(struct fb_info *info,
struct lynxfb_par *par;
struct sm750_dev *sm750_dev;
+ if (info->state != FBINFO_STATE_RUNNING)
+ return;
+
par = info->par;
sm750_dev = par->dev;
/*
--
2.54.0
next reply other threads:[~2026-05-14 12:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 12:01 Chhabilal Dangal [this message]
2026-05-14 12:18 ` [PATCH] staging: sm750fb: Add suspend checks to copyarea and imageblit Dan Carpenter
2026-05-14 12:41 ` Greg Kroah-Hartman
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=20260514120102.71615-1-yogeshdangal66@gmail.com \
--to=yogeshdangal66@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=sudip.mukherjee@codethink.co.uk \
/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