drm/i915/guc: Check sizing of guc_capture output
authorAlan Previn <alan.previn.teres.alexis@intel.com>
Mon, 21 Mar 2022 16:45:23 +0000 (09:45 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 22 Mar 2022 17:33:30 +0000 (10:33 -0700)
commitd7c15d76a5547eec420aa9b2940c3e5e7cb77a5a
tree584a0cb159c3f17cb79b163ac010c2ffa9596e87
parentdaff407a083da2a50bc5a46c07756a9ccd7842df
drm/i915/guc: Check sizing of guc_capture output

Add intel_guc_capture_output_min_size_est function to
provide a reasonable minimum size for error-capture
region before allocating the shared buffer.

Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220321164527.2500062-10-alan.previn.teres.alexis@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.h
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c