Skip to contentSkip to conversation

staging: sm750fb: Add suspend checks to copyarea and imageblit

PATCH In review Chhabilal Dangal 2 participants 2 messages May 14

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: sm750fb: Add suspend checks to copyarea and imageblit

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.

---
 drivers/staging/sm750fb/sm750.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/staging/sm750fb/sm750.c +6 -0
index 9f3e3d37e..025ac8fe3 100644
@@ -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;
 	/*
Signature · 1 line
2.54.0
#1 lore raw
Quoted 9 lines · 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().

This patch was developed with AI assistance and is compile-tested only.

Please read the documentation for how to properly document LLM assistance.

also, you aren't sending this to the right lists :(

thanks,

greg k-h