Module Name:    src
Committed By:   riastradh
Date:           Mon Aug 27 07:07:57 UTC 2018

Modified Files:
        src/sys/external/bsd/drm2/dist/drm/i915: i915_gem_execbuffer.c

Log Message:
Fix pointer arithmetic and include asm/cpufeature.h for cpu_has_clflush.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
    src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c:1.6 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c:1.7
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c:1.6	Mon Aug 27 04:58:23 2018
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem_execbuffer.c	Mon Aug 27 07:07:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: i915_gem_execbuffer.c,v 1.6 2018/08/27 04:58:23 riastradh Exp $	*/
+/*	$NetBSD: i915_gem_execbuffer.c,v 1.7 2018/08/27 07:07:56 riastradh Exp $	*/
 
 /*
  * Copyright © 2008,2010 Intel Corporation
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_execbuffer.c,v 1.6 2018/08/27 04:58:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_execbuffer.c,v 1.7 2018/08/27 07:07:56 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include <drm/i915_drm.h>
@@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: i915_gem_exe
 #include <linux/log2.h>
 #include <linux/pagemap.h>
 #include <linux/err.h>
+#include <asm/cpufeature.h>
 
 #define  __EXEC_OBJECT_HAS_PIN (1<<31)
 #define  __EXEC_OBJECT_HAS_FENCE (1<<30)
@@ -332,7 +333,8 @@ relocate_entry_gtt(struct drm_i915_gem_o
 	offset += reloc->offset;
 	reloc_page = io_mapping_map_atomic_wc(dev_priv->gtt.mappable,
 					      offset & PAGE_MASK);
-	iowrite32(lower_32_bits(delta), (char __iomem *)reloc_page + offset_in_page(offset));
+	iowrite32(lower_32_bits(delta), (uint32_t __iomem *)
+	    ((char __iomem *)reloc_page + offset_in_page(offset)));
 
 	if (INTEL_INFO(dev)->gen >= 8) {
 		offset += sizeof(uint32_t);

Reply via email to