[Intel-xe] [PATCH v2 5/7] drm/xe/reg_sr: Save errors for kunit integration
Lucas De Marchi
lucas.demarchi at intel.com
Mon Apr 3 23:43:28 UTC 2023
On Mon, Apr 03, 2023 at 04:11:25PM -0700, Matt Roper wrote:
>On Sat, Apr 01, 2023 at 01:51:49AM -0700, Lucas De Marchi wrote:
>> When there's an entry that is dropped when xe_reg_sr_add(), there's
>> not much we can do other than reporting the error - it's for certain a
>> driver issue or conflicting workarounds/tunings. Save the number of
>> errors to be used later by kunit to report where it happens.
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>
>Does xe_reg_sr ever get allocated on the stack on with a non-zeroed
>allocation? I didn't think it did (it looks like they're always part of
>the original xe_device allocation which was kzalloc'd), but I see
>xe_reg_sr_init() explicitly zeroing the sr->pool substructure so it made
>me second-guess myself.
>
>Assuming I'm reading correctly that we never have an xe_reg_sr that
>wasn't zeroed at allocation,
when I wrote that part I think it was to allow init -> fini -> init.
But with the drm-managed part that didn't work. For the same reason,
sr can't be on stack - it will just crash if we try.
So... those memset in both init and fini look redundant now and can be
removed in a cleanup patch.
>
>Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
thanks
Lucas De Marchi
More information about the Intel-xe
mailing list