Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4348058rwb; Sat, 21 Jan 2023 10:02:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXtuJo5IpwosK+yyiPeh2PHklYclGkfR4dCnc2++ztlUeMwBodHRJJVnEofjlfvfG44ay3tN X-Received: by 2002:a17:906:5da8:b0:7b2:c227:126d with SMTP id n8-20020a1709065da800b007b2c227126dmr18462664ejv.20.1674324178247; Sat, 21 Jan 2023 10:02:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674324178; cv=none; d=google.com; s=arc-20160816; b=HjVX+YN2xZQIQprizEHzXUlK7eIg1zszDjvb49bpnqO3QXMHti1+iogGifM6n0Cu/T a2mQQEHeOqY3T0yy4RNExh6US8L2dM9ugUkrIN7raOQGuB6ITb5fkaWRnbScobQNF8bA jP9TWioGdGS3CaWWTBl6OHa07dYKDW85ALZTnhPiZ05YNp94NA21elH2ZyD/I+DtIHV2 vwGVi+EvLmZ0Jl5ecmgFJwYyhS42oeRMW+u8EGr7ngNvkLt9bgV7H3LuzD7N3V20FVS+ LW1R74G1QueM//ODI0X3ZXt7MiF4s5zfgQ4sdPIF6LF0r/f7yV4BA/L3KxgI1F1nrrA2 yjng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EUyECha8HaxVxgq1F1KoFMr1DGt4Ij3T1L3mz8LljAM=; b=vBEh/+CuB8OhIeeuXekRFaRu5AMulxGP4DGrhOVCsCcFVEY2VktqxTIFyND7OmtaPQ C4GUqdZzHqdSzei/HJ7nTJGDm1zZ9nCDGyKFGcklo27xkB21ESbu54ynDq+plnD46RLm onRB6a1HoXoV6auho10Jb461ekE5VGdGDtsB7GFf6NNaFlyWhB7faaQjzJWIbCIIY9BF fVGFo8fKnkA9Xcr2XPU6Q8j6tG09VKi3x6W1C5qPHMSEReAQjamtnE1WnSuWrmIzV2J9 PB/0e6+B7vSHxm5Lg6fkfLQRzf5uLBIPgEsZMQYfic70uuoW9UdfPBFpfxYkN7L0MC5R weog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@metanate.com header.s=stronger header.b=1MAQ03rG; 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 bb2-20020a1709070a0200b00864aa239277si34161433ejc.896.2023.01.21.10.02.45; Sat, 21 Jan 2023 10:02:58 -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=1MAQ03rG; 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 S229587AbjAUR7F (ORCPT + 50 others); Sat, 21 Jan 2023 12:59:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbjAUR7D (ORCPT ); Sat, 21 Jan 2023 12:59:03 -0500 Received: from metanate.com (unknown [IPv6:2001:8b0:1628:5005::111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7151EB46A for ; Sat, 21 Jan 2023 09:58:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=In-Reply-To:Content-Type:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=EUyECha8HaxVxgq1F1KoFMr1DGt4Ij3T1L3mz8LljAM=; b=1MAQ0 3rGGQF+HQYx+iCsXN4SYOL1zEHCSG4P0IMdvNTbjw/ou4gvoaCnWEAf7Ii1Xqjrj2CxtM0KAa0qtO 6xzlg7iPuMMlh4GDH2X8oIOEfg1R0qjdAQtqAKxvnFWxl35Jgyfur1jFsBeiBSv1e523z8ERWsDHk 0xs7/I2CiPAjoBzo+QjTXQnIjvrEar62l3ifB6KZ9VbKEIJWwGkm2sEULdLyFY4asptqb0F+zoK9A hez1cbWN3HmBCfjbqPAJFvbGTnvvzapYWS9J0gPoCCwyNkvhd1Er7UCUB+OVTj9ost81ArzpfJ+dt t37w7Tr11kn6TjSQj9hQj+rjsFfOA==; Received: from [81.174.171.191] (helo=donbot) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pJI8A-0004Ik-P2; Sat, 21 Jan 2023 17:58:18 +0000 Date: Sat, 21 Jan 2023 17:58:11 +0000 From: John Keeping To: Sam Ravnborg Cc: Doug Anderson , Neil Armstrong , Jernej Skrabec , Robert Foss , Jonas Karlman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , Laurent Pinchart , Andrzej Hajda , Hsin-Yi Wang Subject: Re: [PATCH] drm/bridge: panel: Set orientation on panel_bridge connector Message-ID: References: <20230120114313.2087015-1-john@metanate.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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,URIBL_BLOCKED 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 Hi Sam & Doug, On Sat, Jan 21, 2023 at 09:57:18AM +0100, Sam Ravnborg wrote: > On Fri, Jan 20, 2023 at 01:44:38PM -0800, Doug Anderson wrote: > > On Fri, Jan 20, 2023 at 3:43 AM John Keeping wrote: > > > > > > 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. > > > > I have no huge objection to your patch and it looks OK to me. That > > being said, my understanding is that: > > > > 1. DRM_BRIDGE_ATTACH_NO_CONNECTOR is "the future" and not using the > > flag is "deprecated". > Correct. > Could we take a look at how much is required to move the relevant driver > to use DRM_BRIDGE_ATTACH_NO_CONNECTOR? > > If this is too much work now we may land this simple patch, but the > preference is to move all drivers to the new bridge handling and thus > asking display drivers to create the connector. > > What display driver are we dealing with here? This is dw-mipi-dsi-rockchip which uses the component path in dw-mipi-dsi (and, in fact, is the only driver using that mode of dw-mipi-dsi). I'm not familiar enough with DRM to say whether it's easy to convert to DRM_BRIDGE_ATTACH_NO_CONNECTOR - should dw-mipi-dsi-rockchip be moving to use dw-mipi-dsi as a bridge driver or should dw_mipi_dsi_bind() have a drm_bridge_attach_flags argument? But I'm happy to test patches if it looks easy to convert to you :-) John