diff options
author | Ankitprasad Sharma <ankitprasad.r.sharma@intel.com> | 2015-12-22 11:50:44 +0530 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-01-05 17:46:27 +0100 |
commit | c5236470feb59e357ce4d5fa58d26f0fbe432e54 (patch) | |
tree | 8181d53f241a866567c80629881cb28b746c7a75 /drivers/gpu/drm/i915/i915_gem_stolen.c | |
parent | c5d46ee20675379105bfd1ce422fe50169106e62 (diff) | |
download | op-kernel-dev-c5236470feb59e357ce4d5fa58d26f0fbe432e54.zip op-kernel-dev-c5236470feb59e357ce4d5fa58d26f0fbe432e54.tar.gz |
drm/i915: Allow use of get_dma_address for stolen backed objects
i915_gem_object_get_dma_address function is used to retrieve the dma address
of a particular page so as to map it in a given GTT entry for CPU access.
This function would be used for stolen backed objects also for tasks like
pwrite, clearing of the pages etc. So the obj->get_page.sg needs to be
initialized for the stolen objects also.
Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450765253-32104-2-git-send-email-ankitprasad.r.sharma@intel.com
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_stolen.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_stolen.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c index 3476877..c384dc9 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c @@ -569,6 +569,9 @@ _i915_gem_object_create_stolen(struct drm_device *dev, if (obj->pages == NULL) goto cleanup; + obj->get_page.sg = obj->pages->sgl; + obj->get_page.last = 0; + i915_gem_object_pin_pages(obj); obj->stolen = stolen; |