Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2352839pxb; Mon, 20 Sep 2021 19:50:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmnIsHtJ+ZP4PvmZ5YWcn+wVQZ9j6x7ozfft+KC1sbR50c9uyf48UDyY3/fVC+4XSYoTxe X-Received: by 2002:aa7:cd41:: with SMTP id v1mr32726620edw.393.1632192622058; Mon, 20 Sep 2021 19:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192622; cv=none; d=google.com; s=arc-20160816; b=AF9aadiyWDdJzIzy4PM3k2vzBVTfc++/CZyOZ4ahRr63PgWgT4BuXrd/gh2mZsSFsF Q+TPtql3BcIErgZRPAZCnWADUtvGtbcV9IPvqqlQcBQ0nO3VMmptoIArWdDjwTSx4tBU Eshq+OkO3ieX/yMRXW6xRmWbxSbi1/qes9TRQ9jRON1MtmyEe+PNHHcPjy2KaHBv86qb VM2oocIkwAP7yC0zaHdx1+JIhKjhjOc3pOwMhYXCxDo8A/dbrujwlgAM075/DY4Xti/S rTBEZzYuoBo9KVEUomYLhDZbrMRAyzcrnM9SeUscbPvfh5LgNzokS2zza8m9uUHMdExt LHig== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nY76weauGKt1J7g2wenkWFXnBiXc2b9Rw+I8Ui6bMl0=; b=JCCBlR6krxj0txlu0HX0hEGjNVLFrPExNLcc2r1mEpKPY0JD8Vsgc+GDmEWP5Uf7Ci o71JrLj2N5uNtmoseGy2/gmfZw6W3Hi2RZDRTvzaawqsG/RoFmgWp+TtZ3o39DPL2ajv LHNA7FAnRReMMjswd2WZQ4RBsRhaEsB4rEn/8puu30zUVLnvL5YtjxZyoQjUcEvZ7awh NAg+skaIZAPQ4agudeGUFuC1UYImG4lknX50CRPblsGZnaJrvIu8HvFiBmECao5+y0HQ QbcRF0dI/nyWXz74rtjkD9rTP7vaD2LR6XuW9e9btjfG7yLf18QmPMYR46lwmg9bah+B ZYJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KyvI1t82; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m15si18113929ejn.484.2021.09.20.19.49.58; Mon, 20 Sep 2021 19:50:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KyvI1t82; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353630AbhITSlS (ORCPT + 99 others); Mon, 20 Sep 2021 14:41:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:53082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380655AbhITSg1 (ORCPT ); Mon, 20 Sep 2021 14:36:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D138063318; Mon, 20 Sep 2021 17:29:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158970; bh=VzkhfAzd0nfpuUZebesnToiQjgXAkm5q69+Q7WSNwgk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KyvI1t825dJ9tG70uQzHNmaxNaL/qCePT/f8znFUzSZQXvRTOc10seA8G2ieQzC0m rq6OnJN6o/ujE73rRch8ihKW5U5uD7gYUActB1owDUHXtxijspmXkozsNXrL2wkDSl UCh3ji/bYUybYfhchTeybxOdGBfCei0ssqVFOYCI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Zhu , Felix Kuehling , Alex Deucher Subject: [PATCH 5.14 017/168] drm/amdgpu: add amdgpu_amdkfd_resume_iommu Date: Mon, 20 Sep 2021 18:42:35 +0200 Message-Id: <20210920163922.212118654@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Zhu commit 8066008482e533e91934bee49765bf8b4a7c40db upstream. Add amdgpu_amdkfd_resume_iommu for amdgpu. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211277 Signed-off-by: James Zhu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 + 2 files changed, 11 insertions(+) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -191,6 +191,16 @@ void amdgpu_amdkfd_suspend(struct amdgpu kgd2kfd_suspend(adev->kfd.dev, run_pm); } +int amdgpu_amdkfd_resume_iommu(struct amdgpu_device *adev) +{ + int r = 0; + + if (adev->kfd.dev) + r = kgd2kfd_resume_iommu(adev->kfd.dev); + + return r; +} + int amdgpu_amdkfd_resume(struct amdgpu_device *adev, bool run_pm) { int r = 0; --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h @@ -137,6 +137,7 @@ int amdgpu_amdkfd_init(void); void amdgpu_amdkfd_fini(void); void amdgpu_amdkfd_suspend(struct amdgpu_device *adev, bool run_pm); +int amdgpu_amdkfd_resume_iommu(struct amdgpu_device *adev); int amdgpu_amdkfd_resume(struct amdgpu_device *adev, bool run_pm); void amdgpu_amdkfd_interrupt(struct amdgpu_device *adev, const void *ih_ring_entry);