Re: [Intel-gfx] [PATCH v2 4/5] drm/i915/gvt: Dmabuf support for GVT-g

2017-05-19 Thread Gerd Hoffmann
> +/** > + * Ioctl to query plane info or create dma-buf > + */ > +#define INTEL_VGPU_QUERY_DMABUF 0 > +#define INTEL_VGPU_GENERATE_DMABUF 1 This should use _IO* #defines. > +struct intel_vgpu_dmabuf { > + __u32 plane_id; > + /* out */ > + __u32 fd; > + __u32 drm_fo

Re: [Intel-gfx] [PATCH v2 4/5] drm/i915/gvt: Dmabuf support for GVT-g

2017-05-18 Thread Chris Wilson
On Thu, May 18, 2017 at 05:50:04PM +0800, Xiaoguang Chen wrote: > +#define GEN8_DECODE_PTE(pte) \ > + ((dma_addr_t)(u64)pte) >> 12) & 0x7ffULL) << 12)) > + > +static struct sg_table *intel_vgpu_gem_get_pages( > + struct drm_i915_gem_object *obj) > +{ > + struct drm_i915_

[Intel-gfx] [PATCH v2 4/5] drm/i915/gvt: Dmabuf support for GVT-g

2017-05-18 Thread Xiaoguang Chen
dmabuf for GVT-g can be exported to users who can use the dmabuf to show the desktop of vm which use intel vgpu. Currently we provide query and create new dmabuf operations. Users of dmabuf can cache some created dmabufs and related information such as the framebuffer's address, size, tiling mode