dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser
@ 2021-04-21 12:03 Maarten Lankhorst
  2021-04-21 14:32 ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Maarten Lankhorst @ 2021-04-21 12:03 UTC (permalink / raw)
  To: intel-gfx
  Cc: Stephen Rothwell, Dave Airlie, Daniel Vetter,
	Linux Kernel Mailing List, DRI

Fixes the following htmldocs warnings:
drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser'
drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser'
drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser'
drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index e6f1e93abbbb..afb9b7516999 100644
--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
+++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
@@ -1369,6 +1369,18 @@ static int check_bbstart(u32 *cmd, u32 offset, u32 length,
 	return 0;
 }
 
+/**
+ * intel_engine_cmd_parser_alloc_jump_whitelist() - preallocate jump whitelist for intel_engine_cmd_parser()
+ * @batch_length: length of the commands in batch_obj
+ * @trampoline: Whether jump trampolines are used.
+ *
+ * Preallocates a jump whitelist for parsing the cmd buffer in intel_engine_cmd_parser().
+ * This has to be preallocated, because the command parser runs in signaling context,
+ * and may not allocate any memory.
+ *
+ * Return: NULL or pointer to a jump whitelist, or ERR_PTR() on failure. Use
+ * IS_ERR() to check for errors. Must bre freed() with kfree().
+ */
 unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
 							    bool trampoline)
 {
@@ -1401,7 +1413,9 @@ unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
  * @batch_offset: byte offset in the batch at which execution starts
  * @batch_length: length of the commands in batch_obj
  * @shadow: validated copy of the batch buffer in question
- * @trampoline: whether to emit a conditional trampoline at the end of the batch
+ * @jump_whitelist: buffer preallocated with intel_engine_cmd_parser_alloc_jump_whitelist()
+ * @shadow_map: mapping to @shadow vma
+ * @batch_map: mapping to @batch vma
  *
  * Parses the specified batch buffer looking for privilege violations as
  * described in the overview.
-- 
2.31.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser
  2021-04-21 12:03 [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser Maarten Lankhorst
@ 2021-04-21 14:32 ` Daniel Vetter
  2021-04-21 14:39   ` Maarten Lankhorst
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2021-04-21 14:32 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Dave Airlie, Stephen Rothwell, intel-gfx, Linux Kernel Mailing List, DRI

On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst
<maarten.lankhorst@linux.intel.com> wrote:
>
> Fixes the following htmldocs warnings:
> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser'
> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser'
> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser'
> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> index e6f1e93abbbb..afb9b7516999 100644
> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
> @@ -1369,6 +1369,18 @@ static int check_bbstart(u32 *cmd, u32 offset, u32 length,
>         return 0;
>  }
>
> +/**
> + * intel_engine_cmd_parser_alloc_jump_whitelist() - preallocate jump whitelist for intel_engine_cmd_parser()
> + * @batch_length: length of the commands in batch_obj
> + * @trampoline: Whether jump trampolines are used.
> + *
> + * Preallocates a jump whitelist for parsing the cmd buffer in intel_engine_cmd_parser().
> + * This has to be preallocated, because the command parser runs in signaling context,
> + * and may not allocate any memory.
> + *
> + * Return: NULL or pointer to a jump whitelist, or ERR_PTR() on failure. Use
> + * IS_ERR() to check for errors. Must bre freed() with kfree().

IS_ERR_OR_NULL or needs an actual bugfix in the code since we're not
consistent. Also s/bre/be/
-Daniel

> + */
>  unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
>                                                             bool trampoline)
>  {
> @@ -1401,7 +1413,9 @@ unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
>   * @batch_offset: byte offset in the batch at which execution starts
>   * @batch_length: length of the commands in batch_obj
>   * @shadow: validated copy of the batch buffer in question
> - * @trampoline: whether to emit a conditional trampoline at the end of the batch
> + * @jump_whitelist: buffer preallocated with intel_engine_cmd_parser_alloc_jump_whitelist()
> + * @shadow_map: mapping to @shadow vma
> + * @batch_map: mapping to @batch vma
>   *
>   * Parses the specified batch buffer looking for privilege violations as
>   * described in the overview.
> --
> 2.31.0
>


-- 
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] 5+ messages in thread

* Re: [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser
  2021-04-21 14:32 ` Daniel Vetter
@ 2021-04-21 14:39   ` Maarten Lankhorst
  2021-04-22  8:18     ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Maarten Lankhorst @ 2021-04-21 14:39 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Dave Airlie, Stephen Rothwell, intel-gfx, Linux Kernel Mailing List, DRI

Op 21-04-2021 om 16:32 schreef Daniel Vetter:
> On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst
> <maarten.lankhorst@linux.intel.com> wrote:
>> Fixes the following htmldocs warnings:
>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser'
>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser'
>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser'
>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
>>
>> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++++++++++++++-
>>  1 file changed, 15 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
>> index e6f1e93abbbb..afb9b7516999 100644
>> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
>> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
>> @@ -1369,6 +1369,18 @@ static int check_bbstart(u32 *cmd, u32 offset, u32 length,
>>         return 0;
>>  }
>>
>> +/**
>> + * intel_engine_cmd_parser_alloc_jump_whitelist() - preallocate jump whitelist for intel_engine_cmd_parser()
>> + * @batch_length: length of the commands in batch_obj
>> + * @trampoline: Whether jump trampolines are used.
>> + *
>> + * Preallocates a jump whitelist for parsing the cmd buffer in intel_engine_cmd_parser().
>> + * This has to be preallocated, because the command parser runs in signaling context,
>> + * and may not allocate any memory.
>> + *
>> + * Return: NULL or pointer to a jump whitelist, or ERR_PTR() on failure. Use
>> + * IS_ERR() to check for errors. Must bre freed() with kfree().
> IS_ERR_OR_NULL or needs an actual bugfix in the code since we're not
> consistent. Also s/bre/be/
We're sort of consistent, NULL is a valid return code. IS_ERR is only on faliure. :)
> -Daniel
>
>> + */
>>  unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
>>                                                             bool trampoline)
>>  {
>> @@ -1401,7 +1413,9 @@ unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
>>   * @batch_offset: byte offset in the batch at which execution starts
>>   * @batch_length: length of the commands in batch_obj
>>   * @shadow: validated copy of the batch buffer in question
>> - * @trampoline: whether to emit a conditional trampoline at the end of the batch
>> + * @jump_whitelist: buffer preallocated with intel_engine_cmd_parser_alloc_jump_whitelist()
>> + * @shadow_map: mapping to @shadow vma
>> + * @batch_map: mapping to @batch vma
>>   *
>>   * Parses the specified batch buffer looking for privilege violations as
>>   * described in the overview.
>> --
>> 2.31.0
>>
>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser
  2021-04-21 14:39   ` Maarten Lankhorst
@ 2021-04-22  8:18     ` Daniel Vetter
  2021-04-23 10:42       ` Maarten Lankhorst
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2021-04-22  8:18 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Stephen Rothwell, Dave Airlie, Daniel Vetter, intel-gfx,
	Linux Kernel Mailing List, DRI

On Wed, Apr 21, 2021 at 04:39:10PM +0200, Maarten Lankhorst wrote:
> Op 21-04-2021 om 16:32 schreef Daniel Vetter:
> > On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst
> > <maarten.lankhorst@linux.intel.com> wrote:
> >> Fixes the following htmldocs warnings:
> >> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
> >> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser'
> >> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser'
> >> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser'
> >> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
> >>
> >> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> >> ---
> >>  drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++++++++++++++-
> >>  1 file changed, 15 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
> >> index e6f1e93abbbb..afb9b7516999 100644
> >> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
> >> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
> >> @@ -1369,6 +1369,18 @@ static int check_bbstart(u32 *cmd, u32 offset, u32 length,
> >>         return 0;
> >>  }
> >>
> >> +/**
> >> + * intel_engine_cmd_parser_alloc_jump_whitelist() - preallocate jump whitelist for intel_engine_cmd_parser()
> >> + * @batch_length: length of the commands in batch_obj
> >> + * @trampoline: Whether jump trampolines are used.
> >> + *
> >> + * Preallocates a jump whitelist for parsing the cmd buffer in intel_engine_cmd_parser().
> >> + * This has to be preallocated, because the command parser runs in signaling context,
> >> + * and may not allocate any memory.
> >> + *
> >> + * Return: NULL or pointer to a jump whitelist, or ERR_PTR() on failure. Use
> >> + * IS_ERR() to check for errors. Must bre freed() with kfree().
> > IS_ERR_OR_NULL or needs an actual bugfix in the code since we're not
> > consistent. Also s/bre/be/
> We're sort of consistent, NULL is a valid return code. IS_ERR is only on faliure. :)

Maybe explain that and then Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Cheers, Daniel

> > -Daniel
> >
> >> + */
> >>  unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
> >>                                                             bool trampoline)
> >>  {
> >> @@ -1401,7 +1413,9 @@ unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
> >>   * @batch_offset: byte offset in the batch at which execution starts
> >>   * @batch_length: length of the commands in batch_obj
> >>   * @shadow: validated copy of the batch buffer in question
> >> - * @trampoline: whether to emit a conditional trampoline at the end of the batch
> >> + * @jump_whitelist: buffer preallocated with intel_engine_cmd_parser_alloc_jump_whitelist()
> >> + * @shadow_map: mapping to @shadow vma
> >> + * @batch_map: mapping to @batch vma
> >>   *
> >>   * Parses the specified batch buffer looking for privilege violations as
> >>   * described in the overview.
> >> --
> >> 2.31.0
> >>
> >
> 

-- 
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] 5+ messages in thread

* Re: [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser
  2021-04-22  8:18     ` Daniel Vetter
@ 2021-04-23 10:42       ` Maarten Lankhorst
  0 siblings, 0 replies; 5+ messages in thread
From: Maarten Lankhorst @ 2021-04-23 10:42 UTC (permalink / raw)
  To: intel-gfx, Stephen Rothwell, DRI, Dave Airlie, Linux Kernel Mailing List

Op 22-04-2021 om 10:18 schreef Daniel Vetter:
> On Wed, Apr 21, 2021 at 04:39:10PM +0200, Maarten Lankhorst wrote:
>> Op 21-04-2021 om 16:32 schreef Daniel Vetter:
>>> On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst
>>> <maarten.lankhorst@linux.intel.com> wrote:
>>>> Fixes the following htmldocs warnings:
>>>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
>>>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'jump_whitelist' not described in 'intel_engine_cmd_parser'
>>>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'shadow_map' not described in 'intel_engine_cmd_parser'
>>>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Function parameter or member 'batch_map' not described in 'intel_engine_cmd_parser'
>>>> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser'
>>>>
>>>> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>>> ---
>>>>  drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++++++++++++++-
>>>>  1 file changed, 15 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
>>>> index e6f1e93abbbb..afb9b7516999 100644
>>>> --- a/drivers/gpu/drm/i915/i915_cmd_parser.c
>>>> +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
>>>> @@ -1369,6 +1369,18 @@ static int check_bbstart(u32 *cmd, u32 offset, u32 length,
>>>>         return 0;
>>>>  }
>>>>
>>>> +/**
>>>> + * intel_engine_cmd_parser_alloc_jump_whitelist() - preallocate jump whitelist for intel_engine_cmd_parser()
>>>> + * @batch_length: length of the commands in batch_obj
>>>> + * @trampoline: Whether jump trampolines are used.
>>>> + *
>>>> + * Preallocates a jump whitelist for parsing the cmd buffer in intel_engine_cmd_parser().
>>>> + * This has to be preallocated, because the command parser runs in signaling context,
>>>> + * and may not allocate any memory.
>>>> + *
>>>> + * Return: NULL or pointer to a jump whitelist, or ERR_PTR() on failure. Use
>>>> + * IS_ERR() to check for errors. Must bre freed() with kfree().
>>> IS_ERR_OR_NULL or needs an actual bugfix in the code since we're not
>>> consistent. Also s/bre/be/
>> We're sort of consistent, NULL is a valid return code. IS_ERR is only on faliure. :)
> Maybe explain that and then Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> Cheers, Daniel
>
>>> -Daniel
>>>
>>>> + */
>>>>  unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
>>>>                                                             bool trampoline)
>>>>  {
>>>> @@ -1401,7 +1413,9 @@ unsigned long *intel_engine_cmd_parser_alloc_jump_whitelist(u32 batch_length,
>>>>   * @batch_offset: byte offset in the batch at which execution starts
>>>>   * @batch_length: length of the commands in batch_obj
>>>>   * @shadow: validated copy of the batch buffer in question
>>>> - * @trampoline: whether to emit a conditional trampoline at the end of the batch
>>>> + * @jump_whitelist: buffer preallocated with intel_engine_cmd_parser_alloc_jump_whitelist()
>>>> + * @shadow_map: mapping to @shadow vma
>>>> + * @batch_map: mapping to @batch vma
>>>>   *
>>>>   * Parses the specified batch buffer looking for privilege violations as
>>>>   * described in the overview.
>>>> --
>>>> 2.31.0
>>>>
Updated and pushed both, thanks. :)

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-23 10:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 12:03 [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser Maarten Lankhorst
2021-04-21 14:32 ` Daniel Vetter
2021-04-21 14:39   ` Maarten Lankhorst
2021-04-22  8:18     ` Daniel Vetter
2021-04-23 10:42       ` Maarten Lankhorst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).