Re: [PATCH 01/15] drm/i915: Add i915_gem_object_write() to i915_gem.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 18, 2015 at 12:49:55PM +0100, Dave Gordon wrote:
> On 17/06/15 13:02, Daniel Vetter wrote:
> > Domain handling is required for all gem objects, and the resulting bugs if
> > you don't for one-off objects are absolutely no fun to track down.
> 
> Is it not the case that the new object returned by
> i915_gem_alloc_object() is
> (a) of a type that can be mapped into the GTT, and
> (b) initially in the CPU domain for both reading and writing?
> 
> So AFAICS the allocate-and-fill function I'm describing (to appear in
> next patch series respin) doesn't need any further domain handling.

A i915_gem_object_create_from_data() is a reasonable addition, and I
suspect it will make the code a bit more succinct.

Whilst your statement is true today, calling set_domain is then a no-op,
and helps document how you use the object and so reduces the likelihood
of us introducing bugs in the future.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux