Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1891850rdb; Tue, 3 Oct 2023 04:34:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpDerHQWut7zWWCvR/ryNtEkVE8aeHRlH+qYf/3ZWLj+COm6rPgKfafyJhHxUv07oLQvE3 X-Received: by 2002:a17:90a:7446:b0:274:4fb:360a with SMTP id o6-20020a17090a744600b0027404fb360amr13906872pjk.16.1696332854003; Tue, 03 Oct 2023 04:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696332853; cv=none; d=google.com; s=arc-20160816; b=zxFiqaM+7W1SZrKJj8KFOggXoMHMeJQ4j/ojHCz1lyqaGa0YsMSX306UhsjI0i/3XD 1kqltdfDFQ1b76ZUntDluu+2hlFDIJYnwgI/GZDlUgYAl52/i6B3YFHjEuuf963a8fAE i3I7SrCfAj8KRkAsNlL7IySWNsKOvEDzX5NiPGpoGXrHO+6aKPZa6msB83cUhJYndWMC N2NcRvpMEJS5bHkENlUuJeC5aMw8lxBCg2xoPVnDT4BAiugCMHot+dkE3MOMv9ym9EtU XVuHXyW1G9dMYk/Q0MggdAQoPZ/dHnnp3uyyZEh0GcgJ8Zx6BW+4eqr3dHyE85uDmOue mCmA== 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; bh=a+DPX8M8uIJ0fb2akVTIbQN8LZUJIC6ntVDOEn68xLY=; fh=Oyns+MRNENvE/4pdLFKaFp/oMxPAjrImQ5eA0WPGheM=; b=iRwxFph0W4dbxT31uAezXZbvLp1GqaHcAma7NUOF1eFH9dUpD/UfeGxdDoa/ltt7ys ZtDe52XIosoddb0K7F4q4GMEtOYtfjtcp0+E5fkO++0yFOPDs+zVzLgpeFhUPgjT2uZK XKPeokvo3Ml3dwq06KVo1skEXrg/BQu00XYYrs5j67tbeEOc4rWaGD0zMQUzJJMpeVkN 72dqA8LhITtLijseEoPo1MePlWqkHBEZQLINUO8UnIS9KaGGW561zo30VIJzFv285/3q VyD7jmA2vybbT+nekZAmg9nJf2iIbX9IaA6ZhlkZfhGoZgPDSH6IJ/i+w9EMzWpHsVjM I0hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id gv15-20020a17090b11cf00b0027775575d1dsi357584pjb.0.2023.10.03.04.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 04:34:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 63B6280E8FF0; Tue, 3 Oct 2023 04:34:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240504AbjJCLeJ (ORCPT + 99 others); Tue, 3 Oct 2023 07:34:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240481AbjJCLeF (ORCPT ); Tue, 3 Oct 2023 07:34:05 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0827AC for ; Tue, 3 Oct 2023 04:33:59 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8Cx2eol_BtlDM0uAA--.18989S3; Tue, 03 Oct 2023 19:33:57 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx7y8k_Btl7JAXAA--.48472S2; Tue, 03 Oct 2023 19:33:56 +0800 (CST) From: Sui Jingfeng To: Lucas Stach Cc: Christian Gmeiner , dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v11 0/5] drm/etnaviv: Add pci device driver wrapper Date: Tue, 3 Oct 2023 19:33:51 +0800 Message-Id: <20231003113356.645394-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Cx7y8k_Btl7JAXAA--.48472S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj93XoW7Aw47ZF4kKF4rXw4rtFW3XFc_yoW8KryDpF 4fGFyYyrykurW2gw13JFs5JFy3Gw1xWFyF93srt3s09w45Ar1Utr1qkan8Ar98Jr4fGr1I qr1akry7WF1UArXCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUk0b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4j6r4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc 02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAF wI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7V AKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCj r7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6x IIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAI w20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x 0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxU25EfUUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 04:34:12 -0700 (PDT) This series is add PCI device driver wrapper, to support the Vivante GC1000 GPU in LS2K1000 and LS7A1000. The whole serie have been tested on LS3A5000+LS7A1000 board, with another trivial patchset [1] applied beforehand. [1] https://patchwork.freedesktop.org/series/119825/ v6: * Fix build issue on system without CONFIG_PCI enabled v7: * Add a separate patch for the platform driver rearrangement (Bjorn) * Switch to runtime check if the GPU is dma coherent or not (Lucas) * Add ETNAVIV_PARAM_GPU_COHERENT to allow userspace to query (Lucas) * Remove etnaviv_gpu.no_clk member (Lucas) * Various Typos and coding style fixed (Bjorn) v8: * Fix typos and remove unnecessary header included (Bjorn). * Add a dedicated function to create the virtual master platform device. v9: * Use PCI_VDEVICE() macro (Bjorn) * Add trivial stubs for the PCI driver (Bjorn) * Remove a redundant dev_err() usage (Bjorn) * Clean up etnaviv_pdev_probe() with etnaviv_of_first_available_node() v10: * Add one more cleanup patch * Resolve the conflict with a patch from Rob * Make the dummy PCI stub inlined * Print only if the platform is dma-coherrent V11: * Drop unnecessary changes (Lucas) * Tweak according to other reviews of v10. Sui Jingfeng (5): drm/etnaviv: Add a dedicated function to get various clocks drm/etnaviv: Add constructor and destructor function for etnaviv_drm_private drm/etnaviv: Allow bypass component framework drm/etnaviv: Add driver support for the PCI devices drm/etnaviv: Add support for cached coherent caching mode drivers/gpu/drm/etnaviv/Kconfig | 8 ++ drivers/gpu/drm/etnaviv/Makefile | 2 + drivers/gpu/drm/etnaviv/etnaviv_drv.c | 131 ++++++++++++++------- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 12 ++ drivers/gpu/drm/etnaviv/etnaviv_gem.c | 16 ++- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 134 ++++++++++++++-------- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 7 ++ drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c | 74 ++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_pci_drv.h | 18 +++ include/uapi/drm/etnaviv_drm.h | 1 + 10 files changed, 314 insertions(+), 89 deletions(-) create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_pci_drv.h -- 2.34.1