From: <gregkh@linuxfoundation.org>
To: Alexander.Deucher@amd.com, alexander.deucher@amd.com,
amd-gfx@lists.freedesktop.org, christian.koenig@amd.com,
gregkh@linuxfoundation.org, luben.tuikov@amd.com,
mario.limonciello@amd.com
Cc: stable-commits@vger.kernel.org
Subject: Patch "drm/amdgpu: Remove unnecessary domain argument" has been added to the 6.1-stable tree
Date: Wed, 09 Aug 2023 11:09:44 +0200 [thread overview]
Message-ID: <2023080944-unfounded-outgrow-03c6@gregkh> (raw)
In-Reply-To: <20230808175055.3761-3-mario.limonciello@amd.com>
This is a note to let you know that I've just added the patch titled
drm/amdgpu: Remove unnecessary domain argument
to the 6.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-amdgpu-remove-unnecessary-domain-argument.patch
and it can be found in the queue-6.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From stable-owner@vger.kernel.org Tue Aug 8 20:31:33 2023
From: Mario Limonciello <mario.limonciello@amd.com>
Date: Tue, 8 Aug 2023 12:50:54 -0500
Subject: drm/amdgpu: Remove unnecessary domain argument
To: <stable@vger.kernel.org>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Message-ID: <20230808175055.3761-3-mario.limonciello@amd.com>
From: Luben Tuikov <luben.tuikov@amd.com>
commit 3273f11675ef11959d25a56df3279f712bcd41b7 upstream
Remove the "domain" argument to amdgpu_bo_create_kernel_at() since this
function takes an "offset" argument which is the offset off of VRAM, and as
such allocation always takes place in VRAM. Thus, the "domain" argument is
unnecessary.
Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: AMD Graphics <amd-gfx@lists.freedesktop.org>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 10 +++++-----
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 -------
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 -
4 files changed, 6 insertions(+), 14 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -347,17 +347,16 @@ int amdgpu_bo_create_kernel(struct amdgp
* @adev: amdgpu device object
* @offset: offset of the BO
* @size: size of the BO
- * @domain: where to place it
* @bo_ptr: used to initialize BOs in structures
* @cpu_addr: optional CPU address mapping
*
- * Creates a kernel BO at a specific offset in the address space of the domain.
+ * Creates a kernel BO at a specific offset in VRAM.
*
* Returns:
* 0 on success, negative error code otherwise.
*/
int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev,
- uint64_t offset, uint64_t size, uint32_t domain,
+ uint64_t offset, uint64_t size,
struct amdgpu_bo **bo_ptr, void **cpu_addr)
{
struct ttm_operation_ctx ctx = { false, false };
@@ -367,8 +366,9 @@ int amdgpu_bo_create_kernel_at(struct am
offset &= PAGE_MASK;
size = ALIGN(size, PAGE_SIZE);
- r = amdgpu_bo_create_reserved(adev, size, PAGE_SIZE, domain, bo_ptr,
- NULL, cpu_addr);
+ r = amdgpu_bo_create_reserved(adev, size, PAGE_SIZE,
+ AMDGPU_GEM_DOMAIN_VRAM, bo_ptr, NULL,
+ cpu_addr);
if (r)
return r;
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
@@ -284,7 +284,7 @@ int amdgpu_bo_create_kernel(struct amdgp
u32 domain, struct amdgpu_bo **bo_ptr,
u64 *gpu_addr, void **cpu_addr);
int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev,
- uint64_t offset, uint64_t size, uint32_t domain,
+ uint64_t offset, uint64_t size,
struct amdgpu_bo **bo_ptr, void **cpu_addr);
int amdgpu_bo_create_user(struct amdgpu_device *adev,
struct amdgpu_bo_param *bp,
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1575,7 +1575,6 @@ static int amdgpu_ttm_fw_reserve_vram_in
return amdgpu_bo_create_kernel_at(adev,
adev->mman.fw_vram_usage_start_offset,
adev->mman.fw_vram_usage_size,
- AMDGPU_GEM_DOMAIN_VRAM,
&adev->mman.fw_vram_usage_reserved_bo,
&adev->mman.fw_vram_usage_va);
}
@@ -1600,7 +1599,6 @@ static int amdgpu_ttm_drv_reserve_vram_i
return amdgpu_bo_create_kernel_at(adev,
adev->mman.drv_vram_usage_start_offset,
adev->mman.drv_vram_usage_size,
- AMDGPU_GEM_DOMAIN_VRAM,
&adev->mman.drv_vram_usage_reserved_bo,
NULL);
}
@@ -1681,7 +1679,6 @@ static int amdgpu_ttm_reserve_tmr(struct
ret = amdgpu_bo_create_kernel_at(adev,
ctx->c2p_train_data_offset,
ctx->train_data_size,
- AMDGPU_GEM_DOMAIN_VRAM,
&ctx->c2p_bo,
NULL);
if (ret) {
@@ -1695,7 +1692,6 @@ static int amdgpu_ttm_reserve_tmr(struct
ret = amdgpu_bo_create_kernel_at(adev,
adev->gmc.real_vram_size - adev->mman.discovery_tmr_size,
adev->mman.discovery_tmr_size,
- AMDGPU_GEM_DOMAIN_VRAM,
&adev->mman.discovery_memory,
NULL);
if (ret) {
@@ -1796,21 +1792,18 @@ int amdgpu_ttm_init(struct amdgpu_device
* avoid display artifacts while transitioning between pre-OS
* and driver. */
r = amdgpu_bo_create_kernel_at(adev, 0, adev->mman.stolen_vga_size,
- AMDGPU_GEM_DOMAIN_VRAM,
&adev->mman.stolen_vga_memory,
NULL);
if (r)
return r;
r = amdgpu_bo_create_kernel_at(adev, adev->mman.stolen_vga_size,
adev->mman.stolen_extended_size,
- AMDGPU_GEM_DOMAIN_VRAM,
&adev->mman.stolen_extended_memory,
NULL);
if (r)
return r;
r = amdgpu_bo_create_kernel_at(adev, adev->mman.stolen_reserved_offset,
adev->mman.stolen_reserved_size,
- AMDGPU_GEM_DOMAIN_VRAM,
&adev->mman.stolen_reserved_memory,
NULL);
if (r)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -391,7 +391,6 @@ static void amdgpu_virt_ras_reserve_bps(
*/
if (amdgpu_bo_create_kernel_at(adev, bp << AMDGPU_GPU_PAGE_SHIFT,
AMDGPU_GPU_PAGE_SIZE,
- AMDGPU_GEM_DOMAIN_VRAM,
&bo, NULL))
DRM_DEBUG("RAS WARN: reserve vram for retired page %llx fail\n", bp);
Patches currently in stable-queue which might be from stable-owner@vger.kernel.org are
queue-6.1/iommu-arm-smmu-v3-add-explicit-feature-for-nesting.patch
queue-6.1/drm-amdgpu-remove-unnecessary-domain-argument.patch
queue-6.1/iommu-arm-smmu-v3-document-mmu-700-erratum-2812531.patch
queue-6.1/iommu-arm-smmu-v3-document-nesting-related-errata.patch
queue-6.1/drm-amdgpu-use-apt-name-for-fw-reserved-region.patch
queue-6.1/drm-amdgpu-add-vram-reservation-based-on-vram_usagebyfirmware_v2_2.patch
queue-6.1/iommu-arm-smmu-v3-work-around-mmu-600-erratum-1076982.patch
next prev parent reply other threads:[~2023-08-09 12:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 17:50 [PATCH 6.1.y 0/3] Fix accessing IP discovery from debugfs Mario Limonciello
2023-08-08 17:50 ` [PATCH 6.1.y 1/3] drm/amdgpu: add vram reservation based on vram_usagebyfirmware_v2_2 Mario Limonciello
2023-08-08 17:50 ` [PATCH 6.1.y 2/3] drm/amdgpu: Remove unnecessary domain argument Mario Limonciello
2023-08-09 9:09 ` gregkh [this message]
2023-08-08 17:50 ` [PATCH 6.1.y 3/3] drm/amdgpu: Use apt name for FW reserved region Mario Limonciello
2023-08-09 9:09 ` [PATCH 6.1.y 0/3] Fix accessing IP discovery from debugfs Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2023080944-unfounded-outgrow-03c6@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Alexander.Deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=luben.tuikov@amd.com \
--cc=mario.limonciello@amd.com \
--cc=stable-commits@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.