X-Received: by 2002:a17:902:d508:b0:14f:dd5f:c8b2 with SMTP id b8-20020a170902d50800b0014fdd5fc8b2mr1523680plg.17.1645653098795; Wed, 23 Feb 2022 13:51:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645653098; cv=none; d=google.com; s=arc-20160816; b=TtSQZJFV28rJlEjKt8CWo4tpAXnbWpNJ+8tkQxuBpk2R8ZWmWkDpbrnuGdxdi/+WHa 1US7WBX5s8R4x59fhUQwHpqtbQRn4NDlGEA5QoH23zTMMY7++nihfk4LeNv3b3+vha1m YzV+O8BPkTOKvAqSXm9eYsZxm09V71ZMxkfTVJNJ1dzUEoDS8QkrmD6Syj2wzbaY2CzK XOccwWgeURtT7cRyKkpTjbrjo/ZeF0XuQmRI36BLQW6HB397ZzQYj0CYoeQe4a2QkMfQ y+71AYHGpo4vliWsBaMsNZtabOT735pIT4NdkhlWGUwSec89Ek9uqy0Bf0vPYdOB1+7w iFvA== 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=FgQTgqziNKWKER2EIGatrqwMgScYbE1jaY41KuRa9OM=; b=C9QqmX0mZFWicca/0O0Y5XHvzANw0Pr6+tAGy33k3SgMP/VDMetikFBUxTb5TSUJ68 HDu3u7Yv1DWVOp9kulHiqiKwhkkNvhYCxLY4l8GrTxc4l86Ey70XZm5gf7vHRXI5q6W6 JYEuYDrPyGz0MtLTVnZ9G0i0vZRNLLAcEK4IRoFgjA7Kh93FImWfZP++ob5vzS7AcdJk mG3EZAA3t6LfRhvAjFMsTaBBlrzEexgL8tcHFZRAGLAT5OKAsdU4E4cbhNfuj3AlUfRN yf5Nl2ANuw7KE+3GSf39ccEi0sr3QNqLKwicmVHCmT4sbm34lmk7YOreHVnWWgZ0nMzQ RaXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=Yli2PPJD; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=fJcIHRF1; 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=cerno.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12si768292plx.0.2022.02.23.13.51.23; Wed, 23 Feb 2022 13:51:38 -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 header.i=@cerno.tech header.s=fm2 header.b=Yli2PPJD; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=fJcIHRF1; 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=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235883AbiBWOjt (ORCPT + 99 others); Wed, 23 Feb 2022 09:39:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241680AbiBWOjr (ORCPT ); Wed, 23 Feb 2022 09:39:47 -0500 Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 815B2B54E7; Wed, 23 Feb 2022 06:39:17 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 0E9AC58048A; Wed, 23 Feb 2022 09:39:15 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 23 Feb 2022 09:39:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=FgQTgqziNKWKER2EIGatrqwMgScYbE1jaY41Ku Ra9OM=; b=Yli2PPJDon/Sd3hWdozX4L17oVl7xLrv21xPwvKecUIpyd8aPy1+eQ PN29mJy2I0NrgpCdcxuxsni2F/BGR7WOXN4tTRXOGeJuamGKEymBaHfDqsyIyNcD xahS06C6zwAStN1A1Mk3pcsGwl2akNdlXJzlcSc5O/xr8+TLvdSsv6T6m3DNzLQ1 MKSDLi+nKhqoxXUKqgiLBBqk6yRi+kqHZL5mgm9ePBJsQ5zZwJaBD8vImC2vzLvi 4g8YL8kts6FypEX0dFFRj9xTE1XAOu3pVu7TQJbhgOSQvcUqB6S+3ifg6xd074Qk VeemYsCbaTufoebFyK4dUPM1BCrfHc2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=FgQTgqziNKWKER2EI GatrqwMgScYbE1jaY41KuRa9OM=; b=fJcIHRF17UWKd0l8UNOFyNrRjbu8kDSvB j9nKZS5xD6s5+mep1mSmlY4AT3MPwU3ZkQ3EfiB0hM4iZGkuU1FQlGyNmLtm5tDe 7jHteapsg/MRIyxLXkG1U4cBvHoAKog7OdOJYs5tgxB6IwoYfURQcoZjy5HiYzyL rQL0b2cN5R7Mo/QtQZ+LUOAQT0RvJJX+czf6rheaXsjAYhCmt1idGp0yEwKBmsGJ AXsycRUS0N+ttmx+PHDahoITWdsPjNgi3ieoKCSt4KHSSWykydxBnMXVhYCKhan4 eldILqu8Ye/Mqa7HGDT5qe45rO4TSTUtbUmSQ/spOWDmILLaVYs+w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrledtgdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeduvdduhfekkeehgffftefflefgffdtheffudffgeevteffheeuiedvvdejvdfg veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Feb 2022 09:39:13 -0500 (EST) Date: Wed, 23 Feb 2022 15:39:12 +0100 From: Maxime Ripard To: Sui Jingfeng <15330273260@189.cn> Cc: Thomas Zimmermann , Roland Scheidegger , Zack Rusin , Christian Gmeiner , David Airlie , Daniel Vetter , Rob Herring , Thomas Bogendoerfer , Dan Carpenter , Krzysztof Kozlowski , Andrey Zhizhikin , Sam Ravnborg , "David S . Miller" , Jiaxun Yang , Lucas Stach , Maarten Lankhorst , Ilia Mirkin , Qing Zhang , suijingfeng , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Randy Dunlap , kernel test robot Subject: Re: [PATCH v10 3/4] drm/lsdc: add drm driver for loongson display controller Message-ID: <20220223143912.m727fie3vtdkvklo@houat> References: <20220220145554.117854-1-15330273260@189.cn> <20220220145554.117854-4-15330273260@189.cn> <20220222082747.66otrkc4zwvhem7w@houat> <54ea69d7-2fac-74dc-2ef6-843a666cff85@189.cn> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wam4wqm3zed2h2ms" Content-Disposition: inline In-Reply-To: <54ea69d7-2fac-74dc-2ef6-843a666cff85@189.cn> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 --wam4wqm3zed2h2ms Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 22, 2022 at 10:46:35PM +0800, Sui Jingfeng wrote: >=20 > On 2022/2/22 16:27, Maxime Ripard wrote: > > > + if (!of_device_is_available(output)) { > > > + of_node_put(output); > > > + drm_info(ddev, "connector%d is not available\n", index); > > > + return NULL; > > > + } > > > + > > > + disp_tims_np =3D of_get_child_by_name(output, "display-timings"); > > > + if (disp_tims_np) { > > > + lsdc_get_display_timings_from_dtb(output, &lconn->disp_tim); > > > + lconn->has_disp_tim =3D true; > > > + of_node_put(disp_tims_np); > > > + drm_info(ddev, "Found display timings provided by connector%d\n", = index); > > > + } > > > + > > > + connector_type =3D lsdc_get_connector_type(ddev, output, index); > > > + > > > + if (output) { > > > + of_node_put(output); > > > + output =3D NULL; > > > + } > > > + > > > +DT_SKIPED: > > > + > > > + /* Only create the i2c channel if display timing is not provided */ > > > + if (!lconn->has_disp_tim) { > > > + const struct lsdc_chip_desc * const desc =3D ldev->desc; > > > + > > > + if (desc->have_builtin_i2c) > > > + lconn->ddc =3D lsdc_create_i2c_chan(ddev, index); > > > + else > > > + lconn->ddc =3D lsdc_get_i2c_adapter(ddev, index); > > This looks weird: the connector bindings have a property to store the > > i2c controller connected to the DDC lines, so you should use that > > instead. > >=20 > This is not=A0 weird,=A0 ast, mgag200, hibmc do the same thing. And none of them have DT support. Maxime --wam4wqm3zed2h2ms Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYhZHEAAKCRDj7w1vZxhR xXitAP9v7HOYqHz8i7UAxoCMoqbrhwBW9XOoHnf/jK5QqIkJuwEAuPDXzMoMz/sH GrxQHl28jgBtPlbX7QJnoi4BgNwVNQA= =4ezX -----END PGP SIGNATURE----- --wam4wqm3zed2h2ms--