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, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
Chhabilal Dangal <yogeshdangal66@gmail.com>
Subject: [PATCH] staging: sm750fb: Add suspend checks to copyarea and imageblit
Date: Thu, 14 May 2026 16:34:24 +0545 [thread overview]
Message-ID: <20260514104924.60296-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().
This patch was developed with AI assistance and is 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 10:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 10:49 Chhabilal Dangal [this message]
2026-05-14 11:44 ` [PATCH] staging: sm750fb: Add suspend checks to copyarea and imageblit Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2026-05-14 12:01 Chhabilal Dangal
2026-05-14 12:18 ` Dan Carpenter
2026-05-14 12:41 ` Greg Kroah-Hartman
2026-05-14 10:30 Chhabilal Dangal
2026-05-14 10:44 ` 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=20260514104924.60296-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-kernel@vger.kernel.org \
--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 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.