Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1648093
| From | Gerd Hoffmann <kraxel@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 4/5] drm/i915/gvt: Dmabuf support for GVT-g |
| Date | 2017-05-23 16:10 +0200 |
| Message-ID | <tKiFA-4he-15@gated-at.bofh.it> (permalink) |
| References | <tKfol-1W6-1@gated-at.bofh.it> <tKfol-1W6-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
> + } else if (plane_id == INTEL_GVT_PLANE_CURSOR) {
> + c = &pipe->cursor;
> + if (c != NULL) {
> + info->start = c->base;
> + info->width = c->width;
> + info->height = c->height;
> + info->stride = c->width * (c->bpp / 8);
> + info->drm_format_mod = 0;
> + info->x_pos = c->x_pos;
> + info->y_pos = c->y_pos;
> + info->size = (((info->stride * c->height *
> c->bpp) / 8)
> + + (PAGE_SIZE - 1)) >>
> PAGE_SHIFT;
Leaves info->drm_format unset.
> +struct intel_vgpu_plane_info {
> + uint32_t plane_id;
> + uint32_t drm_format;
> + uint32_t width;
> + uint32_t height;
> + uint32_t stride;
> + uint32_t start;
> + uint32_t x_pos;
> + uint32_t y_pos;
> + uint32_t size;
> + uint64_t drm_format_mod;
> +};
drm_format_mod is unaligned. Should be avoided, otherwise the struct
layout is different on i386 and x86_64.
Patch 5/5 moves around this struct. Better have a separate patch
adding the structs and ioctls, order it before this one, so you don't
have to rename the stuff just added ...
> +struct intel_vgpu_dmabuf {
> + uint32_t fd;
> + struct intel_vgpu_plane_info plane_info;
> +};
Has alignment problems too.
cheers,
Gerd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v5 0/5] drm/i915/gvt: Dma-buf support for GVT-g Xiaoguang Chen <xiaoguang.chen@intel.com> - 2017-05-23 12:40 +0200
[PATCH v5 5/5] drm/i915/gvt: Adding interface so user space can get the dma-buf Xiaoguang Chen <xiaoguang.chen@intel.com> - 2017-05-23 12:40 +0200
Re: [PATCH v5 5/5] drm/i915/gvt: Adding interface so user space can get the dma-buf Gerd Hoffmann <kraxel@redhat.com> - 2017-05-23 16:20 +0200
Re: [PATCH v5 5/5] drm/i915/gvt: Adding interface so user space can get the dma-buf Kirti Wankhede <kwankhede@nvidia.com> - 2017-05-23 17:40 +0200
Re: [PATCH v5 5/5] drm/i915/gvt: Adding interface so user space can get the dma-buf Alex Williamson <alex.williamson@redhat.com> - 2017-05-23 21:30 +0200
[PATCH v5 4/5] drm/i915/gvt: Dmabuf support for GVT-g Xiaoguang Chen <xiaoguang.chen@intel.com> - 2017-05-23 12:40 +0200
Re: [PATCH v5 4/5] drm/i915/gvt: Dmabuf support for GVT-g Gerd Hoffmann <kraxel@redhat.com> - 2017-05-23 16:10 +0200
Re: [PATCH v5 4/5] drm/i915/gvt: Dmabuf support for GVT-g Alex Williamson <alex.williamson@redhat.com> - 2017-05-23 21:30 +0200
[PATCH v5 1/5] drm/i915/gvt: Extend the GVT-g architecture to support vfio device region Xiaoguang Chen <xiaoguang.chen@intel.com> - 2017-05-23 12:40 +0200
[PATCH v5 3/5] drm/i915/gvt: Frame buffer decoder support for GVT-g Xiaoguang Chen <xiaoguang.chen@intel.com> - 2017-05-23 12:40 +0200
[PATCH v5 2/5] drm/i915/gvt: OpRegion support for GVT-g Xiaoguang Chen <xiaoguang.chen@intel.com> - 2017-05-23 12:40 +0200
csiph-web