diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2026-10-09 18:05:38 +0200 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-10-20 22:36:14 +0200 |
| commit | 2439733aa594c95fa7606d3d7d82ba1313ee03b7 (patch) | |
| tree | 382c64434c58a510e90b87e9446c7bfc201044e1 | |
| parent | a1d236fee3b8f86b5f45756e7911abc2842aef3d (diff) | |
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 <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>
| -rw-r--r-- | drivers/video/fbdev/platinumfb.c | 8 |
1 files changed, 5 insertions, 3 deletions
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! */ |
