Skip to content

Commit 4b0e4e4

Browse files
airliedalexdeucher
authored andcommitted
drm: add helper to check for wc memory support
Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent ad32152 commit 4b0e4e4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎include/drm/drm_cache.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,13 @@
3535

3636
void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
3737

38+
static inline bool drm_arch_can_wc_memory(void)
39+
{
40+
#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE)
41+
return false;
42+
#else
43+
return true;
44+
#endif
45+
}
46+
3847
#endif

0 commit comments

Comments
 (0)