From 2439733aa594c95fa7606d3d7d82ba1313ee03b7 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 9 Oct 2026 18:05:38 +0200 Subject: fbdev: platinumfb: Use FB blanking constants Fbdev and its drivers use FB_BLANK constants for controlling the display's blanking state. Semantics differ to similar VESA blanking constants. Replace the VESA constants with FB_BLANK in platinumfb. The VESA constants can be interpreted bitwise, while the FB_BLANK constants can not. Therefore turn the bit tests in an if-else sequence that handles the individual cases. By default, the display is unblanked. The modified code is within a comment block, so it will not run. I still changed it to keep the driver up to standard. This might also resolve the nearby TODO comment on incorrect hardware blanking. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller --- drivers/video/fbdev/platinumfb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/video/fbdev') diff --git a/drivers/video/fbdev/platinumfb.c b/drivers/video/fbdev/platinumfb.c index 81fdaa3541db..b55a7b70d31d 100644 --- a/drivers/video/fbdev/platinumfb.c +++ b/drivers/video/fbdev/platinumfb.c @@ -167,10 +167,12 @@ static int platinumfb_blank(int blank, struct fb_info *fb) ctrl = le32_to_cpup(&info->platinum_regs->ctrl.r) | 0x33; if (blank) --blank_mode; - if (blank & VESA_VSYNC_SUSPEND) - ctrl &= ~3; - if (blank & VESA_HSYNC_SUSPEND) + if (blank == FB_BLANK_VSYNC_SUSPEND) + ctrl &= ~0x03; + else if (blank == FB_BLANK_HSYNC_SUSPEND) ctrl &= ~0x30; + else if (blank == FB_BLANK_POWERDOWN) + ctrl &= ~0x33; out_le32(&info->platinum_regs->ctrl.r, ctrl); */ /* TODO: Figure out how the heck to powerdown this thing! */ -- cgit v1.2.3