intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: ankitprasad.r.sharma@intel.com
To: intel-gfx@lists.freedesktop.org
Cc: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>,
	akash.goel@intel.com, shashidhar.hiremath@intel.com
Subject: [PATCH 1/8] drm/i915: Allow use of get_dma_address for stolen backed objects
Date: Tue, 15 Dec 2015 16:26:01 +0530	[thread overview]
Message-ID: <1450176968-22110-2-git-send-email-ankitprasad.r.sharma@intel.com> (raw)
In-Reply-To: <1450176968-22110-1-git-send-email-ankitprasad.r.sharma@intel.com>

From: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>

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>
---
 drivers/gpu/drm/i915/i915_gem_stolen.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
index 598ed2f..5384767 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;
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-12-15 11:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 10:56 [PATCH v12 0/8] Support for creating/using Stolen memory backed objects ankitprasad.r.sharma
2015-12-15 10:56 ` ankitprasad.r.sharma [this message]
2015-12-15 10:56 ` [PATCH 2/8] drm/i915: Use insert_page for pwrite_fast ankitprasad.r.sharma
2015-12-15 15:10   ` kbuild test robot
2015-12-15 10:56 ` [PATCH 3/8] drm/i915: Clearing buffer objects via CPU/GTT ankitprasad.r.sharma
2015-12-15 11:48   ` Chris Wilson
2015-12-15 10:56 ` [PATCH 4/8] drm/i915: Support for creating Stolen memory backed objects ankitprasad.r.sharma
2015-12-15 10:56 ` [PATCH 5/8] drm/i915: Propagating correct error codes to the userspace ankitprasad.r.sharma
2015-12-15 10:56 ` [PATCH 6/8] drm/i915: Add support for stealing purgable stolen pages ankitprasad.r.sharma
2015-12-15 11:59   ` Chris Wilson
2015-12-15 10:56 ` [PATCH 7/8] drm/i915: Support for pread/pwrite from/to non shmem backed objects ankitprasad.r.sharma
2015-12-15 12:03   ` Chris Wilson
2015-12-15 10:56 ` [PATCH 8/8] drm/i915: Migrate stolen objects before hibernation ankitprasad.r.sharma
2015-12-15 11:46   ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450176968-22110-2-git-send-email-ankitprasad.r.sharma@intel.com \
    --to=ankitprasad.r.sharma@intel.com \
    --cc=akash.goel@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=shashidhar.hiremath@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).