Module Name: src Committed By: riastradh Date: Sun Dec 19 11:16:39 UTC 2021
Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_cmd_parser.c Log Message: NetBSD-ify clflush size Author: Maya Rashish <m...@netbsd.org> Committer: Taylor R Campbell <riastr...@netbsd.org> To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 \ src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.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_cmd_parser.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.24 src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.25 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c:1.24 Sun Dec 19 01:24:25 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c Sun Dec 19 11:16:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: i915_cmd_parser.c,v 1.24 2021/12/19 01:24:25 riastradh Exp $ */ +/* $NetBSD: i915_cmd_parser.c,v 1.25 2021/12/19 11:16:39 riastradh Exp $ */ /* * Copyright © 2013 Intel Corporation @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.24 2021/12/19 01:24:25 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.25 2021/12/19 11:16:39 riastradh Exp $"); #include "gt/intel_engine.h" @@ -1173,9 +1173,15 @@ static u32 *copy_batch(struct drm_i915_g * We don't care about copying too much here as we only * validate up to the end of the batch. */ - if (!(dst_obj->cache_coherent & I915_BO_CACHE_COHERENT_FOR_READ)) + if (!(dst_obj->cache_coherent & I915_BO_CACHE_COHERENT_FOR_READ)) { +#ifdef __NetBSD__ + length = round_up(length, + cpu_info_primary.ci_cflush_lsize); +#else length = round_up(length, boot_cpu_data.x86_clflush_size); +#endif + } ptr = dst; x = offset_in_page(offset);