drm/i915: Add i915_gem_object_create_from_data()
authorDave Gordon <david.s.gordon@intel.com>
Thu, 9 Jul 2015 18:29:02 +0000 (19:29 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 21 Jul 2015 06:36:12 +0000 (08:36 +0200)
commitea70299d6e6961dd6adce2cbdf64e6e8a7ea97c0
tree5192c7bdcbc986b814e33f5dced6356b2a28fd12
parentdd92d8de833613993b337cb4ff853587e1600aef
drm/i915: Add i915_gem_object_create_from_data()

i915_gem_object_create_from_data() is a generic function to save data
from a plain linear buffer in a new pageable gem object that can later
be accessed by the CPU and/or GPU.

We will need this for the microcontroller firmware loading support code.

Derived from i915_gem_object_write(), originally by Alex Dai

v2:
    Change of function: now allocates & fills a new object, rather than
        writing to an existing object
    New name courtesy of Chris Wilson
    Explicit domain-setting and other improvements per review comments
        by Chris Wilson & Daniel Vetter

v4:
    Rebased

Issue: VIZ-4884
Signed-off-by: Alex Dai <yu.dai@intel.com>
Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Reviewed-by: Tom O'Rourke <Tom.O'Rourke@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c