drm/msm: support for an arbitrary number of address spaces

It means we have to do a list traversal where we once had an index into
a table.  But the list will normally have one or two entries.

Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
Rob Clark
2017-06-13 13:54:13 -04:00
parent f4839bd512
commit 4b85f7f5cf
2 changed files with 99 additions and 43 deletions

View File

@@ -39,6 +39,8 @@ struct msm_gem_address_space {
struct msm_gem_vma {
struct drm_mm_node node;
uint64_t iova;
struct msm_gem_address_space *aspace;
struct list_head list; /* node in msm_gem_object::vmas */
};
struct msm_gem_object {
@@ -78,7 +80,7 @@ struct msm_gem_object {
struct sg_table *sgt;
void *vaddr;
struct msm_gem_vma domain[NUM_DOMAINS];
struct list_head vmas; /* list of msm_gem_vma */
/* normally (resv == &_resv) except for imported bo's */
struct reservation_object *resv;