All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 4/5] drm/i915: Add a partial GGTT view type
Date: Tue, 28 Apr 2015 09:38:15 +0100	[thread overview]
Message-ID: <553F46F7.4040707@linux.intel.com> (raw)
In-Reply-To: <553E4C9C.8070504@linux.intel.com>


On 04/27/2015 03:50 PM, Tvrtko Ursulin wrote:
>> +    for_each_sg_page(obj->pages->sgl, &obj_sg_iter, obj->pages->nents,
>> +        view->params.partial.offset)
>> +    {
>> +        if (st->nents >= view->params.partial.size)
>> +            break;
>> +
>> +        sg_set_page(sg, NULL, PAGE_SIZE, 0);
>> +        sg_dma_address(sg) = sg_page_iter_dma_address(&obj_sg_iter);
>> +        sg_dma_len(sg) = PAGE_SIZE;
>> +
>> +        sg = sg_next(sg);
>> +        st->nents++;
>> +    }
>
> I suppose in this case (as opposed to rotated view) using
> sg_alloc_table_from_pages() could produce a more compact table. With the
> caveat of that it doesn't always work (see
> i915_gem_userptr.c/st_set_pages).
>
> So maybe promote to driver public st_set_pages and call in on an array
> of pages?

Scratch this, on second thought it makes no sense.

Only if we had a smarter helper like sg_alloc_table_from_table_range() 
but no one cared about coalescing in the past.

Regards,

Tvrtko

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

  reply	other threads:[~2015-04-28  8:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1429876733.git.joonas.lahtinen@linux.intel.com>
2015-04-24 12:09 ` [PATCH 1/5] drm/i915: Do not clear mappings beyond VMA size Joonas Lahtinen
2015-04-27 12:55   ` Tvrtko Ursulin
2015-05-04 14:23     ` Daniel Vetter
2015-04-24 12:09 ` [PATCH 2/5] drm/i915: Do not make assumptions on GGTT VMA sizes Joonas Lahtinen
2015-04-27 13:55   ` Tvrtko Ursulin
2015-04-28  7:23     ` Joonas Lahtinen
2015-04-24 12:09 ` [PATCH 3/5] drm/i915: Consider object pinned if any VMA is pinned Joonas Lahtinen
2015-04-24 12:29   ` Chris Wilson
2015-04-27 12:18     ` Joonas Lahtinen
2015-04-24 12:09 ` [PATCH 4/5] drm/i915: Add a partial GGTT view type Joonas Lahtinen
2015-04-27 14:50   ` Tvrtko Ursulin
2015-04-28  8:38     ` Tvrtko Ursulin [this message]
2015-04-30 11:02     ` Joonas Lahtinen
2015-04-24 12:10 ` [PATCH 5/5] drm/i915: Use partial view in mmap fault handler Joonas Lahtinen
2015-04-24 12:33   ` Chris Wilson
2015-04-27 11:01     ` Joonas Lahtinen
2015-04-27 11:21       ` Chris Wilson
2015-04-27 12:12         ` Joonas Lahtinen
2015-04-27 12:25           ` Chris Wilson
2015-04-27 13:46             ` Joonas Lahtinen
2015-04-27 14:52               ` Chris Wilson
2015-04-24 15:28   ` shuang.he

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=553F46F7.4040707@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.