From: Thomas Zimmermann <tzimmermann@suse.de>
To: deller@gmx.de, adaplas@gmail.com, michal.simek@amd.com
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
sashiko-reviews@lists.linux.dev,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 4/5] fbdev/platinumfb: Use FB blanking constants
Date: Fri, 9 Oct 2026 18:05:38 +0200 [thread overview]
Message-ID: <20261009161814.120480-5-tzimmermann@suse.de> (raw)
In-Reply-To: <20261009161814.120480-1-tzimmermann@suse.de>
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>
---
drivers/video/fbdev/platinumfb.c | 8 +++++---
1 file 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! */
--
2.55.0
next prev parent reply other threads:[~2026-10-09 16:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 16:05 [PATCH 0/5] fbdev: Remove use of VESA constants Thomas Zimmermann
2026-10-09 16:05 ` [PATCH 1/5] fbdev/au1100fb: Use FB blanking constants Thomas Zimmermann
2026-10-09 16:05 ` [PATCH 2/5] fbdev/i810fb: " Thomas Zimmermann
2026-10-09 16:05 ` [PATCH 3/5] fbdev/sa1100fb: Remove comment on VESA DPMS modes Thomas Zimmermann
2026-10-09 16:05 ` Thomas Zimmermann [this message]
2026-10-09 16:05 ` [PATCH 5/5] fbdev/xilinxfb: Use FB blanking constants Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261009161814.120480-5-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=adaplas@gmail.com \
--cc=deller@gmx.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®