Skip to content

Commit a53fa43

Browse files
Michel Dänzeralexdeucher
authored andcommitted
drm/radeon: Don't try to enable write-combining without PAT
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 Cc: stable@vger.kernel.org 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>
1 parent 082452e commit a53fa43

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
@@ -238,6 +238,18 @@ int radeon_bo_create(struct radeon_device *rdev,
238238
* See https://bugs.freedesktop.org/show_bug.cgi?id=84627
239239
*/
240240
bo->flags &= ~RADEON_GEM_GTT_WC;
241+
#elif defined(CONFIG_X86) && !defined(CONFIG_X86_PAT)
242+
/* Don't try to enable write-combining when it can't work, or things
243+
* may be slow
244+
* See https://bugs.freedesktop.org/show_bug.cgi?id=88758
245+
*/
246+
247+
#warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \
248+
thanks to write-combining
249+
250+
DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "
251+
"better performance thanks to write-combining\n");
252+
bo->flags &= ~RADEON_GEM_GTT_WC;
241253
#endif
242254

243255
radeon_ttm_placement_from_domain(bo, domain);

0 commit comments

Comments
 (0)