Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2501519rwb; Fri, 20 Jan 2023 03:56:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXtvMPBtGjCa+TkXMGYGoRbYgK5MO9cygRw9yWHuyC3N+zkqJM5QUxAb39yh3PVAciDTshBT X-Received: by 2002:a17:902:9693:b0:191:11ec:2028 with SMTP id n19-20020a170902969300b0019111ec2028mr15529792plp.46.1674215768476; Fri, 20 Jan 2023 03:56:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674215768; cv=none; d=google.com; s=arc-20160816; b=p7pVLeIdEQLnrW7YhoxpEt9By/3Fl3BwDjrxmdYvuM6s8t1SXx0i8w2Nt+urnTYlvX bL6Y+H14AGqwPG3p+Kbw360ed7BIAcrrP3x2uWRA4w/ljcg51d+GvzMDNUzKGVaepjFa LLH/YdZRB1RnGk4G1gcTVdb+ibTmsL9yeUUehWbZsekOpqz7abjFCT+racLInmas4XOR BatUfOpEW3/QcPm4eSWvlll4S3ScAYZg4Ya3rGTf5dX7/mOUjbq7/slzjMGuPf17VDFw yKFDPYOlILmedi7fk/wQ0ZV1aWPQgUsqZPX/SpttndKRRRY3Vy7i5v6b9GS+BSgoawZK CblA== 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=KN0W4cFj0cNukrPJD6vipzylE7T5CRhghDMb5r+iSYY=; b=Nqjj/UctDqD+EkMjGyy1M0IVHa19LNXy+YFYynWAheearUn1ntKR9a7+wTjDEjfjXk AJjot1xqU+mhaMJNVwlW/6Ez2oWiEGq5tAWp325WFrunRBEMPgka1y9S4pusw3oCOiZc a2wB254vwy/7IfypfLSiIwbqkBF556XJPRrEk0SRnPL3B96e923vO0FKTFfa6tiG3cfA 1ZasW1vBMIf1p3UCVTLCvOQTZBTd1oER84ec51cW2akdo8elo7IehQ3yvIaC1kGlPc7E TRaKldayXm4WEcwfKSRvRIgoJMP2pnDPXnjb5IooFZVxeP6gO8oCyPjjLrMjKlINWk8I uE0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@metanate.com header.s=stronger header.b=v5LlvNmi; 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=metanate.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u14-20020a170903124e00b00189c83914c7si42825808plh.89.2023.01.20.03.56.02; Fri, 20 Jan 2023 03:56:08 -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 (test mode) header.i=@metanate.com header.s=stronger header.b=v5LlvNmi; 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=metanate.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229812AbjATLn6 (ORCPT + 51 others); Fri, 20 Jan 2023 06:43:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbjATLn4 (ORCPT ); Fri, 20 Jan 2023 06:43:56 -0500 Received: from metanate.com (unknown [IPv6:2001:8b0:1628:5005::111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F3829DCA0 for ; Fri, 20 Jan 2023 03:43:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Content-Type:Reply-To:Content-ID:Content-Description: In-Reply-To:References; bh=KN0W4cFj0cNukrPJD6vipzylE7T5CRhghDMb5r+iSYY=; b=v5 LlvNmiAVpTvzhcvCm9UDD3fHdLaOC9AIG32VqlGioRrnvWSVTGPQRBxk/a/SrnJh+kG1idogG0Z5F 4gbBv281XQ2Mfr2I2IaOrBr6QhrdMHutJ+OKB+vHDhbldcFLyWRK4gB/21dBlA6jiPEX9bS4nQij2 cOIrDRjAAQfuw+NVcskI6ufqqYoz+333++G3Kovk3f4IsT37JeWk27MZ03XqOh8Blwue1vacnYGMI 7aZQ3SuKgiuyLEZT2kOTlRjLgmk6q3bFO6ZMZl6ccrCIeiHNwkeTRTQCnD0amvjDeOz0Qs036gyAO /77HeurpSJmlwjYr+2lVEaqX0nRNkMwg==; Received: from [81.174.171.191] (helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pIpnr-00007e-Tn; Fri, 20 Jan 2023 11:43:28 +0000 From: John Keeping To: dri-devel@lists.freedesktop.org Cc: John Keeping , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Douglas Anderson , Stephen Boyd , Hsin-Yi Wang , linux-kernel@vger.kernel.org Subject: [PATCH] drm/bridge: panel: Set orientation on panel_bridge connector Date: Fri, 20 Jan 2023 11:43:12 +0000 Message-Id: <20230120114313.2087015-1-john@metanate.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated: YES X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RDNS_NONE,SPF_HELO_PASS, SPF_PASS autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org Commit 15b9ca1641f0 ("drm: Config orientation property if panel provides it") added a helper to set the panel panel orientation early but only connected this for drm_bridge_connector, which constructs a panel bridge with DRM_BRIDGE_ATTACH_NO_CONNECTOR and creates the connector itself. When the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag is not specified and the panel_bridge creates its own connector the orientation is not set unless the panel does it in .get_modes which is too late and leads to a warning splat from __drm_mode_object_add() because the device is already registered. Call the necessary function to set add the orientation property when the connector is created so that it is available before the device is registered. Fixes: 15b9ca1641f0 ("drm: Config orientation property if panel provides it") Signed-off-by: John Keeping --- drivers/gpu/drm/bridge/panel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c index e8aae3cdc73d..d4b112911a99 100644 --- a/drivers/gpu/drm/bridge/panel.c +++ b/drivers/gpu/drm/bridge/panel.c @@ -81,6 +81,8 @@ static int panel_bridge_attach(struct drm_bridge *bridge, return ret; } + drm_panel_bridge_set_orientation(connector, bridge); + drm_connector_attach_encoder(&panel_bridge->connector, bridge->encoder); -- 2.39.1