From: Thomas Zimmermann <tzimmermann@suse.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: hamohammed.sa@gmail.com, airlied@linux.ie,
nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
michal.simek@xilinx.com, thierry.reding@gmail.com,
krzk@kernel.org, sam@ravnborg.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,
andi.shyti@intel.com, linux-arm-msm@vger.kernel.org,
marek.olsak@amd.com, tianci.yin@amd.com,
etnaviv@lists.freedesktop.org, hdegoede@redhat.com,
linux-mediatek@lists.infradead.org, rodrigo.vivi@intel.com,
matthias.bgg@gmail.com, evan.quan@amd.com, sean@poorly.run,
linux-arm-kernel@lists.infradead.org,
tvrtko.ursulin@linux.intel.com, 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, alexander.deucher@amd.com,
Hawking.Zhang@amd.com, freedreno@lists.freedesktop.org,
christian.koenig@amd.com
Subject: Re: [PATCH 19/20] drm/xlnx: Initialize DRM driver instance with CMA helper macro
Date: Thu, 13 Aug 2020 15:57:32 +0200 [thread overview]
Message-ID: <a8e39798-9812-e325-255a-e6536cb32339@suse.de> (raw)
In-Reply-To: <20200813133605.GJ6057@pendragon.ideasonboard.com>
[-- Attachment #1.1: Type: text/plain, Size: 3004 bytes --]
Hi
Am 13.08.20 um 15:36 schrieb Laurent Pinchart:
> Hi Thomas,
>
> Thank you for the patch.
>
> On Thu, Aug 13, 2020 at 10:36:43AM +0200, Thomas Zimmermann wrote:
>> The xlnx driver uses CMA helpers with default callback functions.
>> Initialize the driver structure with the rsp CMA helper macro. The
>> driver is being converted to use GEM object functions as part of
>> this change.
>>
>> Two callbacks, .dumb_destroy and .gem_prime_import, were initialized
>> to their default implementations, so they are just kept empty now.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>> drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 14 +-------------
>> 1 file changed, 1 insertion(+), 13 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
>> index 26328c76305b..058044dcc062 100644
>> --- a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
>> +++ b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
>> @@ -80,19 +80,7 @@ static struct drm_driver zynqmp_dpsub_drm_driver = {
>> .driver_features = DRIVER_MODESET | DRIVER_GEM |
>> DRIVER_ATOMIC,
>>
>> - .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
>> - .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
>> - .gem_prime_export = drm_gem_prime_export,
>> - .gem_prime_import = drm_gem_prime_import,
>> - .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table,
>> - .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,
>> - .gem_prime_vmap = drm_gem_cma_prime_vmap,
>> - .gem_prime_vunmap = drm_gem_cma_prime_vunmap,
>> - .gem_prime_mmap = drm_gem_cma_prime_mmap,
>> - .gem_free_object_unlocked = drm_gem_cma_free_object,
>> - .gem_vm_ops = &drm_gem_cma_vm_ops,
>> - .dumb_create = zynqmp_dpsub_dumb_create,
>> - .dumb_destroy = drm_gem_dumb_destroy,
>> + DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE(zynqmp_dpsub_dumb_create),
>
> The only effective change here is
>
> - .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,
> - .gem_prime_mmap = drm_gem_cma_prime_mmap,
> + .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table_vmap,
> + .gem_prime_mmap = drm_gem_prime_mmap,
>
> The change is significant, and I have a hard time following the code to
> verify that it's correct, or if it's an undesired side effect. If it's
> correct, could the change be mentioned in the commit message, with at
> least a brief explanation of why this is correct, and what the
> consequences here ?
I think this is a mistake that I didn't notice. Thanks for spotting it.
Initializing the driver structure
DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE should fix it. I'll change this
for the patch's next revision.
Best regards
Thomas
>
>>
>> .fops = &zynqmp_dpsub_drm_fops,
>>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 516 bytes --]
next prev parent reply other threads:[~2020-08-13 13:57 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 8:36 [PATCH 00/20] Convert all remaining drivers to GEM object functions Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 01/20] drm/amdgpu: Introduce " Thomas Zimmermann
2020-08-13 10:22 ` Christian König
2020-09-14 15:05 ` Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 02/20] drm/armada: " Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 03/20] drm/etnaviv: " Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 04/20] drm/exynos: " Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 05/20] drm/gma500: " Thomas Zimmermann
2020-08-13 8:36 ` [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 ` [PATCH 07/20] drm/mediatek: " Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 08/20] drm/msm: Introduce GEM object funcs Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 09/20] drm/nouveau: Introduce GEM object functions Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 10/20] drm/omapdrm: " Thomas Zimmermann
2020-08-13 13:38 ` Laurent Pinchart
2020-08-19 10:43 ` Tomi Valkeinen
2020-08-13 8:36 ` [PATCH 11/20] drm/pl111: " Thomas Zimmermann
2020-08-13 8:36 ` [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 ` [PATCH 13/20] drm/rockchip: Convert to drm_gem_object_funcs Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 14/20] drm/tegra: Introduce GEM object functions Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 15/20] drm/vc4: " Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 16/20] drm/vgem: " Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 17/20] drm/vkms: " Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 18/20] drm/xen: " Thomas Zimmermann
[not found] ` <1fe5f918-2445-d2e6-a501-881e70929404@epam.com>
2020-09-15 8:56 ` Thomas Zimmermann
2020-08-13 8:36 ` [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 [this message]
2020-08-13 8:36 ` [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
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=a8e39798-9812-e325-255a-e6536cb32339@suse.de \
--to=tzimmermann@suse.de \
--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=andi.shyti@intel.com \
--cc=bskeggs@redhat.com \
--cc=chris@chris-wilson.co.uk \
--cc=christian.koenig@amd.com \
--cc=chunkuang.hu@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.velikov@collabora.com \
--cc=etnaviv@lists.freedesktop.org \
--cc=evan.quan@amd.com \
--cc=freedreno@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=hdegoede@redhat.com \
--cc=hjc@rock-chips.com \
--cc=hyun.kwon@xilinx.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=laurent.pinchart@ideasonboard.com \
--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=nirmoy.das@amd.com \
--cc=nouveau@lists.freedesktop.org \
--cc=oleksandr_andrushchenko@epam.com \
--cc=rodrigo.vivi@intel.com \
--cc=rodrigosiqueiramelo@gmail.com \
--cc=sam@ravnborg.org \
--cc=sean@poorly.run \
--cc=sw0312.kim@samsung.com \
--cc=thierry.reding@gmail.com \
--cc=tianci.yin@amd.com \
--cc=tomi.valkeinen@ti.com \
--cc=tvrtko.ursulin@linux.intel.com \
--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