Skip to contentSkip to conversation

drm/amdgpu: only allow scatter/gather display with DC

PATCH In review Alex Deucher 5 participants 5 messages Jan 12, 2018 – Jan 15, 2018 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: only allow scatter/gather display with DC

Check if DC is enabled before allowing scanout buffers to be pinned in system memory.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +4 -1
index 8ede2645a06c..859942552e9f 100644
@@ -507,9 +507,12 @@ uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)
 {
 	uint32_t domain = AMDGPU_GEM_DOMAIN_VRAM;
 
+#if defined(CONFIG_DRM_AMD_DC)
 	if (adev->asic_type >= CHIP_CARRIZO && adev->asic_type < CHIP_RAVEN &&
-	    adev->flags & AMD_IS_APU)
+	    adev->flags & AMD_IS_APU &&
+	    amdgpu_device_asic_has_dc_support(adev->asic_type))
 		domain |= AMDGPU_GEM_DOMAIN_GTT;
+#endif
 
 	return domain;
 }
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180112195811.15372-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 12.01.2018 um 20:58 schrieb Alex Deucher:

Quoted 4 lines

Check if DC is enabled before allowing scanout buffers to be pinned in system memory.

Quoted 12 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
index 8ede2645a06c..859942552e9f 100644
@@ -507,9 +507,12 @@ uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)
  {
  	uint32_t domain = AMDGPU_GEM_DOMAIN_VRAM;
 

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev) · line 518

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +4 -1
+#if defined(CONFIG_DRM_AMD_DC)
  	if (adev->asic_type >= CHIP_CARRIZO && adev->asic_type < CHIP_RAVEN &&
-	    adev->flags & AMD_IS_APU)
+	    adev->flags & AMD_IS_APU &&
+	    amdgpu_device_asic_has_dc_support(adev->asic_type))
  		domain |= AMDGPU_GEM_DOMAIN_GTT;
+#endif
 
  	return domain;
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): c10fed9d-fdd0-ff5e-7b3b-8cc9ffe809d2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw

Somehow my test case seems working although DC not enabled?

Regards,
Samuel Li

Quoted 40 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Christian König
Sent: Friday, January 12, 2018 4:03 PM
To: Alex Deucher <[email protected]>; amd- [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: only allow scatter/gather display with DC

Am 12.01.2018 um 20:58 schrieb Alex Deucher:

Quoted 4 lines

Check if DC is enabled before allowing scanout buffers to be pinned in system memory.

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
index 8ede2645a06c..859942552e9f 100644
@@ -507,9 +507,12 @@ uint32_t

amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -0
  {
  	uint32_t domain = AMDGPU_GEM_DOMAIN_VRAM;
 
+#if defined(CONFIG_DRM_AMD_DC)
  	if (adev->asic_type >= CHIP_CARRIZO && adev->asic_type <

CHIP_RAVEN &&

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +3 -1
-	    adev->flags & AMD_IS_APU)
+	    adev->flags & AMD_IS_APU &&
+	    amdgpu_device_asic_has_dc_support(adev->asic_type))
  		domain |= AMDGPU_GEM_DOMAIN_GTT;
+#endif
 
Quoted 7 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev) · line 518

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
  	return domain;
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BY1PR12MB0504B7C3435FCA8BD2887570F5170-PicGAnIBOoZIlHzfMOeg3gdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#6 lore raw

I think you are getting lucky with the pageflip buffers always ending up in vram. Also, the legacy dce code (e.g., dce_v11_0.c) always pins in vram for modesets.

Alex

________________________________
From: Li, Samuel
Sent: Friday, January 12, 2018 4:35 PM
To: Koenig, Christian; Alex Deucher; [email protected]
Cc: Deucher, Alexander
Subject: RE: [PATCH] drm/amdgpu: only allow scatter/gather display with DC

Somehow my test case seems working although DC not enabled?

Regards,
Samuel Li

Quoted 40 lines

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf Of Christian König
Sent: Friday, January 12, 2018 4:03 PM
To: Alex Deucher <[email protected]>; amd- [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: only allow scatter/gather display with DC

Am 12.01.2018 um 20:58 schrieb Alex Deucher:

Quoted 4 lines

Check if DC is enabled before allowing scanout buffers to be pinned in system memory.

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
index 8ede2645a06c..859942552e9f 100644
@@ -507,9 +507,12 @@ uint32_t

amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -0
  {
     uint32_t domain = AMDGPU_GEM_DOMAIN_VRAM;
 
+#if defined(CONFIG_DRM_AMD_DC)
     if (adev->asic_type >= CHIP_CARRIZO && adev->asic_type <

CHIP_RAVEN &&

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +3 -1
-       adev->flags & AMD_IS_APU)
+       adev->flags & AMD_IS_APU &&
+       amdgpu_device_asic_has_dc_support(adev->asic_type))
             domain |= AMDGPU_GEM_DOMAIN_GTT;
+#endif
 
Quoted 7 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev) · line 518

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
     return domain;
  }

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#7 lore raw
In reply to a message not in the archive
Quoted 4 lines · Alex Deucher

Check if DC is enabled before allowing scanout buffers to be pinned in system memory.

Harry

Quoted 13 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +0 -0
index 8ede2645a06c..859942552e9f 100644
@@ -507,9 +507,12 @@ uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)
 {
 	uint32_t domain = AMDGPU_GEM_DOMAIN_VRAM;
 

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev) · line 518

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +4 -1
+#if defined(CONFIG_DRM_AMD_DC)
 	if (adev->asic_type >= CHIP_CARRIZO && adev->asic_type < CHIP_RAVEN &&
-	    adev->flags & AMD_IS_APU)
+	    adev->flags & AMD_IS_APU &&
+	    amdgpu_device_asic_has_dc_support(adev->asic_type))
 		domain |= AMDGPU_GEM_DOMAIN_GTT;
+#endif
 
 	return domain;
 }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx