From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: hamohammed.sa@gmail.com, heiko@sntech.de,
andrey.grodzovsky@amd.com, airlied@linux.ie,
nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
michal.simek@xilinx.com, eric@anholt.net, krzk@kernel.org,
sam@ravnborg.org, sumit.semwal@linaro.org,
emil.velikov@collabora.com, abdiel.janulgue@linux.intel.com,
linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com,
oleksandr_andrushchenko@epam.com, tomi.valkeinen@ti.com,
linux-tegra@vger.kernel.org, linux@armlinux.org.uk,
jonathanh@nvidia.com, linux-rockchip@lists.infradead.org,
kgene@kernel.org, bskeggs@redhat.com,
xen-devel@lists.xenproject.org, intel-gfx@lists.freedesktop.org,
matthew.auld@intel.com, chunkuang.hu@kernel.org,
linux-arm-msm@vger.kernel.org, marek.olsak@amd.com,
tianci.yin@amd.com, etnaviv@lists.freedesktop.org,
inki.dae@samsung.com, christian.gmeiner@gmail.com,
linux-mediatek@lists.infradead.org, mripard@kernel.org,
matthias.bgg@gmail.com, evan.quan@amd.com,
linux-arm-kernel@lists.infradead.org,
amd-gfx@lists.freedesktop.org, chris@chris-wilson.co.uk,
hyun.kwon@xilinx.com, rodrigosiqueiramelo@gmail.com,
aaron.liu@amd.com, Felix.Kuehling@amd.com, xinhui.pan@amd.com,
sw0312.kim@samsung.com, hjc@rock-chips.com,
miaoqinglang@huawei.com, kyungmin.park@samsung.com,
nirmoy.das@amd.com, p.zabel@pengutronix.de,
alexander.deucher@amd.com, Hawking.Zhang@amd.com,
freedreno@lists.freedesktop.org, christian.koenig@amd.com,
l.stach@pengutronix.de
Subject: Re: [Intel-gfx] [PATCH 10/20] drm/omapdrm: Introduce GEM object functions
Date: Thu, 13 Aug 2020 16:38:53 +0300 [thread overview]
Message-ID: <20200813133853.GK6057@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20200813083644.31711-11-tzimmermann@suse.de>
Hi Thomas,
Thank you for the patch.
On Thu, Aug 13, 2020 at 10:36:34AM +0200, Thomas Zimmermann wrote:
> GEM object functions deprecate several similar callback interfaces in
> struct drm_driver. This patch replaces the per-driver callbacks with
> per-instance callbacks in omapdrm.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/omapdrm/omap_drv.c | 9 ---------
> drivers/gpu/drm/omapdrm/omap_gem.c | 16 +++++++++++++++-
> drivers/gpu/drm/omapdrm/omap_gem.h | 1 -
> 3 files changed, 15 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> index 53d5e184ee77..2e598b8b72af 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -521,12 +521,6 @@ static int dev_open(struct drm_device *dev, struct drm_file *file)
> return 0;
> }
>
> -static const struct vm_operations_struct omap_gem_vm_ops = {
> - .fault = omap_gem_fault,
> - .open = drm_gem_vm_open,
> - .close = drm_gem_vm_close,
> -};
> -
> static const struct file_operations omapdriver_fops = {
> .owner = THIS_MODULE,
> .open = drm_open,
> @@ -549,10 +543,7 @@ static struct drm_driver omap_drm_driver = {
> #endif
> .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
> .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
> - .gem_prime_export = omap_gem_prime_export,
> .gem_prime_import = omap_gem_prime_import,
> - .gem_free_object_unlocked = omap_gem_free_object,
> - .gem_vm_ops = &omap_gem_vm_ops,
> .dumb_create = omap_gem_dumb_create,
> .dumb_map_offset = omap_gem_dumb_map_offset,
> .ioctls = ioctls,
> diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
> index d0d12d5dd76c..d68dc63dea0a 100644
> --- a/drivers/gpu/drm/omapdrm/omap_gem.c
> +++ b/drivers/gpu/drm/omapdrm/omap_gem.c
> @@ -487,7 +487,7 @@ static vm_fault_t omap_gem_fault_2d(struct drm_gem_object *obj,
> * vma->vm_private_data points to the GEM object that is backing this
> * mapping.
> */
> -vm_fault_t omap_gem_fault(struct vm_fault *vmf)
> +static vm_fault_t omap_gem_fault(struct vm_fault *vmf)
> {
> struct vm_area_struct *vma = vmf->vma;
> struct drm_gem_object *obj = vma->vm_private_data;
> @@ -1169,6 +1169,18 @@ static bool omap_gem_validate_flags(struct drm_device *dev, u32 flags)
> return true;
> }
>
> +static const struct vm_operations_struct omap_gem_vm_ops = {
> + .fault = omap_gem_fault,
> + .open = drm_gem_vm_open,
> + .close = drm_gem_vm_close,
> +};
> +
> +static const struct drm_gem_object_funcs omap_gem_object_funcs = {
> + .free = omap_gem_free_object,
> + .export = omap_gem_prime_export,
> + .vm_ops = &omap_gem_vm_ops,
> +};
> +
> /* GEM buffer object constructor */
> struct drm_gem_object *omap_gem_new(struct drm_device *dev,
> union omap_gem_size gsize, u32 flags)
> @@ -1236,6 +1248,8 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev,
> size = PAGE_ALIGN(gsize.bytes);
> }
>
> + obj->funcs = &omap_gem_object_funcs;
> +
> /* Initialize the GEM object. */
> if (!(flags & OMAP_BO_MEM_SHMEM)) {
> drm_gem_private_object_init(dev, obj, size);
> diff --git a/drivers/gpu/drm/omapdrm/omap_gem.h b/drivers/gpu/drm/omapdrm/omap_gem.h
> index 729b7812a815..9e6b5c8195d9 100644
> --- a/drivers/gpu/drm/omapdrm/omap_gem.h
> +++ b/drivers/gpu/drm/omapdrm/omap_gem.h
> @@ -69,7 +69,6 @@ struct dma_buf *omap_gem_prime_export(struct drm_gem_object *obj, int flags);
> struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev,
> struct dma_buf *buffer);
>
> -vm_fault_t omap_gem_fault(struct vm_fault *vmf);
I like how this function now becomes internal to omap_gem.c.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> int omap_gem_roll(struct drm_gem_object *obj, u32 roll);
> void omap_gem_cpu_sync_page(struct drm_gem_object *obj, int pgoff);
> void omap_gem_dma_sync_buffer(struct drm_gem_object *obj,
--
Regards,
Laurent Pinchart
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-08-13 13:39 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 8:36 [Intel-gfx] [PATCH 00/20] Convert all remaining drivers to GEM object functions Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 01/20] drm/amdgpu: Introduce " Thomas Zimmermann
2020-08-13 10:22 ` Christian König
2020-09-14 15:05 ` Thomas Zimmermann
2020-09-14 17:51 ` Christian König
2020-08-13 8:36 ` [Intel-gfx] [PATCH 02/20] drm/armada: " Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 03/20] drm/etnaviv: " Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 04/20] drm/exynos: " Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 05/20] drm/gma500: " Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 06/20] drm/i915: " Thomas Zimmermann
2020-08-13 9:08 ` Jani Nikula
2020-08-13 9:13 ` Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 07/20] drm/mediatek: " Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 08/20] drm/msm: Introduce GEM object funcs Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 09/20] drm/nouveau: Introduce GEM object functions Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 10/20] drm/omapdrm: " Thomas Zimmermann
2020-08-13 13:38 ` Laurent Pinchart [this message]
2020-08-19 10:43 ` Tomi Valkeinen
2020-08-13 8:36 ` [Intel-gfx] [PATCH 11/20] drm/pl111: " Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 12/20] drm/radeon: " Thomas Zimmermann
2020-08-13 10:24 ` Christian König
2020-08-13 10:41 ` Thomas Zimmermann
2020-08-13 10:47 ` Christian König
2020-08-13 8:36 ` [Intel-gfx] [PATCH 13/20] drm/rockchip: Convert to drm_gem_object_funcs Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 14/20] drm/tegra: Introduce GEM object functions Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 15/20] drm/vc4: " Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 16/20] drm/vgem: " Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 17/20] drm/vkms: " Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 18/20] drm/xen: " Thomas Zimmermann
2020-08-13 11:19 ` Oleksandr Andrushchenko
2020-09-15 8:56 ` Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 19/20] drm/xlnx: Initialize DRM driver instance with CMA helper macro Thomas Zimmermann
2020-08-13 13:36 ` Laurent Pinchart
2020-08-13 13:57 ` Thomas Zimmermann
2020-08-13 8:36 ` [Intel-gfx] [PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver Thomas Zimmermann
2020-08-13 10:16 ` Sam Ravnborg
2020-08-13 10:33 ` Thomas Zimmermann
2020-08-13 9:30 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Convert all remaining drivers to GEM object functions Patchwork
2020-08-13 9:47 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " 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=20200813133853.GK6057@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=Felix.Kuehling@amd.com \
--cc=Hawking.Zhang@amd.com \
--cc=aaron.liu@amd.com \
--cc=abdiel.janulgue@linux.intel.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrey.grodzovsky@amd.com \
--cc=bskeggs@redhat.com \
--cc=chris@chris-wilson.co.uk \
--cc=christian.gmeiner@gmail.com \
--cc=christian.koenig@amd.com \
--cc=chunkuang.hu@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
--cc=eric@anholt.net \
--cc=etnaviv@lists.freedesktop.org \
--cc=evan.quan@amd.com \
--cc=freedreno@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=hyun.kwon@xilinx.com \
--cc=inki.dae@samsung.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jonathanh@nvidia.com \
--cc=jy0922.shim@samsung.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marek.olsak@amd.com \
--cc=matthew.auld@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=miaoqinglang@huawei.com \
--cc=michal.simek@xilinx.com \
--cc=mripard@kernel.org \
--cc=nirmoy.das@amd.com \
--cc=nouveau@lists.freedesktop.org \
--cc=oleksandr_andrushchenko@epam.com \
--cc=p.zabel@pengutronix.de \
--cc=rodrigosiqueiramelo@gmail.com \
--cc=sam@ravnborg.org \
--cc=sumit.semwal@linaro.org \
--cc=sw0312.kim@samsung.com \
--cc=tianci.yin@amd.com \
--cc=tomi.valkeinen@ti.com \
--cc=tzimmermann@suse.de \
--cc=xen-devel@lists.xenproject.org \
--cc=xinhui.pan@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox