From patchwork Mon Aug 7 14:35:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 711297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8CBBC41513 for ; Mon, 7 Aug 2023 14:35:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234079AbjHGOfj (ORCPT ); Mon, 7 Aug 2023 10:35:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234063AbjHGOfi (ORCPT ); Mon, 7 Aug 2023 10:35:38 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE80E10E3; Mon, 7 Aug 2023 07:35:33 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-986d8332f50so628616266b.0; Mon, 07 Aug 2023 07:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691418932; x=1692023732; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ha6FI2rVxbfPVkhF/ZknZxX9q1C2VljgFJVBNarUleo=; b=Z3LvtDp4zP8VkyIlt0D/cF+eA5Bl9AT+QeI/m/ZZteXaPqeHZFq0OkV1glWPgDsZTE mjtb3bmoqbygcexNngQqiuZVRC5yB4ROtd1tR2wSG/LTTu4fXIPoWRg3kbgm5iM51vpq YhE/MRsCR6K0SuxNjZFpL2drPflHGDKj5nSQlrZ3l/gMZhz67K2269tP9iyyDUucnXdw vLBepkg/M8xt9khLcbtZ3EUU3y+tQKmkEkZjF+KwyCsvEcf86WqQi2gxunTVoxubERHu SJU7ihM+Km2unWvvOvexi/JrkPk2sZYku4rVz7SFtef61GQrt5OBJknVQc99bcLSiJWe KEeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691418932; x=1692023732; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ha6FI2rVxbfPVkhF/ZknZxX9q1C2VljgFJVBNarUleo=; b=S4XzbSf4blG2zuqC6o///+Vbe3l9otYHdbV0ORpQ9AG/k4fDpP9uswfebP1/s4U0hJ j9GY42RNd2N0i3ScEuLrLLxiKF98zVF+zSj+KSasfqFLhowK545OYqiLVskA3iRqwIiJ vxd4XvxJWO9xJjI9+eaWVepRIIK3KuDqAnpMxAhp2tdipBgfIp+yCSvjmexxsuPCYEP3 2G55zHw2W112yBvnsW1wOXMo9kWdy9hAllcrbRg3Zx1MIbohgFkKg9YK7vY+JXBPXhAd M8gQBKG+w3ECjHjDkbFXr+J9OXjBHarY5c48c/jo/DZ/eJ9N29xrFd+ozythhSykpSnf mX+Q== X-Gm-Message-State: AOJu0YzyK8xbYSktT1HHWCbS7osRu8015WttmDAXAOHw8G/LU1ilZ4Wj /sPW9139bOkTRGc7I4gP0ek= X-Google-Smtp-Source: AGHT+IGZtGya0s5IHu2LCfaHpasZEmG+74SNEfbKrRDRkKBBWkQxhuFnQequ3Lj0qk7pzQtKV3Up7Q== X-Received: by 2002:a17:906:3295:b0:992:a85d:278b with SMTP id 21-20020a170906329500b00992a85d278bmr7524417ejw.59.1691418932420; Mon, 07 Aug 2023 07:35:32 -0700 (PDT) Received: from xeon.. ([188.163.112.48]) by smtp.gmail.com with ESMTPSA id e3-20020a170906504300b0099329b3ab67sm5323292ejk.71.2023.08.07.07.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 07:35:32 -0700 (PDT) From: Svyatoslav Ryhel To: David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Mikko Perttunen , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/5] ARM: dts: tegra: Drop unit-address from parallel RGB output port Date: Mon, 7 Aug 2023 17:35:11 +0300 Message-Id: <20230807143515.7882-2-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230807143515.7882-1-clamor95@gmail.com> References: <20230807143515.7882-1-clamor95@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Maxim Schwalm Fix the following W=1 build warning: "Warning (unit_address_vs_reg): /host1x@50000000/dc@54200000/rgb/port@0: node has a unit name, but no reg or ranges property" Signed-off-by: Maxim Schwalm Signed-off-by: Svyatoslav Ryhel --- arch/arm/boot/dts/nvidia/tegra20-acer-a500-picasso.dts | 2 +- arch/arm/boot/dts/nvidia/tegra20-asus-tf101.dts | 2 +- arch/arm/boot/dts/nvidia/tegra30-asus-lvds-display.dtsi | 2 +- arch/arm/boot/dts/nvidia/tegra30-asus-tf700t.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/nvidia/tegra20-acer-a500-picasso.dts b/arch/arm/boot/dts/nvidia/tegra20-acer-a500-picasso.dts index 486fd244291e..a619ea83ed3b 100644 --- a/arch/arm/boot/dts/nvidia/tegra20-acer-a500-picasso.dts +++ b/arch/arm/boot/dts/nvidia/tegra20-acer-a500-picasso.dts @@ -65,7 +65,7 @@ dc@54200000 { rgb { status = "okay"; - port@0 { + port { lcd_output: endpoint { remote-endpoint = <&lvds_encoder_input>; bus-width = <18>; diff --git a/arch/arm/boot/dts/nvidia/tegra20-asus-tf101.dts b/arch/arm/boot/dts/nvidia/tegra20-asus-tf101.dts index a3757b7daeda..e118809dc6d9 100644 --- a/arch/arm/boot/dts/nvidia/tegra20-asus-tf101.dts +++ b/arch/arm/boot/dts/nvidia/tegra20-asus-tf101.dts @@ -66,7 +66,7 @@ dc@54200000 { rgb { status = "okay"; - port@0 { + port { lcd_output: endpoint { remote-endpoint = <&lvds_encoder_input>; bus-width = <18>; diff --git a/arch/arm/boot/dts/nvidia/tegra30-asus-lvds-display.dtsi b/arch/arm/boot/dts/nvidia/tegra30-asus-lvds-display.dtsi index bae09d82594d..680edff0f26f 100644 --- a/arch/arm/boot/dts/nvidia/tegra30-asus-lvds-display.dtsi +++ b/arch/arm/boot/dts/nvidia/tegra30-asus-lvds-display.dtsi @@ -10,7 +10,7 @@ lcd: dc@54200000 { rgb { status = "okay"; - port@0 { + port { dpi_output: endpoint { remote-endpoint = <&bridge_input>; bus-width = <24>; diff --git a/arch/arm/boot/dts/nvidia/tegra30-asus-tf700t.dts b/arch/arm/boot/dts/nvidia/tegra30-asus-tf700t.dts index efde7dad718a..9c480fde2e76 100644 --- a/arch/arm/boot/dts/nvidia/tegra30-asus-tf700t.dts +++ b/arch/arm/boot/dts/nvidia/tegra30-asus-tf700t.dts @@ -15,7 +15,7 @@ lcd: dc@54200000 { rgb { status = "okay"; - port@0 { + port { dpi_output: endpoint { remote-endpoint = <&bridge_input>; bus-width = <24>; From patchwork Mon Aug 7 14:35:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 711295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA196C001B0 for ; Mon, 7 Aug 2023 14:35:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234326AbjHGOfn (ORCPT ); Mon, 7 Aug 2023 10:35:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234092AbjHGOfj (ORCPT ); Mon, 7 Aug 2023 10:35:39 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FBD310DC; Mon, 7 Aug 2023 07:35:35 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-986d8332f50so628620466b.0; Mon, 07 Aug 2023 07:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691418934; x=1692023734; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/ZvPUmeI/1EMGUSu/xpT/NIbYPZbxTYJRvOXwkEg1y4=; b=nx3VdgiKuT2WAB9KWAoKXJPbURnaLo0c7g2k8OCRZ8JX+DDucBlkvE79w7wqREmoAv 5m7FMByQLnWy4CKH1Dv4uJlEb3ClC3MUvCJCJzVOELztu8Bwb8UvEnYwfynQk/JUNYSx +MS/6zWN36ApBG3RZEbKdTwu3whwBIpZDKUFQpIUwgJBVeslLFD0WUa2KIR4gjIZl0AR 31Tjy5cxqNBWmZjIo90FvvCkObwmUMp2i/HPzTAGn9i021AaopRAcOp1bHgvGI7+UelC FTRsHz8dxGIa9J04nv8A/KMFn9WutCosf0k7vXOoVhhYkk8k4Kd+RcEaQUl3NQ63Oe8z EwyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691418934; x=1692023734; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/ZvPUmeI/1EMGUSu/xpT/NIbYPZbxTYJRvOXwkEg1y4=; b=EKb8WFtT3EhYXvtgAQ4cPG2sh6KjF+5T7lqNSsDTxVlNpH66qV1XJbzy8j8w7eB2Yd Xq6kif49UGJVSiZQx5P090j/oIR+lQK0SH1m4sNIDeeI/xCCXNJHAD4xFHo0YC50RMZb VwIU+xtpSOWYCqL4FZ4jK8dDq0IB3L+RSW88KuPiGrk9Z7B7Oa/iSMR8pkzkl8xFGaDA OqhlSwUckPkcg0xW8UgpKGv1ejJXMxKlmUo0q2rPht7ezidzHq0Pqc8j9LS17+3/ULlY UMWiy/Cp1U5dtES8QWAJmOQhTEDAePYsoSTN2g96RSDvfGBKGAA6q/7cPfSmSO5z3q5M +7lQ== X-Gm-Message-State: AOJu0YxHxJcXa7oACUedlQbAgH0Op523ckHVlepmNLEhVloKW0MBsabg 01YucjW6iew2ed+6INx5hHg= X-Google-Smtp-Source: AGHT+IFieJ8bZzt1TPzOApOQ7/Q2X9S0DhUWYiPxMLc7XZT0uMY2JEoLmpSSXlAl5GIQWxhXlFs4wA== X-Received: by 2002:a17:907:b09:b0:99c:5707:f458 with SMTP id h9-20020a1709070b0900b0099c5707f458mr6661271ejl.72.1691418933549; Mon, 07 Aug 2023 07:35:33 -0700 (PDT) Received: from xeon.. ([188.163.112.48]) by smtp.gmail.com with ESMTPSA id e3-20020a170906504300b0099329b3ab67sm5323292ejk.71.2023.08.07.07.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 07:35:33 -0700 (PDT) From: Svyatoslav Ryhel To: David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Mikko Perttunen , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/5] dt-bindings: display: tegra: nvidia,tegra20-dc: Add parallel RGB output port node Date: Mon, 7 Aug 2023 17:35:12 +0300 Message-Id: <20230807143515.7882-3-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230807143515.7882-1-clamor95@gmail.com> References: <20230807143515.7882-1-clamor95@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Maxim Schwalm Either this node, which is optional, or the nvidia,panel property can be present. Signed-off-by: Maxim Schwalm Signed-off-by: Svyatoslav Ryhel --- .../display/tegra/nvidia,tegra20-dc.yaml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-dc.yaml b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-dc.yaml index 69be95afd562..102304703062 100644 --- a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-dc.yaml +++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-dc.yaml @@ -127,6 +127,37 @@ allOf: $ref: /schemas/types.yaml#/definitions/phandle description: phandle of a display panel + port: + $ref: /schemas/graph.yaml#/$defs/port-base + description: Parallel RGB output port + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + unevaluatedProperties: false + + anyOf: + - if: + not: + properties: + nvidia,panel: false + then: + not: + properties: + port: true + - if: + not: + properties: + port: false + then: + not: + properties: + nvidia,panel: true + + additionalProperties: false + - if: properties: compatible: From patchwork Mon Aug 7 14:35:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Svyatoslav Ryhel X-Patchwork-Id: 711296 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B30AC04FE0 for ; Mon, 7 Aug 2023 14:35:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234156AbjHGOfl (ORCPT ); Mon, 7 Aug 2023 10:35:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234096AbjHGOfk (ORCPT ); Mon, 7 Aug 2023 10:35:40 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7544010F3; Mon, 7 Aug 2023 07:35:37 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-977e0fbd742so631679266b.2; Mon, 07 Aug 2023 07:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691418936; x=1692023736; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QTMdpVu9zcROFMVsz6T+C+h5mIKmLtZWdHwxQBCPR5I=; b=KUaH/j2FWhExXriqrgGp81CVqFpEVbCRXw9lnyy+yw1JSm5hZeS+F54n636UGRJVCN 2zvlFL2tEiwc2qS/7d/rxTLwAw8kBI2y3yCFhNukIRH8uM5t+SRwbTsnFD54N7NG8RGH KpntJwT+9KcreOlQCoNTb61JEIX7VdcgaBpqoVG56+JyoVO5Kp4G/Qy4xm2VH2XrO+El JY09CQ7/yM6L4rNf0QGu4GDeE3CFatQO47ZhwNYoG/trkEiEb5LPe/VfprY0p+xvhndY Htc5Ow23M+m/40pBS2hnFNshKoPImXIe6rwxM9c7WLvX8hgP5Y+UBFCL58InhqIPniYM F5QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691418936; x=1692023736; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QTMdpVu9zcROFMVsz6T+C+h5mIKmLtZWdHwxQBCPR5I=; b=Pzu/ueSefg0qhTIDuiVGXAEuQXx2dSOyU0niaZHgElzwJZ7VmeYO+blXdAREgJpVPn /O2AMsIPcETSHPeK3bvusJLouckdwAkVUkm0kGmeyZ5AjkMmcfGvOcd5eVHYOVvGOCGi EBNmsJmgkDoM8Zz9woDMpn4IJA7uXw5e0QfNIF8tA8mJtypG4teFxlKtwPEk08/O159K O2Gxgs/t+UaSlwnne3/+gbR9f2IMMVRGTflXf1JV0Bvf9bUglmsNhKxfK9WKUogZsl0h jsiIs7qFZhPl2DOkQkqt9AoMGQs4qUOpU5SrBqGsgwjQF4LLnp/Ufk9qd8Wacai5Z3zB 2xoQ== X-Gm-Message-State: AOJu0Yx3VBjvamtptyoU4zaKjnWzcj1PkFzu+6iKuhNHRdlIInMJzITA UKYp/d9Jzg3fNFnJN8XMSksSS3CkerrL7A== X-Google-Smtp-Source: AGHT+IGQ1lqLcjO4Et6eFn4qj6/uvvM6vC3EoXEaBwbhdywyvi3G+qSDQy3V4lA/QsqxymJGrvt1JA== X-Received: by 2002:a17:906:32c6:b0:997:870d:e8fa with SMTP id k6-20020a17090632c600b00997870de8famr7811483ejk.1.1691418935876; Mon, 07 Aug 2023 07:35:35 -0700 (PDT) Received: from xeon.. ([188.163.112.48]) by smtp.gmail.com with ESMTPSA id e3-20020a170906504300b0099329b3ab67sm5323292ejk.71.2023.08.07.07.35.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 07:35:35 -0700 (PDT) From: Svyatoslav Ryhel To: David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Mikko Perttunen , Svyatoslav Ryhel , Maxim Schwalm , Dmitry Osipenko Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/5] drm/tegra: output: hdmi: Support bridge/connector Date: Mon, 7 Aug 2023 17:35:14 +0300 Message-Id: <20230807143515.7882-5-clamor95@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230807143515.7882-1-clamor95@gmail.com> References: <20230807143515.7882-1-clamor95@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Maxim Schwalm Some Tegra device-trees may specify a video output graph, which involves MHL bridge/simple bridge and/or connector framework. This patch adds support for the bridge/connector attached to the HDMI output, allowing us to model the hardware properly. Inspired by: 29efdc2 ("drm/tegra: output: rgb: Support LVDS encoder bridge") Tested-by: Andreas Westman Dorcsak # ASUS TF T30 Tested-by: Maxim Schwalm # ASUS P1801-T T30 Tested-by: Robert Eckelmann # ASUS TF101 T20 Tested-by: Svyatoslav Ryhel # ASUS TF201 T30 Signed-off-by: Maxim Schwalm Signed-off-by: Svyatoslav Ryhel --- drivers/gpu/drm/tegra/hdmi.c | 44 +++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 6eac54ae1205..a5b12b169e57 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -1544,26 +1545,47 @@ static int tegra_hdmi_init(struct host1x_client *client) { struct tegra_hdmi *hdmi = host1x_client_to_hdmi(client); struct drm_device *drm = dev_get_drvdata(client->host); + struct drm_connector *connector; int err; hdmi->output.dev = client->dev; - drm_connector_init_with_ddc(drm, &hdmi->output.connector, - &tegra_hdmi_connector_funcs, - DRM_MODE_CONNECTOR_HDMIA, - hdmi->output.ddc); - drm_connector_helper_add(&hdmi->output.connector, - &tegra_hdmi_connector_helper_funcs); - hdmi->output.connector.dpms = DRM_MODE_DPMS_OFF; - drm_simple_encoder_init(drm, &hdmi->output.encoder, DRM_MODE_ENCODER_TMDS); drm_encoder_helper_add(&hdmi->output.encoder, &tegra_hdmi_encoder_helper_funcs); - drm_connector_attach_encoder(&hdmi->output.connector, - &hdmi->output.encoder); - drm_connector_register(&hdmi->output.connector); + if (hdmi->output.bridge) { + err = drm_bridge_attach(&hdmi->output.encoder, hdmi->output.bridge, + NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR); + if (err) { + dev_err(client->dev, "failed to attach bridge: %d\n", + err); + return err; + } + + connector = drm_bridge_connector_init(drm, &hdmi->output.encoder); + if (IS_ERR(connector)) { + dev_err(client->dev, + "failed to initialize bridge connector: %pe\n", + connector); + return PTR_ERR(connector); + } + + drm_connector_attach_encoder(connector, &hdmi->output.encoder); + } else { + drm_connector_init_with_ddc(drm, &hdmi->output.connector, + &tegra_hdmi_connector_funcs, + DRM_MODE_CONNECTOR_HDMIA, + hdmi->output.ddc); + drm_connector_helper_add(&hdmi->output.connector, + &tegra_hdmi_connector_helper_funcs); + hdmi->output.connector.dpms = DRM_MODE_DPMS_OFF; + + drm_connector_attach_encoder(&hdmi->output.connector, + &hdmi->output.encoder); + drm_connector_register(&hdmi->output.connector); + } err = tegra_output_init(drm, &hdmi->output); if (err < 0) {