Skip to content

Commit 22d4d7e

Browse files
Michel Dänzersashalevin
authored andcommitted
drm/radeon: Don't try to enable write-combining without PAT
commit a53fa43 upstream. Doing so can cause things to become slow. Print a warning at compile time and an informative message at runtime in that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88758 Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
1 parent c5131a9 commit 22d4d7e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎drivers/gpu/drm/radeon/radeon_object.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,18 @@ int radeon_bo_create(struct radeon_device *rdev,
218218
* See https://bugs.freedesktop.org/show_bug.cgi?id=84627
219219
*/
220220
bo->flags &= ~RADEON_GEM_GTT_WC;
221+
#elif defined(CONFIG_X86) && !defined(CONFIG_X86_PAT)
222+
/* Don't try to enable write-combining when it can't work, or things
223+
* may be slow
224+
* See https://bugs.freedesktop.org/show_bug.cgi?id=88758
225+
*/
226+
227+
#warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \
228+
thanks to write-combining
229+
230+
DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "
231+
"better performance thanks to write-combining\n");
232+
bo->flags &= ~RADEON_GEM_GTT_WC;
221233
#endif
222234

223235
radeon_ttm_placement_from_domain(bo, domain);

0 commit comments

Comments
 (0)