From: Gerd Hoffmann <kraxel@redhat.com>
To: Xiaoguang Chen <xiaoguang.chen@intel.com>,
alex.williamson@redhat.com, intel-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org, zhenyuw@linux.intel.com,
zhiyuan.lv@intel.com, intel-gvt-dev@lists.freedesktop.org,
zhi.a.wang@intel.com, kevin.tian@intel.com
Subject: Re: [PATCH v5 4/5] drm/i915/gvt: Dmabuf support for GVT-g
Date: Tue, 23 May 2017 16:00:49 +0200 [thread overview]
Message-ID: <1495548049.30747.6.camel@redhat.com> (raw)
In-Reply-To: <1495535521-2120-5-git-send-email-xiaoguang.chen@intel.com>
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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Gerd Hoffmann <kraxel@redhat.com>
To: Xiaoguang Chen <xiaoguang.chen@intel.com>,
alex.williamson@redhat.com, intel-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org, zhenyuw@linux.intel.com,
zhiyuan.lv@intel.com, intel-gvt-dev@lists.freedesktop.org,
zhi.a.wang@intel.com, kevin.tian@intel.com
Subject: Re: [PATCH v5 4/5] drm/i915/gvt: Dmabuf support for GVT-g
Date: Tue, 23 May 2017 16:00:49 +0200 [thread overview]
Message-ID: <1495548049.30747.6.camel@redhat.com> (raw)
In-Reply-To: <1495535521-2120-5-git-send-email-xiaoguang.chen@intel.com>
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
next prev parent reply other threads:[~2017-05-23 14:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 10:31 [PATCH v5 0/5] drm/i915/gvt: Dma-buf support for GVT-g Xiaoguang Chen
2017-05-23 10:31 ` Xiaoguang Chen
2017-05-23 10:31 ` [PATCH v5 1/5] drm/i915/gvt: Extend the GVT-g architecture to support vfio device region Xiaoguang Chen
2017-05-23 10:31 ` Xiaoguang Chen
2017-05-23 10:31 ` [PATCH v5 2/5] drm/i915/gvt: OpRegion support for GVT-g Xiaoguang Chen
2017-05-23 10:31 ` Xiaoguang Chen
2017-05-23 10:31 ` [PATCH v5 3/5] drm/i915/gvt: Frame buffer decoder " Xiaoguang Chen
2017-05-23 10:31 ` Xiaoguang Chen
2017-05-23 10:32 ` [PATCH v5 4/5] drm/i915/gvt: Dmabuf " Xiaoguang Chen
2017-05-23 10:32 ` Xiaoguang Chen
2017-05-23 14:00 ` Gerd Hoffmann [this message]
2017-05-23 14:00 ` Gerd Hoffmann
2017-05-23 19:25 ` Alex Williamson
2017-05-23 19:25 ` Alex Williamson
2017-05-25 13:28 ` Chris Wilson
2017-05-25 13:28 ` [Intel-gfx] " Chris Wilson
2017-05-26 8:28 ` Chris Wilson
2017-05-26 8:28 ` [Intel-gfx] " Chris Wilson
2017-05-23 10:32 ` [PATCH v5 5/5] drm/i915/gvt: Adding interface so user space can get the dma-buf Xiaoguang Chen
2017-05-23 10:32 ` Xiaoguang Chen
2017-05-23 14:09 ` Gerd Hoffmann
2017-05-23 14:09 ` Gerd Hoffmann
2017-05-23 15:35 ` Kirti Wankhede
2017-05-23 15:35 ` Kirti Wankhede
2017-05-23 19:25 ` Alex Williamson
2017-05-23 19:25 ` Alex Williamson
2017-05-23 12:14 ` ✓ Fi.CI.BAT: success for drm/i915/gvt: dma-buf support for GVT-g (rev5) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495548049.30747.6.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xiaoguang.chen@intel.com \
--cc=zhenyuw@linux.intel.com \
--cc=zhi.a.wang@intel.com \
--cc=zhiyuan.lv@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.