瀏覽代碼

drm: fix issues with systems with no MTRR

On systems with no MTRR we should still define the interface.

Original bug from apkm.
Signed-off-by: Dave Airlie <airlied@linux.ie>
Dave Airlie 19 年之前
父節點
當前提交
9c7d462eda
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      drivers/char/drm/drmP.h

+ 14 - 0
drivers/char/drm/drmP.h

@@ -767,6 +767,20 @@ static inline int drm_mtrr_del(int handle, unsigned long offset,
 
 #else
 #define drm_core_has_MTRR(dev) (0)
+
+#define DRM_MTRR_WC		0
+
+static inline int drm_mtrr_add(unsigned long offset, unsigned long size,
+			       unsigned int flags)
+{
+	return 0;
+}
+
+static inline int drm_mtrr_del(int handle, unsigned long offset,
+			       unsigned long size, unsigned int flags)
+{
+	return 0;
+}
 #endif
 
 /******************************************************************/