diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2022-02-07 23:01:40 -0800 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2022-02-08 23:21:28 -0800 |
commit | f4044ca1967098b44bd2d569ddb99352b599551e (patch) | |
tree | 6f6908b05435b6f1b8da38603e7c9de1a9471ded /drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |
parent | 876f7a438e4247a948268ad77b67c494f709cc30 (diff) |
drm/i915/guc: Prepare for error propagation
Currently guc_mmio_reg_add() relies on having enough memory available in
the array to add a new slot. It uses
`GEM_BUG_ON(count >= regset->size);` to protect going above the
threshold.
In order to allow guc_mmio_reg_add() to handle the memory allocation by
itself, it must return an error in case of failures. Adjust return code
so this error can be propagated to the callers of guc_mmio_reg_add() and
guc_mmio_regset_init().
No intended change in behavior.
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220208070141.2095177-2-lucas.demarchi@intel.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
0 files changed, 0 insertions, 0 deletions