Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp495821ybk; Fri, 15 May 2020 06:14:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2LCIUlKK4MiQV3AxdR6IJaNvpPXvWNuNW/oknWUHFtWvlMNNE9tzt/6TdQVcZWAVtQl4U X-Received: by 2002:a50:81e6:: with SMTP id 93mr2938654ede.45.1589548462000; Fri, 15 May 2020 06:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589548461; cv=none; d=google.com; s=arc-20160816; b=Q13Di5EW/bwP17tsputnQs7GDFV4rG+1p2jfB5N4bN/OCwy1Yxv5z0IRWq3JCJXo/j zuCoafQpPXzGQIzybGDkVzq8QDPQjtwt+2H5phUePLsnWtczF4GgmDmfIz3XMeUHwBx9 xOwT7Rvrv8OzulFyJQW8hilZvMrWRRt9HOVDokAh0enO4ac+/P7y9d+j0yH8E454ALNw Dg5qX28qBPp6xzvkFP8H02DjxJ/sXnFOo4bKDuOBDtQHGvPv87w0QixeZjhH6gBPWzj9 SCYw44bRyuYVWh0Umxe6SAm2tNKxaB7j2JOmy91JHNosY0b3Qftum66sOqCXV0DzinA+ D3KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=NL9bNHcIxtq5rLomL6x9ip2c8RZhRwPgf9oQ3F7Nq4M=; b=A2w9ofekCnNW1XQkYaFFqAr58NuQM5qe/lv4vukaxOJHrx9QTdQ4xTxylPnSsJUbPU lS4mwaJOD9FtUFQn3MajHxvFg/Ewo6vocJzHgmBqHwBiHpwfU5zIExdXdjkK73Xkf7Vv TCtg9lDpn6QsWW3aSfl/RK2kjSt9Lpi+93DHXRgjz7HYvtqG4vHt2yaQEO4HZ9e0eRmr xRjbLKlyyXaR7wTBKrl/paOVv919/V2stOnZx1+qWo7ziN4ubHrOA+LZeTN85mx+CM+l rn9RiydFRWxYKr72edGA6NEdB45X3iVIGI6is3ig3pSH3zKXFqBf8OADQ9yj6ppS8JsY yFLg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si1285299edc.413.2020.05.15.06.13.57; Fri, 15 May 2020 06:14:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbgEONM2 (ORCPT + 99 others); Fri, 15 May 2020 09:12:28 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:53422 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbgEONMX (ORCPT ); Fri, 15 May 2020 09:12:23 -0400 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=20G=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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 -- 2.26.1