Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: sm750fb: Add suspend checks to copyarea and imageblit
@ 2026-05-14 12:01 Chhabilal Dangal
  2026-05-14 12:18 ` Dan Carpenter
  2026-05-14 12:41 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Chhabilal Dangal @ 2026-05-14 12:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sudip Mukherjee
  Cc: linux-fbdev, linux-staging, devel, Chhabilal Dangal

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-14 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 12:01 [PATCH] staging: sm750fb: Add suspend checks to copyarea and imageblit Chhabilal Dangal
2026-05-14 12:18 ` Dan Carpenter
2026-05-14 12:41 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox