* [PATCH] drm/simple-kms: Fix documentation for drm_simple_encoder_init()
@ 2020-03-03 7:18 Thomas Zimmermann
2020-03-03 8:31 ` Daniel Vetter
2020-03-03 8:33 ` Daniel Vetter
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2020-03-03 7:18 UTC (permalink / raw
To: maarten.lankhorst, mripard, airlied, daniel, sam
Cc: Thomas Zimmermann, dri-devel
Brings the documentation of drm_simple_encoder_init() in sync with the
function's signature.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 63170ac6f2e8 ("drm/simple-kms: Add drm_simple_encoder_{init,create}()")
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
---
drivers/gpu/drm/drm_simple_kms_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
index 5a2abe2dea3e..2fab80aaf52e 100644
--- a/drivers/gpu/drm/drm_simple_kms_helper.c
+++ b/drivers/gpu/drm/drm_simple_kms_helper.c
@@ -40,7 +40,7 @@ static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
/**
* drm_simple_encoder_init - Initialize a preallocated encoder
* @dev: drm device
- * @funcs: callbacks for this encoder
+ * @encoder: the encoder to initialize
* @encoder_type: user visible type of the encoder
*
* Initialises a preallocated encoder that has no further functionality.
--
2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/simple-kms: Fix documentation for drm_simple_encoder_init()
2020-03-03 7:18 [PATCH] drm/simple-kms: Fix documentation for drm_simple_encoder_init() Thomas Zimmermann
@ 2020-03-03 8:31 ` Daniel Vetter
2020-03-03 8:33 ` Daniel Vetter
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2020-03-03 8:31 UTC (permalink / raw
To: Thomas Zimmermann; +Cc: airlied, dri-devel, sam
On Tue, Mar 03, 2020 at 08:18:07AM +0100, Thomas Zimmermann wrote:
> Brings the documentation of drm_simple_encoder_init() in sync with the
> function's signature.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 63170ac6f2e8 ("drm/simple-kms: Add drm_simple_encoder_{init,create}()")
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/drm_simple_kms_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
> index 5a2abe2dea3e..2fab80aaf52e 100644
> --- a/drivers/gpu/drm/drm_simple_kms_helper.c
> +++ b/drivers/gpu/drm/drm_simple_kms_helper.c
> @@ -40,7 +40,7 @@ static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
> /**
> * drm_simple_encoder_init - Initialize a preallocated encoder
> * @dev: drm device
> - * @funcs: callbacks for this encoder
> + * @encoder: the encoder to initialize
> * @encoder_type: user visible type of the encoder
> *
> * Initialises a preallocated encoder that has no further functionality.
> --
> 2.25.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/simple-kms: Fix documentation for drm_simple_encoder_init()
2020-03-03 7:18 [PATCH] drm/simple-kms: Fix documentation for drm_simple_encoder_init() Thomas Zimmermann
2020-03-03 8:31 ` Daniel Vetter
@ 2020-03-03 8:33 ` Daniel Vetter
2020-03-03 9:28 ` Thomas Zimmermann
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2020-03-03 8:33 UTC (permalink / raw
To: Thomas Zimmermann; +Cc: airlied, dri-devel, sam
On Tue, Mar 03, 2020 at 08:18:07AM +0100, Thomas Zimmermann wrote:
> Brings the documentation of drm_simple_encoder_init() in sync with the
> function's signature.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 63170ac6f2e8 ("drm/simple-kms: Add drm_simple_encoder_{init,create}()")
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> ---
> drivers/gpu/drm/drm_simple_kms_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
> index 5a2abe2dea3e..2fab80aaf52e 100644
> --- a/drivers/gpu/drm/drm_simple_kms_helper.c
> +++ b/drivers/gpu/drm/drm_simple_kms_helper.c
> @@ -40,7 +40,7 @@ static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
> /**
> * drm_simple_encoder_init - Initialize a preallocated encoder
> * @dev: drm device
> - * @funcs: callbacks for this encoder
> + * @encoder: the encoder to initialize
> * @encoder_type: user visible type of the encoder
> *
> * Initialises a preallocated encoder that has no further functionality.
btw reading this I just realized ... who does the kfree on the memory
containing the encoder? The ->destroy hook doesn't do that, and without
that the only other option thus far is devm_kzalloc, which is wrong.
drmm_kzalloc would fix this, but we don't have that yet.
How does this work? Maybe add a FIXME note that right now this can only
really be used if the encoder is embedded into something else that's
getting freed ...
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/simple-kms: Fix documentation for drm_simple_encoder_init()
2020-03-03 8:33 ` Daniel Vetter
@ 2020-03-03 9:28 ` Thomas Zimmermann
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Zimmermann @ 2020-03-03 9:28 UTC (permalink / raw
To: Daniel Vetter; +Cc: airlied, sam, dri-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 2303 bytes --]
Hi
Am 03.03.20 um 09:33 schrieb Daniel Vetter:
> On Tue, Mar 03, 2020 at 08:18:07AM +0100, Thomas Zimmermann wrote:
>> Brings the documentation of drm_simple_encoder_init() in sync with the
>> function's signature.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Fixes: 63170ac6f2e8 ("drm/simple-kms: Add drm_simple_encoder_{init,create}()")
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Maxime Ripard <mripard@kernel.org>
>> Cc: David Airlie <airlied@linux.ie>
>> Cc: Daniel Vetter <daniel@ffwll.ch>
>> Cc: dri-devel@lists.freedesktop.org
>> ---
>> drivers/gpu/drm/drm_simple_kms_helper.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c
>> index 5a2abe2dea3e..2fab80aaf52e 100644
>> --- a/drivers/gpu/drm/drm_simple_kms_helper.c
>> +++ b/drivers/gpu/drm/drm_simple_kms_helper.c
>> @@ -40,7 +40,7 @@ static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
>> /**
>> * drm_simple_encoder_init - Initialize a preallocated encoder
>> * @dev: drm device
>> - * @funcs: callbacks for this encoder
>> + * @encoder: the encoder to initialize
>> * @encoder_type: user visible type of the encoder
>> *
>> * Initialises a preallocated encoder that has no further functionality.
>
> btw reading this I just realized ... who does the kfree on the memory
> containing the encoder? The ->destroy hook doesn't do that, and without
> that the only other option thus far is devm_kzalloc, which is wrong.
> drmm_kzalloc would fix this, but we don't have that yet.
>
> How does this work? Maybe add a FIXME note that right now this can only
> really be used if the encoder is embedded into something else that's
> getting freed ...
Good point. The function expects the driver to kfree the memory as part
of the final release. The drivers I saw did this, but adding an
additional note here is probably a good idea.
Best regards
Thomas
> -Daniel
>
--
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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-03 9:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-03 7:18 [PATCH] drm/simple-kms: Fix documentation for drm_simple_encoder_init() Thomas Zimmermann
2020-03-03 8:31 ` Daniel Vetter
2020-03-03 8:33 ` Daniel Vetter
2020-03-03 9:28 ` Thomas Zimmermann
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.