Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp102558pxb; Mon, 16 Aug 2021 00:38:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyybV3hEe6ELLKAJ+I0SBcoosAGVeESr1CSsApw6SNeebJYeUUh/UaKgh9DVW9KBUDxFiCr X-Received: by 2002:a17:906:5909:: with SMTP id h9mr14568081ejq.329.1629099504105; Mon, 16 Aug 2021 00:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629099504; cv=none; d=google.com; s=arc-20160816; b=m/V9w0HaVttsvnQ9t2W6z6l4NK4oKZwCUyu3+1GQp8X51c/UhhNcMOJeFNRz5WZBw2 9mDrU0F8q+juhxGDmoxgwhovHbriajfH3195YCPOCvn6c1+HLqNoDdkSmGvym894JGKC 3Y74AepOFTe/CZpsv8Nd0eSJi4SNgzETIzXwaGci06CqCcSDZ2LG8DqNi6OMh8QA1V1b TPpwBZH4UraqP6i5eHMZQ2GzWxUvBGxVMQlQzBDd9LaMVjwvxzs2F96pyBlnaPyj3MqR Wyp1vqDB9ZHepmFP4vUiDrISvt44rO6SC8kTwZwMJXbEUMVAaAOlygAsnR+UGzO6dK5B z+KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BJqUUGR8PyhIxyfZ2ESBZDcQCK4GlHo0+G4IlKPa0Q0=; b=daCo4Ac6ES/6XLbLbFtXIJ1Ls9qXDz9LQY17rG5/AUxevAHuIbzpbJy9wn4Sg4Dvt7 Gayq55qH175ZLw59nvo9tfWkz39oDAL9oeELefPbCAkLIfrW4Q+wZzA2A3JGOk+QCgrf OEvIwVZcwwcl8aR4Fr6FmKNzDY9sEscOW8Wm+G9dVtPq/I1YZHzr3IKkQ8T0m15Vukch pzzY2QwPiV1VZCOOiCntC6wY7IG/1YdpSaMLPFiCs5ekPx9+XkgZ9xOARKNCOBo0CtKe i8YW4ThqX5S4U8mgIsTmrHVV//acJoUgc5yasDvqvv2Ll0Ln2xUVoDCgGot/f8ioVemw 7djg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pLhTlHI0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si9216833ejh.638.2021.08.16.00.38.00; Mon, 16 Aug 2021 00:38:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pLhTlHI0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234060AbhHPHfQ (ORCPT + 99 others); Mon, 16 Aug 2021 03:35:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233725AbhHPHfP (ORCPT ); Mon, 16 Aug 2021 03:35:15 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60FC7C061764 for ; Mon, 16 Aug 2021 00:34:44 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id v16so6813486ilo.10 for ; Mon, 16 Aug 2021 00:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BJqUUGR8PyhIxyfZ2ESBZDcQCK4GlHo0+G4IlKPa0Q0=; b=pLhTlHI0SK1Ea/9O09yzxNiVzQ755/a4Z46UFwbsIfOMupjIB3e83WVSNZgvJaBKxO gn7rpz3pMH01V8YCqyeeKIopnyVHicwAnI29uyuf21pr+BmZdGq+vUG+fIU7T+lqSQLE MZ9itD7Ti8C747CRAblCJO2xTlH5B0G+ISGpGrJ1iesdVkJTucwqWhyByokIJ+83zWX7 t++q8nlYH02yVRLZuTuwH1dd9RcKwYfZ0iV00CEw2WDdYLyZ/AZy6hX55u2BcHVZOPyM iH2P0OaDmFvRA7AYyhKIJ9ON7SAUXUFNDL+GmdA3odwAyKK8OF8HMS3bl/4tBtUPyHk3 /GFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BJqUUGR8PyhIxyfZ2ESBZDcQCK4GlHo0+G4IlKPa0Q0=; b=TQ5LBCWoGDAZrOyVqCPIoHGEQ1d3uBhg62JNhm510N7egnydW/8uoFjxf5skM0dLQg W9EEGQ+scw+y2EdeMWY1C2Vilp8RgnKhxbP13kg5Aq9KE7KIfDP1EDKXJ/Nkyd1aVCfo 4y9++OuE4h0Je1yFDg7zS7LsTkpZlO428+K4uNcRov6z5Llpi15M4UtKjfUjb3DRVIW9 fmdAwpopCWwQdC1E3P4GHjYQLZ1N7gyQTwP05J42s7b3mRM3EV4fTqLfe5olwKZ29vAi b2ynFB3F87Bc5P/td3BRKeVHm+Dm87yDMDnzOuIoqrfRMBqfnt/LMwkG51sqj6bIqnHm cBQg== X-Gm-Message-State: AOAM532JXJEak1JRIw+yqnswX96GM17HrirxkFPzeN6Y5fVFpZmP7e/c 9sU6bmcq2bAuKg2Cf6O/SXpyTZjDM4Qf6BuOl8s= X-Received: by 2002:a92:6802:: with SMTP id d2mr2072161ilc.40.1629099283783; Mon, 16 Aug 2021 00:34:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alistair Francis Date: Mon, 16 Aug 2021 17:34:17 +1000 Message-ID: Subject: Re: Revert "video: fbdev: mxsfb: Remove driver" To: Marek Vasut Cc: Fabio Estevam , Shawn Guo , Sascha Hauer , dl-linux-imx , b.zolnierkie@samsung.com, Linux Kernel Mailing List , Alistair Francis , Sam Ravnborg Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: https://remarkable.com/store/remarkable-2 > > 2: https://goodereader.com/blog/e-paper/e-ink-waveforms-are-a-closely-guarded-secret > > 3: https://remarkablewiki.com/tech/rm2_framebuffer > > 4: https://source.codeaurora.org/external/imx/linux-imx/log/drivers/video/fbdev/mxsfb.c?h=lf-5.10.35-2.0.0 > > +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. 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 (https://github.com/timower/rM2-stuff#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. Alistair