From: Thomas Zimmermann <tzimmermann-l3A5Bk7waGM@public.gmane.org>
To: Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
Cc: hamohammed.sa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
airlied-cv59FeDIM0c@public.gmane.org,
nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org,
emil.velikov-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org,
abdiel.janulgue-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
oleksandr_andrushchenko-uRwfk40T5oI@public.gmane.org,
tomi.valkeinen-l0cyMroinI0@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org,
jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
kgene-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org,
intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
matthew.auld-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
chunkuang.hu-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
andi.shyti-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
marek.olsak-5C7GfCeVMHo@public.gmane.org,
tianci.yin-5C7GfCeVMHo@public.gmane.org,
etnaviv-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.orglinux
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-N3hz7ZxfLydczECFQUw77jytWr6r+dGw0E9HWUfgJXw@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 3025 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-l3A5Bk7waGM@public.gmane.org>
>> ---
>> 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: 37+ 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 03/20] drm/etnaviv: Introduce " Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 06/20] drm/i915: " Thomas Zimmermann
[not found] ` <20200813083644.31711-7-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-08-13 9:08 ` Jani Nikula
[not found] ` <877du2j4lf.fsf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
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 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
[not found] ` <20200813083644.31711-1-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-08-13 8:36 ` [PATCH 01/20] drm/amdgpu: " Thomas Zimmermann
[not found] ` <20200813083644.31711-2-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-08-13 10:22 ` Christian König
[not found] ` <5c1b3cab-1898-46df-2c5c-23ab6cbfbb7a-5C7GfCeVMHo@public.gmane.org>
2020-09-14 15:05 ` Thomas Zimmermann
[not found] ` <c445493b-9914-63f2-1cf2-c3c1de14e3e5-l3A5Bk7waGM@public.gmane.org>
2020-09-14 17:51 ` Christian König
2020-08-13 8:36 ` [PATCH 02/20] drm/armada: " 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 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 12/20] drm/radeon: " Thomas Zimmermann
[not found] ` <20200813083644.31711-13-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-08-13 10:24 ` Christian König
[not found] ` <fb070238-b6ca-8e31-e559-51eda489915e-5C7GfCeVMHo@public.gmane.org>
2020-08-13 10:41 ` Thomas Zimmermann
[not found] ` <5372b2ef-b7cf-f4e9-9199-6dee5bf6696f-l3A5Bk7waGM@public.gmane.org>
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 19/20] drm/xlnx: Initialize DRM driver instance with CMA helper macro Thomas Zimmermann
[not found] ` <20200813083644.31711-20-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-08-13 13:36 ` Laurent Pinchart
[not found] ` <20200813133605.GJ6057-N3hz7ZxfLydczECFQUw77jytWr6r+dGw0E9HWUfgJXw@public.gmane.org>
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
[not found] ` <20200813083644.31711-21-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-08-13 10:16 ` Sam Ravnborg
2020-08-13 10:33 ` Thomas Zimmermann
2020-08-13 8:36 ` [PATCH 16/20] drm/vgem: Introduce GEM object functions 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
2020-08-13 11:19 ` Oleksandr Andrushchenko
[not found] ` <1fe5f918-2445-d2e6-a501-881e70929404-uRwfk40T5oI@public.gmane.org>
2020-09-15 8:56 ` 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-l3a5bk7wagm@public.gmane.org \
--cc=abdiel.janulgue-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=andi.shyti-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=chunkuang.hu-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=emil.velikov-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
--cc=etnaviv-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=hamohammed.sa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.orglinux \
--cc=intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=jy0922.shim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kgene-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=krzk-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
--cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marek.olsak-5C7GfCeVMHo@public.gmane.org \
--cc=matthew.auld-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=oleksandr_andrushchenko-uRwfk40T5oI@public.gmane.org \
--cc=sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tianci.yin-5C7GfCeVMHo@public.gmane.org \
--cc=tomi.valkeinen-l0cyMroinI0@public.gmane.org \
--cc=xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org \
/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