Re: [Intel-gfx] [PATCH 6/7] drm/i915/guc: Make GuC log sizes runtime configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks good to me. 

Reviewed-by: Alan Previn <alan.previn.teres.alexis@xxxxxxxxx>


On Wed, 2022-07-27 at 19:20 -0700, John.C.Harrison@xxxxxxxxx wrote:
> From: John Harrison <John.C.Harrison@xxxxxxxxx>
> 
> The GuC log buffer sizes had to be configured statically at compile
> time. This can be quite troublesome when needing to get larger logs
> out of a released driver. So re-organise the code to allow a boot time
> module parameter override.
> 
> Signed-off-by: John Harrison <John.C.Harrison@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc.c        |  53 ++----
>  .../gpu/drm/i915/gt/uc/intel_guc_capture.c    |  14 +-
>  drivers/gpu/drm/i915/gt/uc/intel_guc_log.c    | 176 +++++++++++++++++-
>  drivers/gpu/drm/i915/gt/uc/intel_guc_log.h    |  42 +++--
>  drivers/gpu/drm/i915/i915_params.c            |  12 ++
>  drivers/gpu/drm/i915/i915_params.h            |   3 +
>  6 files changed, 226 insertions(+), 74 deletions(-)
> 
...
> +static s32 scale_log_param(struct intel_guc_log *log, const struct guc_log_section *section,
> +			   s32 param)
> +{
> +	/* -1 means default */
> +	if (param < 0)
> +		return section->default_val;
> +
> +	/* Check for 32-bit overflow */
> +	if (param >= SZ_4K) {
> +		drm_err(&guc_to_gt(log_to_guc(log))->i915->drm, "Size too large for GuC %s log: %dMB!",
> +			section->name, param);
> +		return section->default_val;
> +	}
> +
> +	/* Param units are 1MB */
> +	return param * SZ_1M;
> +}
> +







[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux