All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: make display pinning more flexible (v2)
@ 2022-12-07 16:21 Alex Deucher
  2022-12-07 17:50 ` Luben Tuikov
  2022-12-08  7:15 ` Christian König
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Deucher @ 2022-12-07 16:21 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

Only apply the static threshold for Stoney and Carrizo.
This hardware has certain requirements that don't allow
mixing of GTT and VRAM.  Newer asics do not have these
requirements so we should be able to be more flexible
with where buffers end up.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 919bbea2e3ac..2df55cc7e07f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -1506,7 +1506,8 @@ u64 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo *bo)
 uint32_t amdgpu_bo_get_preferred_domain(struct amdgpu_device *adev,
 					    uint32_t domain)
 {
-	if (domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) {
+	if ((domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) &&
+	    ((adev->asic_type == CHIP_CARRIZO) || (adev->asic_type == CHIP_STONEY))) {
 		domain = AMDGPU_GEM_DOMAIN_VRAM;
 		if (adev->gmc.real_vram_size <= AMDGPU_SG_THRESHOLD)
 			domain = AMDGPU_GEM_DOMAIN_GTT;
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: make display pinning more flexible (v2)
  2022-12-07 16:21 [PATCH] drm/amdgpu: make display pinning more flexible (v2) Alex Deucher
@ 2022-12-07 17:50 ` Luben Tuikov
  2022-12-08  7:15 ` Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Luben Tuikov @ 2022-12-07 17:50 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx

Acked-by: Luben Tuikov <luben.tuikov@amd.com>

Regards,
Luben

On 2022-12-07 11:21, Alex Deucher wrote:
> Only apply the static threshold for Stoney and Carrizo.
> This hardware has certain requirements that don't allow
> mixing of GTT and VRAM.  Newer asics do not have these
> requirements so we should be able to be more flexible
> with where buffers end up.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 919bbea2e3ac..2df55cc7e07f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -1506,7 +1506,8 @@ u64 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo *bo)
>  uint32_t amdgpu_bo_get_preferred_domain(struct amdgpu_device *adev,
>  					    uint32_t domain)
>  {
> -	if (domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) {
> +	if ((domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) &&
> +	    ((adev->asic_type == CHIP_CARRIZO) || (adev->asic_type == CHIP_STONEY))) {
>  		domain = AMDGPU_GEM_DOMAIN_VRAM;
>  		if (adev->gmc.real_vram_size <= AMDGPU_SG_THRESHOLD)
>  			domain = AMDGPU_GEM_DOMAIN_GTT;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: make display pinning more flexible (v2)
  2022-12-07 16:21 [PATCH] drm/amdgpu: make display pinning more flexible (v2) Alex Deucher
  2022-12-07 17:50 ` Luben Tuikov
@ 2022-12-08  7:15 ` Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2022-12-08  7:15 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx

Am 07.12.22 um 17:21 schrieb Alex Deucher:
> Only apply the static threshold for Stoney and Carrizo.
> This hardware has certain requirements that don't allow
> mixing of GTT and VRAM.  Newer asics do not have these
> requirements so we should be able to be more flexible
> with where buffers end up.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 919bbea2e3ac..2df55cc7e07f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -1506,7 +1506,8 @@ u64 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo *bo)
>   uint32_t amdgpu_bo_get_preferred_domain(struct amdgpu_device *adev,
>   					    uint32_t domain)
>   {
> -	if (domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) {
> +	if ((domain == (AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GTT)) &&
> +	    ((adev->asic_type == CHIP_CARRIZO) || (adev->asic_type == CHIP_STONEY))) {
>   		domain = AMDGPU_GEM_DOMAIN_VRAM;
>   		if (adev->gmc.real_vram_size <= AMDGPU_SG_THRESHOLD)
>   			domain = AMDGPU_GEM_DOMAIN_GTT;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-08  7:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07 16:21 [PATCH] drm/amdgpu: make display pinning more flexible (v2) Alex Deucher
2022-12-07 17:50 ` Luben Tuikov
2022-12-08  7:15 ` Christian König

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.