From patchwork Fri May 15 13:12:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_G=C3=BCnther?= X-Patchwork-Id: 11551505 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8C8B1391 for ; Fri, 15 May 2020 13:13:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C875B20709 for ; Fri, 15 May 2020 13:13:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xm5E8d78" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C875B20709 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=93tjuKu/Xr9Qu//5Qfxn45eU4XRBSEIugmXg2zbP7cI=; b=Xm5E8d78yrCVic cG34rW0HROYs6CPt/svq0tyAZ92oFt0JjSZHbhd/mEcPeCOiHte0kPbDyq0wt6kg8nTg45AX3tPhu KYrhhQU1aF/OFObab4KUFJfcBeeEsZRtsw2mhEW4O1R+2bxDtos2cm/KA+J1fbt+DseIVeXk/3eir GgtO1Kf6/qhwL7EwoR8cH+zzWFfbBhM1KUpFK3LJYz7JaaztWG59qOCYCp3tRH1o1aFeZZzvYs9bQ 8bEIHKhHRcZQoxext6uM1vqMTq+/xwnvGuPIdKgbqwN2FSjFcsR1UjCCnlsnIXqNrxQojUV7oLqdp U587yl5I+qlcVb5jleew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa9U-0001KG-LL; Fri, 15 May 2020 13:13:24 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jZa8Y-0000JE-7q for linux-arm-kernel@lists.infradead.org; Fri, 15 May 2020 13:12:29 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 52D22FB09; Fri, 15 May 2020 15:12:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MkNYiLtyIAdX; Fri, 15 May 2020 15:12:16 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 5C6A9445A7; Fri, 15 May 2020 15:12:15 +0200 (CEST) From: =?utf-8?q?Guido_G=C3=BCnther?= To: Laurent Pinchart , David Airlie , Daniel Vetter , Rob Herring , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrzej Hajda , Sam Ravnborg , Anson Huang , Leonard Crestez , Lucas Stach , Peng Fan , Robert Chiras , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 0/6] drm/bridge: Add mux input selection bridge Date: Fri, 15 May 2020 15:12:09 +0200 Message-Id: X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200515_061226_513460_1F70BD0D X-CRM114-Status: GOOD ( 10.67 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This bridge driver allows to select the input to a downstream bridge (or panel) via device tree. It can be useful to separate the pixel source selection from the actual bridge processing the pixel data. E.g. NXP's imx8mq has two display controllers. Both can feed the pixel data to the NWL DSI IP core. The input selection is done via a separate mux register elsewhere on the chip, so separating this out avoids SoC specific code in such drivers. The current implementation allows to select the input source via device tree. The long term goal is to allow to switch the input source at run time. This can be useful to e.g. use the less power hungry display controller for normal operation but switch to a the other display controller when running full screen games (since it can detile textures more efficiently). This was initially suggested by Laurent Pinchart¹. It is similar in spirit to the video-mux in the media subsystem but for DRM bridges. Besides the actual driver this series includes the necessary bits to demo the usage for the Librem5 devkit. The series is based on linux-next as of next-20200512. ¹ https://lore.kernel.org/dri-devel/20200415021908.GH19819@pendragon.ideasonboard.com/ Guido Günther (6): dt-bindings: display/bridge: Add binding for input mux bridge drm/bridge: Add mux-input bridge dt-bindings: display/bridge/nwl-dsi: Drop mux handling drm/bridge/nwl-dsi: Drop mux handling arm64: dts: imx8mq: Add NWL dsi controller arm64: dts: imx8mq-librem5-devkit: Enable MIPI DSI panel .../display/bridge/mux-input-bridge.yaml | 123 +++++++++ .../bindings/display/bridge/nwl-dsi.yaml | 6 - .../dts/freescale/imx8mq-librem5-devkit.dts | 81 ++++++ arch/arm64/boot/dts/freescale/imx8mq.dtsi | 31 +++ drivers/gpu/drm/bridge/Kconfig | 10 +- drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/mux-input.c | 238 ++++++++++++++++++ drivers/gpu/drm/bridge/nwl-dsi.c | 61 ----- 8 files changed, 483 insertions(+), 68 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/bridge/mux-input-bridge.yaml create mode 100644 drivers/gpu/drm/bridge/mux-input.c