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 Stash the ring status pa...



details:   https://anonhg.NetBSD.org/src/rev/0ba9f45691ac
branches:  trunk
changeset: 835040:0ba9f45691ac
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:24:12 2018 +0000

description:
Stash the ring status page somewhere more convenient.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c        |  7 ++++---
 sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.h |  3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r b96e2044151c -r 0ba9f45691ac sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c   Mon Aug 27 07:24:01 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_lrc.c   Mon Aug 27 07:24:12 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_lrc.c,v 1.4 2018/08/27 07:24:01 riastradh Exp $  */
+/*     $NetBSD: intel_lrc.c,v 1.5 2018/08/27 07:24:12 riastradh Exp $  */
 
 /*
  * Copyright © 2014 Intel Corporation
@@ -135,7 +135,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_lrc.c,v 1.4 2018/08/27 07:24:01 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_lrc.c,v 1.5 2018/08/27 07:24:12 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include <drm/i915_drm.h>
@@ -1923,7 +1923,7 @@
        i915_gem_batch_pool_fini(&ring->batch_pool);
 
        if (ring->status_page.obj) {
-               kunmap(sg_page(ring->status_page.obj->pages->sgl));
+               kunmap(ring->status_page.page);
                ring->status_page.obj = NULL;
        }
 
@@ -2450,6 +2450,7 @@
        ring->status_page.gfx_addr = i915_gem_obj_ggtt_offset(default_ctx_obj)
                        + LRC_PPHWSP_PN * PAGE_SIZE;
        page = i915_gem_object_get_page(default_ctx_obj, LRC_PPHWSP_PN);
+       ring->status_page.page = page;
        ring->status_page.page_addr = kmap(page);
        ring->status_page.obj = default_ctx_obj;
 
diff -r b96e2044151c -r 0ba9f45691ac sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.h
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.h    Mon Aug 27 07:24:01 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.h    Mon Aug 27 07:24:12 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_ringbuffer.h,v 1.5 2018/08/27 04:58:24 riastradh Exp $   */
+/*     $NetBSD: intel_ringbuffer.h,v 1.6 2018/08/27 07:24:12 riastradh Exp $   */
 
 #ifndef _INTEL_RINGBUFFER_H_
 #define _INTEL_RINGBUFFER_H_
@@ -29,6 +29,7 @@
 #define I915_RING_FREE_SPACE 64
 
 struct  intel_hw_status_page {
+       struct page     *page;
        u32             *page_addr;
        unsigned int    gfx_addr;
        struct          drm_i915_gem_object *obj;



Home | Main Index | Thread Index | Old Index