diff options
author | Dave Airlie <airlied@redhat.com> | 2016-01-30 07:59:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-03 15:07:21 -0800 |
commit | f4eb8334b571b1633b5df06cd56f2e665e8e19da (patch) | |
tree | 591a3844b37b29ab7a8749b3d8dd6c46c59de2b6 | |
parent | ac6f949bbbd922f5d16fea936522bef7663971ea (diff) | |
download | lwn-f4eb8334b571b1633b5df06cd56f2e665e8e19da.tar.gz lwn-f4eb8334b571b1633b5df06cd56f2e665e8e19da.zip |
drm: add helper to check for wc memory support
commit 4b0e4e4af6c6dc8354dcb72182d52c1bc55f12fc upstream.
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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | include/drm/drm_cache.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drm_cache.h b/include/drm/drm_cache.h index 7bfb063029d8..461a0558bca4 100644 --- a/include/drm/drm_cache.h +++ b/include/drm/drm_cache.h @@ -35,4 +35,13 @@ void drm_clflush_pages(struct page *pages[], unsigned long num_pages); +static inline bool drm_arch_can_wc_memory(void) +{ +#if defined(CONFIG_PPC) && !defined(CONFIG_NOT_COHERENT_CACHE) + return false; +#else + return true; +#endif +} + #endif |