Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9435633rwd; Wed, 21 Jun 2023 07:26:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ47eJ3lnIoMqsoNQ2/OVHxYp9UgABzF7RLexlE1WFsVkhAuUAoySSdMCYBoc6r3Zx+u29EN X-Received: by 2002:a92:d489:0:b0:340:67df:56ea with SMTP id p9-20020a92d489000000b0034067df56eamr10599615ilg.9.1687357588234; Wed, 21 Jun 2023 07:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687357588; cv=none; d=google.com; s=arc-20160816; b=KNM+ECFHOtFkQqRpew08xJp0H/Dwh+wL6g8QDwrkQ6GbT1Ur2gk+pRWZR6jVZN3DBt Cjyq4j7jX+w7ApxpgOrX5EoKSY7YNzyGxXSMuyBJZ+mFBqkZqNR1W/vPGtY5AxTfAFKt mYsJ3075DSO7HxVtuD+XTxdaXHZ/ohKUsQWiglr4r8wGHgeVcWoCFaMjpv26Mh43xiKO l6hpgF1o/5O62Fk5aGpHiEsVtVKX+IA7+hj4JbWjH06QueLoNB2dsC0dv8rcbdLsOI8D 7X5xsHBwONyB9Euoe0HFgy9mfrtDI7r79jxRst48dvEO1Ob9QDzP4llsGByViiXKVath TBHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=5HTTjrEH0fTonurOImIB4Wj4fU48rlWNvX1CKl0nZ8Q=; b=B0Uih6NPniblIQMGebUl34GgsMTgGvmm4G0DVhyI/3p8U/dTd/yUr/dbgKzSAXs7XJ J1XCTGukCnhGMYcdG7rq1TvmX1CnQGKnMhlL1m8R9aKbjyJiWVRXYGVFJlTwtw5KV7A3 uesWbSg7TKVnQpffshQk1if/ggG2mvGxFV0z1kvWgtlbegy52UPIBBhGrznfHhnzVLYn Gz1M1dLZI5Xa8i5m140gYpEMpC7l48WHgzq77bWkBCq9bDqzFP9RB/fFCnZy3ODB+gY0 IGwCKtp21HbexABujLfeoqeZ0thi9URj01MuJjoGqkwiG/xiYPVlYfHEF8E5deVTIk4Z Lg/w== ARC-Authentication-Results: i=1; mx.google.com; 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 bx13-20020a17090af48d00b0025e9a350512si4190069pjb.164.2023.06.21.07.26.14; Wed, 21 Jun 2023 07:26:28 -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; 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 S232736AbjFUOBT convert rfc822-to-8bit (ORCPT + 99 others); Wed, 21 Jun 2023 10:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbjFUOA5 (ORCPT ); Wed, 21 Jun 2023 10:00:57 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E858D1BE2 for ; Wed, 21 Jun 2023 07:00:54 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qByO4-0005A0-OB; Wed, 21 Jun 2023 16:00:44 +0200 Message-ID: <0f1095ef333da7ea103486a1121ca9038815e57c.camel@pengutronix.de> Subject: Re: [PATCH v10 03/11] drm/etnaviv: Add dedicated functions to create and destroy platform device From: Lucas Stach To: Sui Jingfeng , Sui Jingfeng <18949883232@163.com>, Russell King , Christian Gmeiner , David Airlie , Daniel Vetter Cc: Bjorn Helgaas , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Philipp Zabel , etnaviv@lists.freedesktop.org Date: Wed, 21 Jun 2023 16:00:38 +0200 In-Reply-To: <30d80802-2d9d-2816-1a02-240145f6dd3a@loongson.cn> References: <20230620094716.2231414-1-18949883232@163.com> <20230620094716.2231414-4-18949883232@163.com> <0daa7182d6600a24988d1c81cf8fe3c0c9487f52.camel@pengutronix.de> <1c7596fd-7e63-6719-2574-7d7820687832@loongson.cn> <6d287bbb1733814009dfeb7d48f08cb6f44dc56c.camel@pengutronix.de> <30d80802-2d9d-2816-1a02-240145f6dd3a@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 Am Mittwoch, dem 21.06.2023 um 21:31 +0800 schrieb Sui Jingfeng: > On 2023/6/21 18:23, Lucas Stach wrote: > > > While back to the question you ask, I want etnaviv_create_platform_device() to be generic, > > > > > > can be used by multiple place for multiple purpose. > > > > > > I have successfully copy this to a another drm driver by simply renaming. > > > > > > The body of the function itself does not need to change. > > But it isn't shared, > > This can be shared for drm/etnaviv in the future, > > currently, we just need an opportunity to use this function. > I'm not convinced, yet. > I want to create a dummy platform device, > > let this dummy platform be bound to the single PCI GPU master. > > > etnaviv_create_platform_device("dummy", &dummy_device); > > > 1) To verify the component code path on PCI case. > My favorite option would be to just always use the component path even when the GPU is on a PCI device to keep both paths mostly aligned. One could easily image both a 3D and a 2D core being made available though the same PCI device. > 2) Possibly for create a device for some other tiny hardware logic > come with the platform > Do you have something in mind here? Until now I assumed that only the GPU core is behind the PCI abstraction. Is there something else sharing the MMIO space? Regards, Lucas > 3) Revival component_compare_dev_name() function. > > > in this compilation unit this function is specific > > to the etnaviv driver and I don't see why we shouldn't have etnaviv > > specifics in there if it makes the code of this driver easier to > > follow. >