Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915/gem i915: Use i915_gem_o...



details:   https://anonhg.NetBSD.org/src/rev/18a7cdc6d8a5
branches:  trunk
changeset: 1028859:18a7cdc6d8a5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:13:31 2021 +0000

description:
i915: Use i915_gem_object_has_pages, not a simple null test.

The pages pointer may be ERR_PTR(-EWHATEVER) instead of null.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r cd9d35eca9b6 -r 18a7cdc6d8a5 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c   Sun Dec 19 12:13:23 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c   Sun Dec 19 12:13:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_mman.c,v 1.19 2021/12/19 12:10:06 riastradh Exp $     */
+/*     $NetBSD: i915_gem_mman.c,v 1.20 2021/12/19 12:13:31 riastradh Exp $     */
 
 /*
  * SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_mman.c,v 1.19 2021/12/19 12:10:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_mman.c,v 1.20 2021/12/19 12:13:31 riastradh Exp $");
 
 #include <linux/anon_inodes.h>
 #include <linux/mman.h>
@@ -717,7 +717,7 @@
        struct vm_page *vm_page;
        unsigned i;
 
-       if (obj->mm.pages == NULL)
+       if (!i915_gem_object_has_pages(obj))
                return;
        for (i = 0; i < obj->base.size >> PAGE_SHIFT; i++) {
                page = obj->mm.pages->sgl->sg_pgs[i];



Home | Main Index | Thread Index | Old Index