From patchwork Mon Jul 8 14:41:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168660 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp7254880ilk; Mon, 8 Jul 2019 07:42:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWpSJnu4uCsr5cJF9GmhFBL8S2KKaY78nlS5l7k5zkYlgcKGyEVWT1lfuIAU/f/uMUq1NL X-Received: by 2002:a63:f04:: with SMTP id e4mr23585425pgl.38.1562596938467; Mon, 08 Jul 2019 07:42:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562596938; cv=none; d=google.com; s=arc-20160816; b=woZTnnaGJQxB2s6bc7lr9k7z6N7OUU5q4KCzVjD9fYCF0WVbxKi0JWcACnTRbR2Fo+ BL2JJAJXumVP2WPPLffcEwmAbGhbt85/POpKi/G63U+5+sTPWtObiCByWUrFbWLxZU2r 0r+IbxU8/ufd5fUIMRR0cZ79OAyppV9S9XW6866WxnnsFHzNAJ9Pdr0y9fKJkiGvxCmK U29x8n+wllhrj84oBjNT5aKudpnwhUplaZYX6vg0JHKwDxTO/sCezTahaF7gJe4cvDqp /kT3mW0S8e2Iq3PMdcE/ATayKhhUIWGyQ8ATVfXR6ustwnkeRK7EpnlpoZjql9USzkjl 2CpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=vyo9VrBafF2/XmgcnAx1PnKFxD5BxN7IUGi8ulG5hZY=; b=ZNXtlNh7byXzRTw9t5Xs7Tu/KU86qT0XJqs5RjIBtH9VRAMYSRL0QwY/ZDb6ZiFgA1 9TGIfi0nd0P70d7Nwm1D62je/012PA6VLSMhBPYyeyb5VnaUzyT7JrVk/DiEDAX+wqLo RRQEr9+Zcofo9bpr86gXRDTUv4Hbj9URCWCyHb/ge6p9XCFEd8LzjxM5mz1I3cNT/3k2 4da9xT3KiQjZ4Pn/Z7gSjZ6if9FP+kOSNec4a1amiDgtUoDFBi0F+4vyH4ioHRbUi7mY jVKSObvkiqkUgA6xagnNaFQaz0icV6AkdpI5RTElAO/U2JHjuP2euCepJAEg4fM6ssQs pCsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id u12si18413600pfh.256.2019.07.08.07.42.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jul 2019 07:42:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C1108994D; Mon, 8 Jul 2019 14:42:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 117D18994D; Mon, 8 Jul 2019 14:42:13 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MWiYo-1hzqv148xk-00X1Le; Mon, 08 Jul 2019 16:42:08 +0200 From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6n?= =?utf-8?q?ig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH 1/2] amdgpu: make pmu support optional Date: Mon, 8 Jul 2019 16:41:43 +0200 Message-Id: <20190708144205.2770771-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:TL1q7iyD5PpIZrvVCvrRvHAEqENf6QOhISgByGYYJX9jV/rf/xg M406DVe1lGcgSljrSAf61pEusIKkC3qSIQ+fLZSMbU3brdrpcG2nHgEwYkia6rDBUCq2ZdZ Ag8tQzIQs5OwrZE2DI7ZuF7dvJosR20rVcUecDsFwHtc/2KjOzZCJ7I9hVY7OkhpKGBqGat A1j3Rt2ErvZmbhjIQ4x+g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:lnFTjrpE41c=:9mQYtLxFcpzQV2qFm/8yIE SoJ/ip22hyZDDdbyqQRhP1ar5J85GrRy0ziq8mkxbDL6ImsU+PRvY7t2xMVKx/rwh1XyU94de jbLARyZH1ZtsMfRLZkRR5soBdlxdutLlFwwOGzoz4+dTivWjZinLfkdzHHht3wBtlG9UTL9fx R+lDMHwCBjULSVCwQA8ok0YBWjywIs9uJDnrcu9k7+7JKXNWqbiTDOFgDiUYOVZ9dy8PjkVnT lquSTfbKQOf4desKeysg/LijtPf6zgJgGFAj20D3FUGSKMrEt79X7YbQeYHKALF0S7i7pyMGG Azboq2UifUADzZOy/SqwCm5gAZ6OnsSNxDvYvNLB9EXNH2X5TR7rHq47HecfTvRh+02LOBoaA Ns6LI8KM7pnmYn2nMCATam+RFzvUbkh5VpOc874UZEvvmJ7mY/y1Yco9ZfZ4K33wIYpYdMU2Z M54SC6ZNmKKtY6i6ARl1I1ahJl4jq9NoGiC9uCAN+gQK/QRvDakzR/kK/Xw2rGXOueiT3ME1H maqnFEa4jdvcSoU5Ql83Y9R/HCkrRQInX2yjnb3NDPKg7yLdMCZDOuPikOO7+lJzc77BgR9/X 8FFwGxKCtdu6wMVEFKVnpGq5c9/Ddi152/IFttm742ujmFIRR7sFzDTCUIvIVEaTbP/mHjpIu N1BT3MKSASMJiYypWubm5ww5IKJj7yu6E6eoK4NgYLsrXiFoblrf+v2a6ToGTFzvNK/spe5hR IN2J/smOH2L/OpQ/5IZ2wa98hRbURz8AeGrGpQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jack Xiao , Jonathan Kim , Arnd Bergmann , Felix Kuehling , xinhui pan , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Emily Deng , Huang Rui , dri-devel@lists.freedesktop.org, Evan Quan , Hawking Zhang , Rex Zhu , Xiaojie Yuan Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When CONFIG_PERF_EVENTS is disabled, we cannot compile the pmu portion of the amdgpu driver: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:48:38: error: no member named 'hw' in 'struct perf_event' struct hw_perf_event *hwc = &event->hw; ~~~~~ ^ drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:51:13: error: no member named 'attr' in 'struct perf_event' if (event->attr.type != event->pmu->type) ~~~~~ ^ ... Use conditional compilation for this file. Fixes: 9c7c85f7ea1f ("drm/amdgpu: add pmu counters") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/Makefile | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index 3a15a46b4ecb..3f5329906fce 100644 --- a/drivers/gpu/drm/amd/amdgpu/Makefile +++ b/drivers/gpu/drm/amd/amdgpu/Makefile @@ -54,7 +54,9 @@ amdgpu-y += amdgpu_device.o amdgpu_kms.o \ amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \ amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o amdgpu_ids.o \ amdgpu_gmc.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \ - amdgpu_vm_sdma.o amdgpu_pmu.o amdgpu_discovery.o + amdgpu_vm_sdma.o amdgpu_discovery.o + +amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o # add asic specific block amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \ diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 30989b455047..a02ccce7bf53 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2816,7 +2816,8 @@ int amdgpu_device_init(struct amdgpu_device *adev, return r; } - r = amdgpu_pmu_init(adev); + if (IS_ENABLED(CONFIG_PERF_EVENTS)) + r = amdgpu_pmu_init(adev); if (r) dev_err(adev->dev, "amdgpu_pmu_init failed\n"); @@ -2888,7 +2889,8 @@ void amdgpu_device_fini(struct amdgpu_device *adev) amdgpu_debugfs_regs_cleanup(adev); device_remove_file(adev->dev, &dev_attr_pcie_replay_count); amdgpu_ucode_sysfs_fini(adev); - amdgpu_pmu_fini(adev); + if (IS_ENABLED(CONFIG_PERF_EVENTS)) + amdgpu_pmu_fini(adev); amdgpu_debugfs_preempt_cleanup(adev); if (amdgpu_discovery) amdgpu_discovery_fini(adev); From patchwork Mon Jul 8 14:41:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168661 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp7255324ilk; Mon, 8 Jul 2019 07:42:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYI8xrkkOeS6lBQxRBrocQE2ueYF0/6pnbUoY6qbUgdrn8BpqBNFKyHuM2iBAr0RMpIR7o X-Received: by 2002:a17:902:f213:: with SMTP id gn19mr26064205plb.35.1562596964580; Mon, 08 Jul 2019 07:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562596964; cv=none; d=google.com; s=arc-20160816; b=tvlsBf3DZ4G8ufXsMfUW0ibGzMuphafAVrm8B6P5o1wYk8Pq38QzndGGBtOkplANzU K89kX7ksWmPxEekle2L/0IeHZQRHNGrETcl7YsnVp4pwDlXZkUSyLuffqZ4lJlwbii1t dOj1eqwFf+3wPtWez+ytD8VaChqiMZPbkVykRjeKnmkkwRCQlAixGYX0Rpeh/NoXC7rW 6jZcnViiBUMsPQKW7SlnCAxFQzZWGiVkq37U0/PAS8SygAuKiQLyKOWVFOgyVG98T5g4 phYkuoIfdJPIOfIVOUJf7sXvkM6xO/d2NN0s8zJ4fnIyFq0tMyXu/jw5YN9PGb0bor7Z FiJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=qAOckvnoBWbGv1LgbgjOCA+yolWEtJ9fUxzO0nMRzug=; b=idqFkiQHwuQI1dZ5/6G0/fyuhdMl8PsUQ3F9l13XDbpE6siEfC0SuUxs4Ow7FVooRO 3aRmue0E3ctgBWd0U2j1Oz4SlEEVgnGnoZQY9Xnv/hZTrCWI1Hei4BVAyVTFMxqghKhe hIo15jXlk9Sq6X+UchR7m21cA7UW4uiQq5eQuk1BmkyJUnHPvX8mCZez2jdp3Hm0SN3n uPW2UHIOl5VKK6tMNx2eYOVF+4yh9Hf13cjwnpt4rvKY+Nco1tFZWWxjVOYWPvxtuXj5 jO0lqgB5Taq5PBKE44SlwxKm03PSE6ffsS6UIJ8PJtdCZIM7j+dCn4iAhoK9NpL9mUbo nkLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id c11si18376505pjq.0.2019.07.08.07.42.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jul 2019 07:42:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9706C89E1B; Mon, 8 Jul 2019 14:42:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id ED28889E2B; Mon, 8 Jul 2019 14:42:41 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MLz3X-1i1kiV3kq9-00HvJD; Mon, 08 Jul 2019 16:42:31 +0200 From: Arnd Bergmann To: Alex Deucher , =?utf-8?q?Christian_K=C3=B6n?= =?utf-8?q?ig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , Oded Gabbay Subject: [PATCH 2/2] amdgpu: make SOC15/navi support conditional Date: Mon, 8 Jul 2019 16:41:44 +0200 Message-Id: <20190708144205.2770771-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190708144205.2770771-1-arnd@arndb.de> References: <20190708144205.2770771-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:/qqa7xAUEYcyvnYV1MGx8PARrNuy+ZJAsk4UGuBiFcxWXLI+pc2 Ha+zmE2ZtaxCj70hCUcR8y1t3xac09TTPTReN4vPu5hurpTGSWfaYsyw8YrAOdkesYhpv4T CzrtsVY/egDEoJaz8Z8/v0j9lvrIfq1PHf39yQeL5KRj8+K7ayKCG7YlcWbMqulFYUousQx 2HxZwCJjhkthSEC6y/Q7Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:p9TalNiSPJQ=:JBe2OadY2KhV1ciUCC9+mL Kij/NSnJxMJVvJ8KWSD0Zh0IwQmw/RpUoCPgZPKVoNW9Ze6sxXEY8tWd7uh9OrpcCErP5KbEr 5EGLySNZ+3WvLY9sVNQKWUcxNgZUGJmKjudOcfwjP8LzWa7CF6X1WsT7gyi3udC73fgG5ki5R Xdz46PzGykNMXP5hNFnca08mUD0IERRKdQLe5xUjAbeehuHfJxwUc61KC4eOh+t4GXaliye+N BzbHg4IlPuMpCKMhhos+O9VCa/3WnCfQo0HHygHdm0TOxYPqSTM1oxgogleO0ikXU/PUMON0X jj2RaDmIwt5H9qZUXzBVuVCNjDTM/7ycVqyWgSarBkvbG9kukFKm8eA+1Jg9arMLfSW791/uU E/IBdZYKNGsPoPo1hk+13mlXrVD7WmsHdQUkKzaz2Xf9XTOlCD23pbLkYgRLEaEO/PtMjGn7m NxqV+P2QpFqNhJXke0H7OWzaJfgYMKlWxPvCcRwchZRFmpZY4ylFeEt7jPZzFNa1+b50pctef vIsOi+Un1nQVVGyFCANfQKG29oCUaVsl9KgdCqG5GqJO30szQ3B9aFZJcs72kdO1p2xHVFV4C GfdfIxJY1LQSs+lZ+3PmB9KfqgmzRoRosaFIwRY7Qw0Z6jUtn1aX5JPWhFAm8nQWsjhc1MOq1 gw4fLrQuvZccmg08i/BzU7Nml/7GQPF1vYRHWlPcl9ILRl+w4VXLiu7LpjgVCni8zCy7A7f2B viJCn0j4RPcjFxrs5rGUrwnsrchAyM+MQ/N8oA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Philip Yang , Jack Xiao , Evan Quan , Arnd Bergmann , Yong Zhao , Amber Lin , Feifei Xu , Felix Kuehling , xinhui pan , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Emily Deng , Huang Rui , dri-devel@lists.freedesktop.org, Rex Zhu , Thomas Gleixner , Shaoyun Liu , Oak Zeng , Hawking Zhang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Enabling amdgpu but not CONFIG_DRM_AMD_DC leads to a warning: drivers/gpu/drm/amd/amdgpu/nv.c: In function 'nv_set_ip_blocks': drivers/gpu/drm/amd/amdgpu/nv.c:400:3: error: #warning "Enable CONFIG_DRM_AMD_DC for display support on navi." [-Werror=cpp] # warning "Enable CONFIG_DRM_AMD_DC for display support on navi." ^~~~~~~ drivers/gpu/drm/amd/amdgpu/soc15.c: In function 'soc15_set_ip_blocks': drivers/gpu/drm/amd/amdgpu/soc15.c:653:3: error: #warning "Enable CONFIG_DRM_AMD_DC for display support on SOC15." [-Werror=cpp] However, CONFIG_DRM_AMD_DC can only be enabled on x86, so we cannot do that when building for other architectures. Add another Kconfig symbol to handle the SOC15 and navi, making sure that we implicitly enable DC. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/amdgpu/Kconfig | 7 +++++ drivers/gpu/drm/amd/amdgpu/Makefile | 32 +++++++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index a04f2fc7bf37..d7186dd88dbc 100644 --- a/drivers/gpu/drm/amd/amdgpu/Kconfig +++ b/drivers/gpu/drm/amd/amdgpu/Kconfig @@ -24,6 +24,13 @@ config DRM_AMDGPU_CIK radeon.cik_support=0 amdgpu.cik_support=1 +config DRM_AMDGPU_SOC15 + bool "Enable amdgpu support for SOC15 parts" + depends on DRM_AMDGPU + select DRM_AMD_DC + help + Choose this option if you want to enable support for SOC15 asics. + config DRM_AMDGPU_USERPTR bool "Always enable userptr write support" depends on DRM_AMDGPU diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index 3f5329906fce..e95ae468eaa1 100644 --- a/drivers/gpu/drm/amd/amdgpu/Makefile +++ b/drivers/gpu/drm/amd/amdgpu/Makefile @@ -64,9 +64,10 @@ amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \ amdgpu-$(CONFIG_DRM_AMDGPU_SI)+= si.o gmc_v6_0.o gfx_v6_0.o si_ih.o si_dma.o dce_v6_0.o si_dpm.o si_smc.o -amdgpu-y += \ - vi.o mxgpu_vi.o nbio_v6_1.o soc15.o emu_soc.o mxgpu_ai.o nbio_v7_0.o vega10_reg_init.o \ - vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o navi10_reg_init.o navi14_reg_init.o +amdgpu-y += vi.o mxgpu_vi.o emu_soc.o nbio_v7_4.o + +amdgpu-$(CONFIG_DRM_AMDGPU_SOC15) += gmc_v9_0.o nbio_v6_1.o soc15.o mxgpu_ai.o nbio_v7_0.o \ + vega10_reg_init.o vega20_reg_init.o nbio_v2_3.o nv.o navi10_reg_init.o navi14_reg_init.o # add DF block amdgpu-y += \ @@ -77,7 +78,10 @@ amdgpu-y += \ amdgpu-y += \ gmc_v7_0.o \ gmc_v8_0.o \ - gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o gfxhub_v1_1.o \ + gfxhub_v1_0.o mmhub_v1_0.o gfxhub_v1_1.o + +amdgpu-$(CONFIG_DRM_AMDGPU_SOC15) += \ + gmc_v9_0.o \ gfxhub_v2_0.o mmhub_v2_0.o gmc_v10_0.o # add IH block @@ -86,7 +90,9 @@ amdgpu-y += \ amdgpu_ih.o \ iceland_ih.o \ tonga_ih.o \ - cz_ih.o \ + cz_ih.o + +amdgpu-$(CONFIG_DRM_AMDGPU_SOC15) += \ vega10_ih.o \ navi10_ih.o @@ -111,7 +117,9 @@ amdgpu-y += \ amdgpu-y += \ amdgpu_gfx.o \ amdgpu_rlc.o \ - gfx_v8_0.o \ + gfx_v8_0.o + +amdgpu-$(CONFIG_DRM_AMDGPU_SOC15) += \ gfx_v9_0.o \ gfx_v10_0.o @@ -119,12 +127,14 @@ amdgpu-y += \ amdgpu-y += \ amdgpu_sdma.o \ sdma_v2_4.o \ - sdma_v3_0.o \ + sdma_v3_0.o + +amdgpu-$(CONFIG_DRM_AMDGPU_SOC15) += \ sdma_v4_0.o \ sdma_v5_0.o # add MES block -amdgpu-y += \ +amdgpu-$(CONFIG_DRM_AMDGPU_SOC15) += \ mes_v10_1.o # add UVD block @@ -161,8 +171,10 @@ amdgpu-y += \ amdgpu_amdkfd_fence.o \ amdgpu_amdkfd_gpuvm.o \ amdgpu_amdkfd_gfx_v8.o \ - amdgpu_amdkfd_gfx_v9.o \ - amdgpu_amdkfd_gfx_v10.o + +amdgpu-$(CONFIG_DRM_AMDGPU_SOC15) += \ + amdgpu_amdkfd_gfx_v9.o \ + amdgpu_amdkfd_gfx_v10.o ifneq ($(CONFIG_DRM_AMDGPU_CIK),) amdgpu-y += amdgpu_amdkfd_gfx_v7.o diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index 9fa4f25a3745..101d806ff996 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -81,6 +81,7 @@ void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev) case CHIP_VEGAM: kfd2kgd = amdgpu_amdkfd_gfx_8_0_get_functions(); break; +#ifdef CONFIG_DRM_AMDGPU_SOC15 case CHIP_VEGA10: case CHIP_VEGA12: case CHIP_VEGA20: @@ -90,6 +91,7 @@ void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev) case CHIP_NAVI10: kfd2kgd = amdgpu_amdkfd_gfx_10_0_get_functions(); break; +#endif default: dev_info(adev->dev, "kfd not supported on this ASIC\n"); return; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a02ccce7bf53..2a6447febcb0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1530,6 +1530,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev) return r; break; #endif +#ifdef CONFIG_DRM_AMDGPU_SOC15 case CHIP_VEGA10: case CHIP_VEGA12: case CHIP_VEGA20: @@ -1551,6 +1552,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev) if (r) return r; break; +#endif default: /* FIXME: not supported yet */ return -EINVAL;