Skip to content

Commit 82e9e49

Browse files
committed
amdgpu: add parameter to force write-combine memory
1 parent 72af394 commit 82e9e49

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

drivers/gpu/drm/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ menuconfig DRM
3131

3232
if DRM
3333

34+
config DRM_ARCH_CAN_WC
35+
bool "Force Architecture can write-combine memory"
36+
depends on DRM
37+
default n
38+
help
39+
Enables write-combining even if it is not enabled by default.
40+
Only use if the target systems support write-combining on
41+
the memory used by the graphics adapters.
42+
If in doubt, say 'N'
43+
3444
config DRM_MIPI_DBI
3545
tristate
3646
depends on DRM

include/drm/drm_cache.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ bool drm_need_swiotlb(int dma_bits);
4545

4646
static inline bool drm_arch_can_wc_memory(void)
4747
{
48+
#if defined(CONFIG_DRM_ARCH_CAN_WC)
49+
return true;
50+
#endif
4851
#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
4952
return false;
5053
#elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON64)

0 commit comments

Comments
 (0)