mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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>
This commit is contained in:
parent
a1d236fee3
commit
2439733aa5
|
|
@ -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! */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user