Message ID | 20230218111712.2380225-1-treapking@chromium.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp326623wrn; Sat, 18 Feb 2023 03:18:27 -0800 (PST) X-Google-Smtp-Source: AK7set9tzWxIvcR0O2XnIjSktj6FxxERLLnrkNeNeT/dgEKyJPZfO1NvPDHE1sx0tRjVg9JNecWQ X-Received: by 2002:aa7:d6d0:0:b0:4ad:7056:23a5 with SMTP id x16-20020aa7d6d0000000b004ad705623a5mr6675483edr.14.1676719107216; Sat, 18 Feb 2023 03:18:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676719107; cv=none; d=google.com; s=arc-20160816; b=tlq9Feg73USCnJPJA4MVIZlWrB1gthwZt2RbaF9nItSZ1RuYw3hWMH59TjBO2X0Gmy NMK/WoKIVYFs8qr/pR+yvYb0YM6gvyiTq76+yNPTFAy2kdSsRv4+EcuXMzAIIpr1ulVF eBEgTQFpsuzGibSVXJ48lg/Zqvv2XiD5lrAL47tigcePK/0Oh1PhipZoIUN+x08V8AlT Kpty4qHVikhr2NqNEkaEPC3dvsIJXKawGaHZdcLOCL8X4BVum1EhNRZQwCb+DU/sEom0 gsrfnU/BecRifvsrprB22fZ0a3KjxMEBGEiIUBm/01SgA6WaUC0mHlU0HkGmKDRvoUlJ rFFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gEF8FEuNLVayQdE5QI9MaMd8Q/7gQJSqUO9M+81Oa5M=; b=tsxeyUkaEINUEc8DcSx8H9xXLVdgycSQo9JYsX8c86y5ERlifQrhHGfDS7NPwwRHb3 2uUdM5XaKX2VqlDz79onJOrhW8feVLZN8aCVPDctzYRIcSRBd9lWz+aIML9EbeSrBl4n jWTmQkLzqZPG7eU4o+rgkL4IFrV8K3eMI5eR9OmwJ2u+QOsogy0L7XRgGnB51BNtJ8Qx UiQsXeFXuCJCle8SmpP85/lwi9tTZusM8bZqnY9ATLGUxBgVaoP7AmcCjgbOBKgirwKx qf/BbqaFupVzklpHWi5RYo9Z/88dyw5UhXayqcUTTWM29cYQ+yhmFw2oQQfC8LjoP8WX kGrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IaruHdGy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a056402032a00b004ab0f51244csi8261753edw.622.2023.02.18.03.18.01; Sat, 18 Feb 2023 03:18:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IaruHdGy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229570AbjBRLRY (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Sat, 18 Feb 2023 06:17:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjBRLRX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 18 Feb 2023 06:17:23 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C4801C5AD for <linux-kernel@vger.kernel.org>; Sat, 18 Feb 2023 03:17:22 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id cp14so214945pfb.0 for <linux-kernel@vger.kernel.org>; Sat, 18 Feb 2023 03:17:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gEF8FEuNLVayQdE5QI9MaMd8Q/7gQJSqUO9M+81Oa5M=; b=IaruHdGy8cyFLDUGIOX5pZOCfDLvKQZpLOUwXva2yFbitViwuTKQidiLFpOtPWhzcu suiJ6uJgAz2TngEijk5zQdejLa23H2xeo9jIswDVjTdRDMV/LGUV9eYlX3+ou4kJqg+8 Pi9/8dmPnYdds+GD+VqOdlM6LCxjqZ45E1Hbo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gEF8FEuNLVayQdE5QI9MaMd8Q/7gQJSqUO9M+81Oa5M=; b=usmQ4tgWXKA+bdTY/07xzNgq+ZIlkNQwYeCqGQCPjW77yQVUCOGweRR2eSaJi2k8rM 7LVM0auZZUt3fjS+VwTZSwdobcW+ACHMcjuZSvROGYpk3lh49I/jVkgZvUEP7xwBL4eb CiT1O9RBcNLrybCfkKr1FetbBRF/HmH8pvlb7ixsVvlKhIpFTVxA7kkVfMSXdvDHlykD 8+pHAXVRdAO8UCq4Bm8fU2eCypQNjXBDaVqmWOZE3ys8+XDYxY615QvA0kmGmWUWFNle vxwAWit5BsrP3o0x6J+1WNgI4asjP0QJZ+q/i81odHZYXmN1wwv82lCDe6a7zhqIFIA4 x6nw== X-Gm-Message-State: AO0yUKWSDM7AyCt29FzC+cHOV8pQDCpdp5z5HXvm3nTx+V40OlUSsHm8 phQUW5tVvS42lUiGifYgy5OH1A== X-Received: by 2002:a62:1b48:0:b0:5ab:bf5d:a0d1 with SMTP id b69-20020a621b48000000b005abbf5da0d1mr2435384pfb.7.1676719041279; Sat, 18 Feb 2023 03:17:21 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:88dd:be84:8f65:fec2]) by smtp.gmail.com with ESMTPSA id 23-20020aa79157000000b005a8686b72fcsm4457829pfi.75.2023.02.18.03.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Feb 2023 03:17:20 -0800 (PST) From: Pin-yen Lin <treapking@chromium.org> To: Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Benson Leung <bleung@chromium.org> Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>, devicetree@vger.kernel.org, Nicolas Boichat <drinkcat@chromium.org>, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, Guenter Roeck <groeck@chromium.org>, Matthias Brugger <matthias.bgg@gmail.com>, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Philipp Zabel <p.zabel@pengutronix.de>, linux-arm-kernel@lists.infradead.org, Pin-yen Lin <treapking@chromium.org> Subject: [PATCH v3 0/5] Add generic-display-mux driver and bindings Date: Sat, 18 Feb 2023 19:17:07 +0800 Message-Id: <20230218111712.2380225-1-treapking@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758167414823002855?= X-GMAIL-MSGID: =?utf-8?q?1758167414823002855?= |
Series |
Add generic-display-mux driver and bindings
|
|
Message
Pin-yen Lin
Feb. 18, 2023, 11:17 a.m. UTC
This series is developed for and tested on MT8173 board, and the layout is: /-- anx7688 -- MT8173 HDMI bridge -- GPIO mux \-- native HDMI v2: https://lore.kernel.org/all/20230116110820.2615650-1-treapking@chromium.org/ v1: https://patchwork.kernel.org/project/dri-devel/cover/20191211061911.238393-1-hsinyi@chromium.org/ Changes in v3: - Removed ddc-i2c-bus in the gpio-mux bridge bindings - Added .get_edid callback in generic-gpio-mux driver - Removed .get_edid callback in mtk_hdmi.c - Modified anx7688 driver and binding to add a .get_edid callback Changes in v2: - Referenced existing dt-binding schemas from graph.yaml - Added ddc-i2c-bus into the bindings - Dropped attach/mode_set/enable/disable callbacks - Fixed style issues - Removed the special case for the HDMI connector - Made the driver only read the GPIO status in IRQ handler - Rebased to drm-misc-next - Update the license: "GPL v2" --> "GPL" Nicolas Boichat (2): dt-bindings: display: bridge: Add GPIO display mux binding drm: bridge: Generic GPIO mux driver Pin-yen Lin (3): dt-bindings: display: bridge: Add ddc-i2c-bus for anx7688 drm/bridge: Add .get_edid callback for anx7688 driver drm/mediatek: Remove .get_edid callback .../bridge/google,cros-ec-anx7688.yaml | 5 + .../bindings/display/bridge/gpio-mux.yaml | 90 +++++++ drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/cros-ec-anx7688.c | 24 ++ drivers/gpu/drm/bridge/generic-gpio-mux.c | 222 ++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_hdmi.c | 53 +---- 7 files changed, 365 insertions(+), 40 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/bridge/gpio-mux.yaml create mode 100644 drivers/gpu/drm/bridge/generic-gpio-mux.c
Comments
On Sat, Feb 18, 2023 at 4:47 PM Pin-yen Lin <treapking@chromium.org> wrote: > > This series is developed for and tested on MT8173 board, and the layout is: > > /-- anx7688 > -- MT8173 HDMI bridge -- GPIO mux > \-- native HDMI What is the part number of this GPIO mux? Does mux gpio interrupt based and able to switch output HDMI and DP. If so, how this gpio interrupt is different than the HPD in native HDMI? I mean does HPD have any detection bottlenecks with mux gpio interrupt? I do have GPIO Mux that input DSI and two outputs DMD/HDMI Input and HDMI Out. 2x1 with 1x2 mux. I'm thinking having a generic mux to select the specific out number of outputs with associated interface outputs can be a viable solution to address all use cases here. Thanks, Jagan.
On Thu, Mar 30, 2023 at 2:10 AM Jagan Teki <jagan@amarulasolutions.com> wrote: > > On Sat, Feb 18, 2023 at 4:47 PM Pin-yen Lin <treapking@chromium.org> wrote: > > > > This series is developed for and tested on MT8173 board, and the layout is: > > > > /-- anx7688 > > -- MT8173 HDMI bridge -- GPIO mux > > \-- native HDMI > > What is the part number of this GPIO mux? Does mux gpio interrupt > based and able to switch output HDMI and DP. If so, how this gpio > interrupt is different than the HPD in native HDMI? I mean does HPD > have any detection bottlenecks with mux gpio interrupt? It's a full blown HDMI 1:2 demultiplexer, so DDC and HPD signals are muxed as well. The anx7688 handles all the Type-C stuff, and our EC talks to it. If HDMI output from the SoC needs to be muxed over for DP alt-mode, the EC will signal the SoC. > I do have GPIO Mux that input DSI and two outputs DMD/HDMI Input and > HDMI Out. 2x1 with 1x2 mux. > > I'm thinking having a generic mux to select the specific out number of > outputs with associated interface outputs can be a viable solution to > address all use cases here. AFAIK DRM doesn't allow dynamically changing the constitution of a display pipeline, so it doesn't really work out for us. If you're just muxing between different outputs with passive/dumb bridges, it may still work for you. ChenYu