Message ID | 20170918111038.29053-1-lionel.g.landwerlin@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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
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 --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. */
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(+)