From patchwork Wed Dec 16 00:50:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11976085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A39CDC4361B for ; Wed, 16 Dec 2020 00:51:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C9BA22DD6 for ; Wed, 16 Dec 2020 00:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726228AbgLPAvN (ORCPT ); Tue, 15 Dec 2020 19:51:13 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:37112 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725877AbgLPAvM (ORCPT ); Tue, 15 Dec 2020 19:51:12 -0500 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8E88F593; Wed, 16 Dec 2020 01:50:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1608079830; bh=DShNNaqRJ/Gem++GOaQKiJ8Fhc6x6Uj4MSeUcvc1jOc=; h=From:To:Cc:Subject:Date:From; b=XWzbGF69OHcg5GbxiMLBcckhRnx43OdJu3vIT4YP+fRbIOCtRh9IX9k3kDH6Opt0J EB8skEMaYFJ6rZ0oQiNnvaVLNtQ2N5wcXAxiCql/aOwsVk0/vPmSfCaWcbGylkE6w/ HyuL/E0n6wFAg7Zaa3Rzu0JWmEZfCPFt0gJvCu1U= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org, Kieran Bingham Subject: [PATCH v2 0/4] Converter R-Car DU to the DRM bridge connector helper Date: Wed, 16 Dec 2020 02:50:17 +0200 Message-Id: <20201216005021.19518-1-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hello, This patch series converts the R-Car DU driver to use the DRM bridge connector helper drm_bridge_connector_init(). The bulk of the v1 series was converting the adv7511, simple-bridge and dw-hdmi drivers to make connector creation optional (through the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag), and have already been merged. v2 includes the remaining patches. Patch 1/4 addresses the rcar-lvds driver. Instead of implementing direct support for DRM_BRIDGE_ATTACH_NO_CONNECTOR, it simply removes code that shouldn't have been in the driver in the first place by switching to the panel bridge helper. Patches 2/4 then adds support to the dw-hdmi driver to attach to a downstream bridge if one is specified in DT. As the DT port number corresponding to the video output differs between platforms that integrate the dw-hdmi (some of them even don't have a video output port, which should probably be fixed, but that's out of scope for this series), the port number has to be specified by the platform glue layer. Patch 3/4 does so for the R-Car dw-hdmi driver. Patch 4/4 finally makes use of the drm_bridge_connector_init() helper. The series depends on "[PATCH 27/27] drm: Add default modes for connectors in unknown state" ([1]) to avoid a breakage on the VGA output on R-Car Gen3 platforms. That patch has already been approved, and I'll get it merged as a prerequisite. The series has been tested on the Renesas R-Car Salvator-XS and Draak boards with the VGA, HDMI and LVDS outputs. [1] https://lore.kernel.org/dri-devel/20200526011505.31884-28-laurent.pinchart+renesas@ideasonboard.com/ Laurent Pinchart (4): drm: rcar-du: lvds: Convert to DRM panel bridge helper drm: bridge: dw-hdmi: Attach to next bridge if available drm: rcar-du: dw-hdmi: Set output port number drm: rcar-du: Use drm_bridge_connector_init() helper drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 54 +++++++++- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 25 ++++- drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c | 1 + drivers/gpu/drm/rcar-du/rcar_lvds.c | 120 +++------------------- include/drm/bridge/dw_hdmi.h | 2 + 5 files changed, 88 insertions(+), 114 deletions(-)