From: Finn Thain <fthain@telegraphics.com.au>
To: linux-fbdev@vger.kernel.org
Subject: Re: [RFC] video/macfb: Wire up inverse option
Date: Mon, 18 Feb 2019 22:37:29 +0000 [thread overview]
Message-ID: <alpine.LNX.2.21.1902190905020.14@nippy.intranet> (raw)
In-Reply-To: <CAMuHMdWVERvgpC0uTSg9A70b3k6p=zD5BQY=Est6Tb-18x3EGA@mail.gmail.com>
On Mon, 18 Feb 2019, Geert Uytterhoeven wrote:
> >
> > I did some more investigation. When I tested macfb in qemu, I found
> > that dafb_setpalette() is actually being called.
> >
> > And with this patch to add the missing call to fb_invert_cmaps(), the
> > dafb_setpalette() parameters change accordingly. So I'll submit this
> > patch again with signed-off-by.
> >
> > (The problem remains that dafb_setpalette() doesn't seem to have the
> > desired effect on the hardware, but that's a separate issue.)
>
> Could it be the hardware CLUT pointer is out of sync? Given lastreg is
> initialized to -1, if the first write is to regno 0, the code will
> assume the CLUT pointer is pointing to the right register.
>
> Initializing lastreg to e.g. -2 would fix that.
>
Well, Stan found that the 'inverse' option didn't work on his LC III,
which involves v8_brazil_setpalette() and not dafb_setpalette(). The bug
you found only affects the latter function. I will send a patch for the
bug though it doesn't seem to help on qemu (quadra 800). On qemu I was
able to get 'inverse' to work by switching to 2 bpp. So there seems to be
some other driver issue at work here that I'll have to look into.
> > On some powerbooks with greyscale LCD panels, the the black background
> > is actually white, due to the backlight, and the white text is opaque
> > black. This may or may not be optimal, depending on conditions etc. so
> > I prefer not to remove macfb's 'inverse' option.
>
> You can always use a higher layer to configure that, e.g. "setterm
> --inversescreen on". Won't help for the initial kernel log, though.
>
> Originally (before git history), the inverse parameter also affected
> display.inverse. While this field still exists (see fbcon.h), there is
> no code left that uses it.
>
> The last user was removed in full-history-linux commit 25e5e3c795bcf408
> ("[PATCH] fbdev: support for bold attribute for monochrome
> framebuffers").
>
> Probably reviving that, and getting rid of the fb_invert_cmaps() calls,
> is the best solution, as display.inverse does not affect other frame
> buffers.
>
Maybe. It seems like an enhancement, or at best a theoretical bug. Can I
leave that one in your hands?
--
> Gr{oetje,eeting}s,
>
> Geert
>
>
prev parent reply other threads:[~2019-02-18 22:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 7:50 [RFC] video/macfb: Wire up inverse option Geert Uytterhoeven
2019-02-17 23:18 ` Finn Thain
2019-02-18 7:39 ` Geert Uytterhoeven
2019-02-18 22:37 ` Finn Thain [this message]
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=alpine.LNX.2.21.1902190905020.14@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=linux-fbdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).