This series enables S/G for Picasso.
Subsystems (3)
v2 cover This series enables S/G for Picasso.
First patch fix a hard hang introduced by placing the display BO in GTT memory because of HW issues with cached mappings and the second patch enables S/G.
Andrey Grodzovsky (1):
drm/amdgpu: Fix hard hang for S/G display BOs.
Shirish S (1):
drm/amd: enable S/G for RAVEN chip
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 13 +++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 7 +++---- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 ++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1563906335-12949-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org
PATCH v2 1/2 drm/amdgpu: Fix hard hang for S/G display BOs.
HW requires for caching to be unset for scanout BO mappings when the BO placement is in GTT memory. Usually the flag to unset is passed from user mode but for FB mode this was missing.
v2:
Move all BO placemnt logic to amdgpu_display_supported_domains
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 7 +++---- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +3 -4
@@ -137,14 +137,14 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev, mode_cmd->pitches[0 ] =amdgpu_align_pitch (adev, mode_cmd->width, cpp, fb_tiled); domain =amdgpu_display_supported_domains (adev); - height =ALIGN (mode_cmd->height,8 ); size = mode_cmd->pitches[0 ] * height; aligned_size =ALIGN (size,PAGE_SIZE ); ret =amdgpu_gem_object_create (adev, aligned_size,0 , domain,AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | -AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS | -AMDGPU_GEM_CREATE_VRAM_CLEARED , +AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS | +AMDGPU_GEM_CREATE_VRAM_CLEARED | +AMDGPU_GEM_CREATE_CPU_GTT_USWC , ttm_bo_type_kernel,NULL , &gobj);if (ret) {pr_err ("failed to allocate framebuffer (%d)\n" , aligned_size);
@@ -166,7 +166,6 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,dev_err (adev->dev,"FB failed to set tiling flags\n" ); } - ret =amdgpu_bo_pin (abo, domain);if (ret) {amdgpu_bo_unreserve (abo);
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +2 -1
@@ -743,7 +743,8 @@ int amdgpu_mode_dumb_create(struct drm_file *file_priv,struct amdgpu_device *adev = dev->dev_private;struct drm_gem_object *gobj;uint32_t handle; -u64 flags =AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED ; +u64 flags =AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | +AMDGPU_GEM_CREATE_CPU_GTT_USWC ;u32 domain;int r;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH v2 2/2 drm/amd: enable S/G for RAVEN chip
In reply to a message not in the archiveFrom: Shirish S <[email protected]>
enables gpu_vm_support in dm and addsAMDGPU_GEM_DOMAIN_GTT as supported domain
v2:
Move BO placement logic into amdgpu_display_supported_domains
--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 13 +++++++++++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +11 -2
@@ -37,6 +37,7 @@#include <drm/drm_edid.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_fb_helper.h> +#include <drm/drm_cache.h> static void amdgpu_display_flip_callback (struct dma_fence *f,struct dma_fence_cb *cb)
@@ -498,8 +499,16 @@ uint32_t amdgpu_display_supported_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 && +/* +* if drm_arch_can_wc_memory returns false in amdgpu_bo_do_create +* AMDGPU_GEM_CREATE_CPU_GTT_USWC flag was unset meaning that USWC mappings +* is not supported for this board. But this mapping is required +* to avoid hang caused by placement of scanout BO in GTT on certain +* APUs. So force the BO placement to VRAM in case this architecture +* will not allow USWC mappings. +*/ +if (adev->asic_type >=CHIP_CARRIZO && adev->asic_type <=CHIP_RAVEN && + adev->flags &AMD_IS_APU &&drm_arch_can_wc_memory () &&amdgpu_device_asic_has_dc_support (adev->asic_type)) domain |=AMDGPU_GEM_DOMAIN_GTT ;#endif
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -686,7 +686,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)*/ if (adev->flags &AMD_IS_APU && adev->asic_type >=CHIP_CARRIZO && - adev->asic_type <CHIP_RAVEN ) + adev->asic_type <=CHIP_RAVEN ) init_data.flags.gpu_vm_support = true;if (amdgpu_dc_feature_mask &DC_FBC_MASK )
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1563906335-12949-3-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org
Re: [PATCH v2 2/2] drm/amd: enable S/G for RAVEN chip
Quoted 23 lines · Andrey Grodzovsky
From: Shirish S <[email protected]>
enables
gpu_vm_supportin dm and addsAMDGPU_GEM_DOMAIN_GTTas supported domainv2:
Move BO placement logic intoamdgpu_display_supported_domainsChange-Id If34300beaa60be2d36170b7b5b096ec644502b20Signed-off-by Shirish S <[email protected]>Signed-off-by Andrey Grodzovsky <[email protected]>---
[...]drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +3
-2@@ -498,8 +499,16 @@ uint32_t amdgpu_display_supported_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 && +/* +* if drm_arch_can_wc_memory returns false in amdgpu_bo_do_create +* AMDGPU_GEM_CREATE_CPU_GTT_USWC flag was unset meaning that USWC mappings
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev) · line 514
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +7
-0+* is not supported for this board. But this mapping is required +* to avoid hang caused by placement of scanout BO in GTT on certain +* APUs. So force the BO placement to VRAM in case this architecture +* will not allow USWC mappings. +*/ +if (adev->asic_type >=CHIP_CARRIZO && adev->asic_type <=CHIP_RAVEN && + adev->flags &AMD_IS_APU &&drm_arch_can_wc_memory () &&amdgpu_device_asic_has_dc_support (adev->asic_type)) domain |=AMDGPU_GEM_DOMAIN_GTT ;#endif
drm_arch_can_wc_memory() never returns false for an APU. However, it returning false isn't the only case where AMDGPU_GEM_CREATE_CPU_GTT_USWC can be cleared, see amdgpu_bo_do_create(). I suggest moving that logic into a separate helper function which can be used here as well.
Signature · 6 lines
Earthling Michel Dänzer | https://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Series is: Reviewed-by: Alex Deucher <[email protected]>
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Andrey Grodzovsky <[email protected]>
Sent: Tuesday, July 23, 2019 2:25 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Grodzovsky, Andrey <[email protected]>; Wu, Hersen <[email protected]>; Koenig, Christian <[email protected]>; S, Shirish <[email protected]>
Subject: [PATCH v2 0/2] This series enables S/G for Picasso.
First patch fix a hard hang introduced by placing the display BO in GTT memory because of HW issues with cached mappings and the second patch enables S/G.
Andrey Grodzovsky (1):
drm/amdgpu: Fix hard hang for S/G display BOs.
Shirish S (1):
drm/amd: enable S/G for RAVEN chip
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 13 +++++++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 7 +++---- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 ++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-)
--
2.7.4
_______________________________________________
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