LKML Archive on
help / color / mirror / Atom feed
From: Marek Vasut <>
To: Alistair Francis <>
Cc: Fabio Estevam <>,
	Shawn Guo <>,
	Sascha Hauer <>,
	dl-linux-imx <>,,
	Linux Kernel Mailing List <>,
	Alistair Francis <>,
	Sam Ravnborg <>
Subject: Re: Revert "video: fbdev: mxsfb: Remove driver"
Date: Mon, 16 Aug 2021 09:55:16 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 8/16/21 9:34 AM, Alistair Francis wrote:
> On Sun, Aug 15, 2021 at 10:31 PM Marek Vasut <> wrote:
>> On 8/15/21 2:16 PM, Alistair Francis wrote:
>>> Hello,
>>> Commit f225f1393f034 "video: fbdev: mxsfb: Remove driver" removed the
>>> mxsfb fbdev driver.
>>> I am now working on getting mainline Linux running on the reMarkable 2
>>> eInk reader [1]. Unfortunately the rM2 doesn't use the standard EPD
>>> controller on the i.MX SoC, but instead uses the LCD controller.
>>> eInk panels are complex to control and require writing temperature
>>> dependent waveforms. As these waveforms are proprietary [2] the rM
>>> team runs closed source software called SWTCON in userspace to control
>>> the panel [3].
>>> This closed source software expects the fbdev mxsfb driver and it
>>> doesn't work with the DRM mxsfb driver (at least not that I can get it
>>> to).
>>> The NXP fork of Linux also re-adds the fbdev driver [4], so they also
>>> see some uses for it.
>>> I was wondering if the community would be open to re-adding the fbdev
>>> mxsfb driver to mainline? It could be re-added with a different
>>> dt-binding so that it is not used by default and only enabled for
>>> boards when required (like for the rM2).
>>> 1:
>>> 2:
>>> 3:
>>> 4:
>> +CC Sam.
>> What sort of special thing does your proprietary userspace do that
>> cannot be added to the DRM driver or the fbdev emulation (if needed) ?
> It's hard to tell. When using the DRM driver I get cryptic errors
> about the frame buffer not being available.

Do you have fbdev emulation enabled ? Does /dev/fbX exist ?

What sort of messages do you get and from where ?

You could run strace on the application to see how it communicates with 
the old driver via the ioctl interface and compare it with the fbdev 
emulation on the new driver, maybe there is some odd ioctl which is not 

There is also NXP 5.10.35 fork, so you could try picking the fbdev 
driver from there and add printks/trace_printks/etc. into both that and 
the fbdev emulation code, to see whether how either is called and what 
is failing/missing in the emulation.

> It's difficult to know
> what is going on as I don't have access to any of the source. I
> suspect the userspace code could be updated to use the DRM driver, but
> we would need the reMarkable devs to do that.
> There is some effort to re-implement the proprietary user space swtcon
> (, but it seems to have
> stalled. It wouldn't be impossible to get swtcon to work with the DRM
> driver, but it would require a very large amount of reverse
> engineering, that probably will never happen.
> I wanted to see what the thoughts were on re-adding the fbdev mxsfb
> driver. The commit message just says that because there is a DRM
> driver we no longer need the fbdev one, but here is a case for the
> fbdev driver. I was thinking that continuing to support the fbdev
> mxsfb driver wouldn't be too much of a maintenance burden (but that's
> obviously up to you). The NXP tree also seems to think the fbdev
> driver is worth keeping around.

I don't think the NXP tree is a particularly good example of best 
practice, they don't use the mxsfb in the first place, they wrote their 
own DRM driver for the LCDIF IP, and they also keep the fbdev driver 
around, so yes, they have three drivers for the same IP in different 
state of decay and with different problems, instead of one driver that 
has all the functionality and fixes. Sigh ...

I cannot decide on the fbdev thing, that's I think up to Sam. However, 
my suggestion would be to find out what is missing in the fbdev 
emulation and possibly fill that in, so we will have only one driver to 
support all the functionality.

  reply	other threads:[~2021-08-16  7:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15 12:16 Revert "video: fbdev: mxsfb: Remove driver" Alistair Francis
2021-08-15 12:31 ` Marek Vasut
2021-08-16  7:34   ` Alistair Francis
2021-08-16  7:55     ` Marek Vasut [this message]
2021-08-17  9:08       ` Alistair Francis
2021-08-17 10:03         ` Marek Vasut
2021-08-17 12:16           ` Alistair Francis
     [not found]             ` <YR1R7/>
2021-08-19  8:16               ` Alistair Francis
     [not found]             ` <YR1Th65KKRS4D/>
2021-08-19  9:10               ` Alistair Francis
     [not found]                 ` <>
2021-08-19 22:36                   ` Alistair Francis
2021-10-14  9:56                     ` Alistair Francis
2021-10-21 10:42                       ` Alistair Francis

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

* 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).