drm/amdgpu: Bring bo creation in line with radeon driver
Subsystems (2)
PATCH 1/1 drm/amdgpu: Bring bo creation in line with radeon driver
From d44ac1157fdb86e67822b6538ae6113c8d620412 Mon Sep 17 00:00:00 2001
From: Nils Holland <[email protected]>
Date: Sun, 22 Jan 2017 13:24:52 +0100
Subject: [PATCH] drm/amdgpu: Bring bo creation in line with radeon driver
Add the bo creation changes that have been done to the radeon driver in recent times, e.g. disable GTT WC on 32 bit because it is broken there, and also disable it generally (and print a warning message) when CONFIG_X86_PAT is not set.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +20 -0
@@ -363,11 +363,31 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev, bo->flags = flags; +#ifdef CONFIG_X86_32 +/* XXX: Write-combined CPU mappings of GTT seem broken on 32-bit +* See https://bugs.freedesktop.org/show_bug.cgi?id=84627 +*/ + bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC ; +#elif defined(CONFIG_X86 ) && !defined(CONFIG_X86_PAT ) +/* Don't try to enable write-combining when it can't work, or things +* may be slow +* See https://bugs.freedesktop.org/show_bug.cgi?id=88758 +*/ + +#warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \ + thanks to write-combining + + if (bo->flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC;) +DRM_INFO_ONCE ("Please enable CONFIG_MTRR and CONFIG_X86_PAT for " +"better performance thanks to write-combining\n" ); + bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC ; +#else /* For architectures that don't support WC memory, * mask out the WC flag from the BO */ if (!drm_arch_can_wc_memory ()) bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC ; +#endif amdgpu_fill_placement_to_bo (bo, placement);/* Kernel allocation are uninterruptible */
Signature · 6 lines
2.11.0 _______________________________________________ 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): 20170122191527.GA3125-iI9p2NPcQ/[email protected]
Michel Dänzer
Reviewed-byQuoted 11 lines · Nils Holland
From
d44ac1157fdb86e67822b6538ae6113c8d620412Mon Sep 17 00:00:00 2001
From: Nils Holland <[email protected]>
Date: Sun, 22 Jan 2017 13:24:52 +0100
Subject: [PATCH] drm/amdgpu: Bring bo creation in line with radeon driverAdd the bo creation changes that have been done to the radeon driver in recent times, e.g. disable GTT WC on 32 bit because it is broken there, and also disable it generally (and print a warning message) when
CONFIG_X86_PATis not set.Signed-off-by Nils Holland <[email protected]>
Looks great, thanks Nils!
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ 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): 854d801c-cf4d-9ea7-a23c-f2d3399dd270-otUistvHUpPR7s880joybQ@public.gmane.org
Christian König
Reviewed-byAm 23.01.2017 um 03:46 schrieb Michel Dänzer:
Quoted 11 lines · Nils Holland
Quoted 10 lines
From
d44ac1157fdb86e67822b6538ae6113c8d620412Mon Sep 17 00:00:00 2001
From: Nils Holland <[email protected]>
Date: Sun, 22 Jan 2017 13:24:52 +0100
Subject: [PATCH] drm/amdgpu: Bring bo creation in line with radeon driverAdd the bo creation changes that have been done to the radeon driver in recent times, e.g. disable GTT WC on 32 bit because it is broken there, and also disable it generally (and print a warning message) when
CONFIG_X86_PATis not set.
Quoted 4 lines
Quoted 1 line
Signed-off-by Nils Holland <[email protected]>Looks great, thanks Nils!
Reviewed-by Michel Dänzer <[email protected]>
_______________________________________________
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): 3632c484-020b-d494-4373-04032d305385-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Alex Deucher
AppliedQuoted 14 lines · Christian König
Am 23.01.2017 um 03:46 schrieb Michel Dänzer:
Quoted 13 lines · Nils Holland
Quoted 11 lines
From
d44ac1157fdb86e67822b6538ae6113c8d620412Mon Sep 17 00:00:00 2001
From: Nils Holland <[email protected]>
Date: Sun, 22 Jan 2017 13:24:52 +0100
Subject: [PATCH] drm/amdgpu: Bring bo creation in line with radeon driverAdd the bo creation changes that have been done to the radeon driver in recent times, e.g. disable GTT WC on 32 bit because it is broken there, and also disable it generally (and print a warning message) when
CONFIG_X86_PATis not set.
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Nils Holland <[email protected]>Looks great, thanks Nils!
Reviewed-by Michel Dänzer <[email protected]>Reviewed-by Christian König <[email protected]> as well.
Applied. thanks!
Alex
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx