28 lines
991 B
Diff
28 lines
991 B
Diff
|
--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-19 23:43:22.000000000 -0400
|
||
|
+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-19 23:52:07.000000000 -0400
|
||
|
@@ -3442,7 +3442,11 @@ int ATI_API_CALL KCL_MEM_MTRR_Support(vo
|
||
|
int ATI_API_CALL KCL_MEM_MTRR_AddRegionWc(unsigned long base, unsigned long size)
|
||
|
{
|
||
|
#ifdef CONFIG_MTRR
|
||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
|
||
|
+ return arch_phys_wc_add(base, size);
|
||
|
+#else
|
||
|
return mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
|
||
|
+#endif
|
||
|
#else /* !CONFIG_MTRR */
|
||
|
return -EPERM;
|
||
|
#endif /* !CONFIG_MTRR */
|
||
|
@@ -3451,7 +3455,12 @@ int ATI_API_CALL KCL_MEM_MTRR_AddRegionW
|
||
|
int ATI_API_CALL KCL_MEM_MTRR_DeleteRegion(int reg, unsigned long base, unsigned long size)
|
||
|
{
|
||
|
#ifdef CONFIG_MTRR
|
||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
|
||
|
+ arch_phys_wc_del(reg);
|
||
|
+ return reg;
|
||
|
+#else
|
||
|
return mtrr_del(reg, base, size);
|
||
|
+#endif
|
||
|
#else /* !CONFIG_MTRR */
|
||
|
return -EPERM;
|
||
|
#endif /* !CONFIG_MTRR */
|