From patchwork Tue Dec 18 15:37:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10736857 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C8641399 for ; Wed, 19 Dec 2018 08:40:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CF2B2AE76 for ; Wed, 19 Dec 2018 08:40:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A78F2AEAF; Wed, 19 Dec 2018 08:40:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AFA742AD35 for ; Wed, 19 Dec 2018 08:40:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 53C116EE1F; Wed, 19 Dec 2018 08:40:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from shell.v3.sk (shell.v3.sk [90.176.6.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE2C06EC48 for ; Tue, 18 Dec 2018 15:38:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 4CDB3CA20C; Tue, 18 Dec 2018 16:38:13 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jcRBL908v-gA; Tue, 18 Dec 2018 16:37:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id C40CDCA2E1; Tue, 18 Dec 2018 16:37:47 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Q0Ko6YJ0fdV8; Tue, 18 Dec 2018 16:37:45 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 9AFFBCA2C9; Tue, 18 Dec 2018 16:37:45 +0100 (CET) From: Lubomir Rintel To: dri-devel@lists.freedesktop.org Subject: [RFC 00/16] Armada DRM support for OLPC XO-1.75 laptop Date: Tue, 18 Dec 2018 16:37:26 +0100 Message-Id: <20181218153742.1313125-1-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 19 Dec 2018 08:40:40 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , James Cameron Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, here are patches that make the Armada DRM work on an OLPC XO-1.75. They build on patches previously submitted by Russel King (included here for completeness as well). They certainly need some more love, but I'm not able to improve them until I get to understand some things first. I'm posting a couple of questions below in hope someone is kind enough to help me deal with my confusion. The display pipeline on the laptop looks like this: Armada LCDC ----------- | v Himax HX8837 "DCON" ------------------- RGB input from LCDC Controlled via I2C Backlight control Can slow down the panel refresh rate to save power Optional dithering for color mode, "swizzling" Has DRAM attached, can freeze a single frame in it Doc: http://wiki.laptop.org/images/0/09/DCON_datasheet_HX8837-A.pdf | v Innolux LS075AT011 Panel ------------------------ 7.5", 1200x900 No datasheet. http://wiki.laptop.org/go/Display Can opreate in two modes: R G B G B R ... or "e-book" daylight readable B R G reflexive B&W . : Here's what's not clear to me: 1.) Is the Himax chip an encoder here? 2.) What's the use of an encoder anyways? If a panel was connected directly do the RGB output from the LCDC, would we have to fake one? Is that the point of things like i.MX driver's drivers/gpu/drm/imx/parallel-display.c? 3.) My patch set currently contains the driver for the Himax that is modelled after tda998x. That one implements an encoder. Similar drivers seem to add a bridge too, but it's not entirely clear to me what a bridge is good for? 4.) How shall I expose the fancy functionality of the Himax to the userspace? Notably, the freeze frame. The OLPC laptops with the stock firmware like to suspend the SoC very aggressively to save power (in 20 seconds of inactivity or so). If the display is open (it can also be turned around for a tablet or e-book mode), it makes sense to freeze the picture and keep the panel on, if the laptop is closed, we want to turn it off. Should the behavior be exposed via sysfs (as it is with the current OLPC kernels), or a DRM property? Would it require libdrm support? Thanks, Lubo