RE: [Intel-gfx] [RFC libdrm] intel: Add support for softpin

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

 




> -----Original Message-----
> From: Kristian Høgsberg [mailto:hoegsberg@xxxxxxxxx]
> Sent: Tuesday, December 15, 2015 4:09 AM
> To: Song, Ruiling <ruiling.song@xxxxxxxxx>; krh@xxxxxxxxxxxxx; Winiarski,
> Michal <michal.winiarski@xxxxxxxxx>
> Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; mesa-dev@xxxxxxxxxxxxxxxxxxxxx; Ben
> Widawsky <ben@xxxxxxxxxxxx>; dri-devel@xxxxxxxxxxxxxxxxxxxxx; Yang,
> Rong R <rong.r.yang@xxxxxxxxx>
> Subject: RE: [Intel-gfx] [RFC libdrm] intel: Add support for softpin
> 
> Kristian Høgsberg <hoegsberg@xxxxxxxxx> writes:
> 
> > "Song, Ruiling" <ruiling.song@xxxxxxxxx> writes:
> >
> >>> -----Original Message-----
> >>> From: hoegsberg@xxxxxxxxx [mailto:hoegsberg@xxxxxxxxx] On Behalf
> Of
> >>> Kristian H?gsberg
> >>> Sent: Monday, December 14, 2015 1:34 PM
> >>> To: Song, Ruiling <ruiling.song@xxxxxxxxx>
> >>> Cc: Winiarski, Michal <michal.winiarski@xxxxxxxxx>; intel-
> >>> gfx@xxxxxxxxxxxxxxxxxxxxx; mesa-dev@xxxxxxxxxxxxxxxxxxxxx; Ben
> Widawsky
> >>> <ben@xxxxxxxxxxxx>; dri-devel@xxxxxxxxxxxxxxxxxxxxx
> >>> Subject: Re: [Intel-gfx] [RFC libdrm] intel: Add support for softpin
> >>>
> >>> On Sun, Dec 13, 2015 at 7:17 PM, Song, Ruiling <ruiling.song@xxxxxxxxx>
> >>> wrote:
> >>> >> -----Original Message-----
> >>> >> From: Intel-gfx [mailto:intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx] On
> >>> Behalf
> >>> >> Of Micha? Winiarski
> >>> >> Sent: Wednesday, September 9, 2015 10:07 PM
> >>> >> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> >>> >> Cc: Ben Widawsky <ben@xxxxxxxxxxxx>; dri-
> >>> devel@xxxxxxxxxxxxxxxxxxxxx;
> >>> >> mesa-dev@xxxxxxxxxxxxxxxxxxxxx
> >>> >> Subject: [Intel-gfx] [RFC libdrm] intel: Add support for softpin
> >>> >>
> >>> >> Softpin allows userspace to take greater control of GPU virtual
> address
> >>> >> space and eliminates the need of relocations. It can also be used to
> >>> >> mirror addresses between GPU and CPU (shared virtual memory).
> >>> >> Calls to drm_intel_bo_emit_reloc are still required to build the list of
> >>> >> drm_i915_gem_exec_objects at exec time, but no entries in relocs
> are
> >>> >> created. Self-relocs don't make any sense for softpinned objects and
> can
> >>> >> indicate a programming errors, thus are forbidden. Softpinned
> objects
> >>> >> are marked by asterisk in debug dumps.
> >>> >>
> >>> >> Cc: Thomas Daniel <thomas.daniel@xxxxxxxxx>
> >>> >> Cc: Kristian Høgsberg <krh@xxxxxxxxxxxxx>
> >>> >> Cc: Zou Nanhai <nanhai.zou@xxxxxxxxx>
> >>> >> Cc: Michel Thierry <michel.thierry@xxxxxxxxx>
> >>> >> Cc: Ben Widawsky <ben@xxxxxxxxxxxx>
> >>> >> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> >>> >> Signed-off-by: Michał Winiarski <michal.winiarski@xxxxxxxxx>
> >>> >> ---
> >>> >>  include/drm/i915_drm.h    |   4 +-
> >>> >>  intel/intel_bufmgr.c      |   9 +++
> >>> >>  intel/intel_bufmgr.h      |   1 +
> >>> >>  intel/intel_bufmgr_gem.c  | 176
> >>> >> ++++++++++++++++++++++++++++++++++++++++------
> >>> >>  intel/intel_bufmgr_priv.h |   7 ++
> >>> >>  5 files changed, 173 insertions(+), 24 deletions(-)
> >>> >
> >>> > Will anybody help to push the patch to libdrm? Beignet highly depend
> on
> >>> this to implement ocl2.0 svm.
> >>>
> >>> Is the kernel patch upstream?
> >>
> >> Yes, the kernel patch already merged, see:
> >> http://cgit.freedesktop.org/drm-
> intel/commit/?id=506a8e87d8d2746b9e9d2433503fe237c54e4750
> >>
> >> I find below line of code in libdrm does not match the kernel version. The
> kernel patch defined as:
> >> "#define EXEC_OBJECT_PINNED (1<<4)", but this patch defined it as
> (1<<3).
> >
> > I have the two 48 bit patches merge here. I'll pull in Michał's patch,
> > update the kernel header and  then push it all.
> 
> All pushed now.

Thanks. We have tried some basic OpenCL tests. Both patches work!
I have another question, does KMD allow soft-pin a bo at zero address?
I have tried to pin a bo with the size of 64KB at zero address in Beignet. It can succeed.
But I met some random failure with bo_exec() returning -EINVAL.
I am trying to figure out why. So I want to confirm is it allowed by KMD?

Thanks!
Ruiling

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux