From patchwork Thu May 20 06:50:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12269201 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 C7DB0C43462 for ; Thu, 20 May 2021 06:50:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 1903E61184 for ; Thu, 20 May 2021 06:50:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1903E61184 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F8AC6EEAD; Thu, 20 May 2021 06:50:56 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id E85F96EEAE for ; Thu, 20 May 2021 06:50:54 +0000 (UTC) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 98C1FD31; Thu, 20 May 2021 08:50:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1621493452; bh=v3Vu6quVKrr1NnYuMwDm2STCc4CKzv9XPpREFWKebSs=; h=From:To:Cc:Subject:Date:From; b=cvjSm5wfQudgmwFSJRE1+molF48g9H2Jm6WKAlHKqUY6AbIi/8G3JFXTetIBrTZHR lxNk/fI9/m6JsXy7wSThexHZNK5dvzZIOxgNGoXPHjDG2JILuVIukqT1RvBYHvpUkM NFem5hZCst77F2S7qo5WmDQRvU1Yip39/X3/6yH8= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 0/4] Converter R-Car DU to the DRM bridge connector helper Date: Thu, 20 May 2021 09:50:42 +0300 Message-Id: <20210520065046.28978-1-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.28.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-renesas-soc@vger.kernel.org, Kieran Bingham Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 included the remaining patches and has bitrotten. v3 rebased the code and should be ready for merge. Patch 1/4 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 2/4 then 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. Patch 3/4 specifies the port number in the R-Car dw-hdmi glue layer, as required by 1/4. Patch 4/4 finally makes use of the drm_bridge_connector_init() helper. The series has been tested on the Renesas R-Car Salvator-XS and Draak boards with the VGA, HDMI and LVDS outputs. Laurent Pinchart (4): drm: bridge: dw-hdmi: Attach to next bridge if available drm: rcar-du: lvds: Convert to DRM panel bridge helper 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 | 26 ++++- 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, 89 insertions(+), 114 deletions(-) Tested-by: Kieran Bingham (on V3U)