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 Explain why i915_gem_rel...



details:   https://anonhg.NetBSD.org/src/rev/fb782fdeb3a0
branches:  trunk
changeset: 330647:fb782fdeb3a0
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 16 21:48:53 2014 +0000

description:
Explain why i915_gem_release_mmap is broken.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c |  18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r 236f84b43738 -r fb782fdeb3a0 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c    Wed Jul 16 21:28:50 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c    Wed Jul 16 21:48:53 2014 +0000
@@ -2140,6 +2140,24 @@
                mutex_enter(obj->base.gemo_shm_uao->vmobjlock);
                KASSERT(obj->pages != NULL);
                /* Force a fresh fault for each page.  */
+               /*
+                * XXX OOPS!  This doesn't actually do what we want.
+                * This causes a fresh fault for access to the backing
+                * pages -- but nothing accesses the backing pages
+                * directly!  What is actually entered into CPU page
+                * table entries is aperture addresses which have been
+                * programmed by the GTT to refer to those backing
+                * pages.
+                *
+                * We need to clear those page table entries, but
+                * there's no good way to do that at the moment: nobody
+                * records for us a map from either uvm objects or
+                * physical device addresses to a list of all virtual
+                * pages where they have been mapped.  pmap(9) records
+                * a map only from physical RAM addresses to virtual
+                * pages; it does nothing for physical device
+                * addresses.
+                */
                TAILQ_FOREACH(page, &obj->igo_pageq, pageq.queue)
                        pmap_page_protect(page, VM_PROT_NONE);
                mutex_exit(obj->base.gemo_shm_uao->vmobjlock);



Home | Main Index | Thread Index | Old Index