diff options
author | Mark Kettenis <kettenis@openbsd.org> | 2013-08-08 23:50:08 +0200 |
---|---|---|
committer | Jonathan Gray <jsg@jsg.id.au> | 2013-08-12 10:47:32 +1000 |
commit | 06a6e3242ee56338700ecd5c3493b616ebfaeea2 (patch) | |
tree | 3e9fd659a09b4a94b65da8ec12457802e3056c2f /sys | |
parent | 705c5be5a429bf6a6bdfbd4942524a0b98d622b3 (diff) |
keep track of bound memory regions seperately from their address
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/ttm/ttm_agp_backend.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/ttm/ttm_agp_backend.c b/sys/dev/pci/drm/ttm/ttm_agp_backend.c index 5df6aaa028c..786506af366 100644 --- a/sys/dev/pci/drm/ttm/ttm_agp_backend.c +++ b/sys/dev/pci/drm/ttm/ttm_agp_backend.c @@ -39,7 +39,8 @@ struct ttm_agp_backend { struct ttm_tt ttm; - bus_addr_t bound; + int bound; + bus_addr_t addr; struct drm_agp_head *agp; }; @@ -69,8 +70,8 @@ ttm_agp_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem) } agp_flush_cache(); sc->sc_methods->flush_tlb(sc->sc_chipc); - agp_be->bound = sc->sc_apaddr + (node->start << PAGE_SHIFT); - KASSERT(agp_be->bound); + agp_be->addr = sc->sc_apaddr + (node->start << PAGE_SHIFT); + agp_be->bound = 1; return 0; } @@ -84,7 +85,7 @@ ttm_agp_unbind(struct ttm_tt *ttm) unsigned i; if (agp_be->bound) { - addr = agp_be->bound; + addr = agp_be->addr; for (i = 0; i < ttm->num_pages; i++) { sc->sc_methods->unbind_page(sc->sc_chipc, addr); addr += PAGE_SIZE; |