Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1379452rwd; Thu, 15 Jun 2023 09:43:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ib9rd0l0Fmq2iLZNhnOfNvBFdGSy0PfQ8JDo2yLPlzuJlEXl7TsyetOBO0prvML+hGFBX X-Received: by 2002:a17:907:1694:b0:96f:add6:c1ed with SMTP id hc20-20020a170907169400b0096fadd6c1edmr4772038ejc.38.1686847394653; Thu, 15 Jun 2023 09:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686847394; cv=none; d=google.com; s=arc-20160816; b=hQ+BE+czjHLEVy/MRuT6rHTElsNTXr3rSVVjrozf0rho+Lo7t6IRUlFWaaOWLj7W2Z uUe9IPpu1kCCOotaa2biFl/EXvbxWQHKUjcY+51gfpvsy7pl5ubhjyhVNJVkAZ4S/wtC HyCe3oRShEs/ckhp0s+DO8ZmzGYb5RuH0pgC9ATyLOxuH4ZcrIrvfl5r6oAu0Knjn8Lb pJPDOLQDVEgx6VcGJ4YMNT83/c3b0nVlYW+3HWzhL5O0E6MHdfBTMgVaFhIxLRAuivVi ZT/Ni8c/H+S6FmEEsBlOoikNJjYVvoTpw11KqWNyvUp+huiQiO8eJybf5VmpimtkBjjx TXJw== 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 :dkim-signature; bh=kRWfxKU6iLOyQwwGx2ME57rRsTmS+Y/mv8gYh4DhOyg=; b=vinevWeylUgsWRqUKMd8aOQ3z32QD7v/W9Gtg/qIb+ztKV/0Yo7rQVt00nPYdAVMnO /bA1lK/uYgktV2opCg+PSL8u9eiHmRn6/a/Bl49h7xc4PB5Z6pqpYNK72+Q9zyVDsYVh ur3k7En3U6t6p5EpIM2z5H8ktbsF1Vg/6GpUVbKWdOvMhgXeMLPW6EHs3FeA5JDm0N27 eSeUQ+XJz+14Lwk0C0BOHPJlHRotYJJhgld8SaYb8h1WWdqlDrtkR886pHGj/4bz7guO ON6dtSt3qFlsK5/R+mwCpCe1ATJ+Z+hteFPPyY0GLPt1i7bsCbE6JIZ6HAmkawRQZi4g N1Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=okJlCJ3J; dkim=neutral (no key) header.i=@ravnborg.org header.b=XINu3Abp; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d18-20020a170906041200b009789235d438si9866261eja.569.2023.06.15.09.42.49; Thu, 15 Jun 2023 09:43:14 -0700 (PDT) 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 header.i=@ravnborg.org header.s=rsa1 header.b=okJlCJ3J; dkim=neutral (no key) header.i=@ravnborg.org header.b=XINu3Abp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233018AbjFOQdS (ORCPT + 99 others); Thu, 15 Jun 2023 12:33:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233016AbjFOQdP (ORCPT ); Thu, 15 Jun 2023 12:33:15 -0400 Received: from mailrelay3-1.pub.mailoutpod2-cph3.one.com (mailrelay3-1.pub.mailoutpod2-cph3.one.com [IPv6:2a02:2350:5:402::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 242E7211D for ; Thu, 15 Jun 2023 09:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=kRWfxKU6iLOyQwwGx2ME57rRsTmS+Y/mv8gYh4DhOyg=; b=okJlCJ3JHQ3+H0XLiMBf0glJchvuuMsEcUCgzmvJnyKMoDMx5KHnSTtuAyw0+6C02Fj+PIczYsQAb 1sJXFppRbmiGQviCKIb6gD9tGzLEdywy9YByMgoeRCa84fyqZkmGszeCCOuLk+544Y+QNzLZKDM87E R+MDZJ4STSxW54XyqvVk2jeDkTM+7hDVzHkzZIH7HZecVf7PLr7GF7PWoIRiAkQPtxs1vJ7iZjPeUI 8aMMfkVKa1VnG0CWOwYTNA76VeemsnDscjlKWyMSZ0Wyx32wByG6pAy08mMt1KyZN9XMciIJhmstwO 20X+A/bkr4Y7SdFgKgk+vxuxgnP+UnQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=kRWfxKU6iLOyQwwGx2ME57rRsTmS+Y/mv8gYh4DhOyg=; b=XINu3AbpGKXRusYWTJ6IxnhI3JYWGjV1+42EsWbHmdUP4+C57+XyPjz9QZOcgglPnTa8mYWRY3EwX WRTXCTvAw== X-HalOne-ID: 4f77e8bb-0b9a-11ee-8d88-b90637070a9d Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay3 (Halon) with ESMTPSA id 4f77e8bb-0b9a-11ee-8d88-b90637070a9d; Thu, 15 Jun 2023 16:33:10 +0000 (UTC) Date: Thu, 15 Jun 2023 18:33:08 +0200 From: Sam Ravnborg To: Sandor Yu Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, vkoul@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, oliver.brown@nxp.com, linux-imx@nxp.com, kernel@pengutronix.de Subject: Re: [PATCH v6 3/8] drm: bridge: Cadence: Add MHDP8501 DP driver Message-ID: <20230615163308.GA1588386@ravnborg.org> References: <67f54be91e91f6291c4ad3f5155598d699b8bc09.1686729444.git.Sandor.yu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67f54be91e91f6291c4ad3f5155598d699b8bc09.1686729444.git.Sandor.yu@nxp.com> X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLACK 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 Sandor, On Thu, Jun 15, 2023 at 09:38:13AM +0800, Sandor Yu wrote: > Add a new DRM DisplayPort bridge driver for Candence MHDP8501 > used in i.MX8MQ SOC. MHDP8501 could support HDMI or DisplayPort > standards according embedded Firmware running in the uCPU. > > For iMX8MQ SOC, the DisplayPort FW was loaded and activated by SOC > ROM code. Bootload binary included HDMI FW was required for the driver. The bridge driver supports creating a connector, but is this really necessary? This part: > +static const struct drm_connector_funcs cdns_dp_connector_funcs = { > + .fill_modes = drm_helper_probe_single_connector_modes, > + .destroy = drm_connector_cleanup, > + .reset = drm_atomic_helper_connector_reset, > + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, > + .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, > +}; > + > +static const struct drm_connector_helper_funcs cdns_dp_connector_helper_funcs = { > + .get_modes = cdns_dp_connector_get_modes, > +}; > + > +static int cdns_dp_bridge_attach(struct drm_bridge *bridge, > + enum drm_bridge_attach_flags flags) > +{ > + struct cdns_mhdp_device *mhdp = bridge->driver_private; > + struct drm_encoder *encoder = bridge->encoder; > + struct drm_connector *connector = &mhdp->connector; > + int ret; > + > + if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)) { > + connector->interlace_allowed = 0; > + > + connector->polled = DRM_CONNECTOR_POLL_HPD; > + > + drm_connector_helper_add(connector, &cdns_dp_connector_helper_funcs); > + > + drm_connector_init(bridge->dev, connector, &cdns_dp_connector_funcs, > + DRM_MODE_CONNECTOR_DisplayPort); > + > + drm_connector_attach_encoder(connector, encoder); > + } Unless you have a display driver that do not create their own connector then drop the above and error out if DRM_BRIDGE_ATTACH_NO_CONNECTOR is not set. It is encouraged that display drivers create their own connector. This was the only detail I looked for in the driver, I hope some else volunteer to review it. Sam