diff mbox

drm/i915/perf: document field usage of drm_i915_perf_oa_config

Message ID 20170918111038.29053-1-lionel.g.landwerlin@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lionel Landwerlin Sept. 18, 2017, 11:10 a.m. UTC
Document the expected length register config pointers (tuple of u32
values).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/i915/i915_perf.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Chris Wilson Sept. 18, 2017, 11:27 a.m. UTC | #1
Quoting Lionel Landwerlin (2017-09-18 12:10:38)
> Document the expected length register config pointers (tuple of u32
> values).
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_perf.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index 3d34c6a4313d..4409cea57607 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -3200,6 +3200,11 @@ static int create_dynamic_oa_sysfs_entry(struct drm_i915_private *dev_priv,
>   * Validates the submitted OA register to be saved into a new OA config that
>   * can then be used for programming the OA unit and its NOA network.
>   *
> + * drm_i915_perf_oa_config has 3 pointers fields (mux_regs_ptr,
s/pointers/pointer/

> + * boolean_regs_ptr, flex_regs_ptr) to buffers of tuples (register address,
> + * value) of u32 values. The number of tuples is given respectively by
> + * n_mux_regs, n_boolean_regs and n_flex_regs fields.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

But I would suggest this would better for describing the uabi in
i915_drm.h.
-Chris
Lionel Landwerlin Sept. 18, 2017, 11:36 a.m. UTC | #2
On 18/09/17 12:27, Chris Wilson wrote:
> Quoting Lionel Landwerlin (2017-09-18 12:10:38)
>> Document the expected length register config pointers (tuple of u32
>> values).
>>
>> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>> ---
>>   drivers/gpu/drm/i915/i915_perf.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
>> index 3d34c6a4313d..4409cea57607 100644
>> --- a/drivers/gpu/drm/i915/i915_perf.c
>> +++ b/drivers/gpu/drm/i915/i915_perf.c
>> @@ -3200,6 +3200,11 @@ static int create_dynamic_oa_sysfs_entry(struct drm_i915_private *dev_priv,
>>    * Validates the submitted OA register to be saved into a new OA config that
>>    * can then be used for programming the OA unit and its NOA network.
>>    *
>> + * drm_i915_perf_oa_config has 3 pointers fields (mux_regs_ptr,
> s/pointers/pointer/
>
>> + * boolean_regs_ptr, flex_regs_ptr) to buffers of tuples (register address,
>> + * value) of u32 values. The number of tuples is given respectively by
>> + * n_mux_regs, n_boolean_regs and n_flex_regs fields.
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> But I would suggest this would better for describing the uabi in
> i915_drm.h.

I was wondering about put it in i915_drm.h, I think it's better.
Let's me just send another patch for the uapi instead.

Thanks!

> -Chris
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 3d34c6a4313d..4409cea57607 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -3200,6 +3200,11 @@  static int create_dynamic_oa_sysfs_entry(struct drm_i915_private *dev_priv,
  * Validates the submitted OA register to be saved into a new OA config that
  * can then be used for programming the OA unit and its NOA network.
  *
+ * drm_i915_perf_oa_config has 3 pointers fields (mux_regs_ptr,
+ * boolean_regs_ptr, flex_regs_ptr) to buffers of tuples (register address,
+ * value) of u32 values. The number of tuples is given respectively by
+ * n_mux_regs, n_boolean_regs and n_flex_regs fields.
+ *
  * Returns: A new allocated config number to be used with the perf open ioctl
  * or a negative error code on failure.
  */