[Intel-gfx] [PATCH 5/9] drm/i915/perf: Group engines into respective OA groups
Jani Nikula
jani.nikula at linux.intel.com
Thu Feb 16 18:10:29 UTC 2023
On Thu, 16 Feb 2023, "Dixit, Ashutosh" <ashutosh.dixit at intel.com> wrote:
> On Thu, 16 Feb 2023 02:51:34 -0800, Jani Nikula wrote:
>>
>> > +static int oa_init_gt(struct intel_gt *gt)
>> > +{
>> > + u32 num_groups = __num_perf_groups_per_gt(gt);
>> > + struct intel_engine_cs *engine;
>> > + struct i915_perf_group *g;
>> > + intel_engine_mask_t tmp;
>> > +
>> > + g = kcalloc(num_groups, sizeof(*g), GFP_KERNEL);
>> > + if (drm_WARN_ON(>->i915->drm, !g))
>> > + return -ENOMEM;
>>
>> No warnings or messages on -ENOMEM is standard policy.
>
> Hmm I think this is the only error for which this code is failing the
> probe. So if we are not going to fail the probe, we should at least allow a
> WARN_ON? Exception proves the rule?
A whole lot of other things are going to go bonkers on -ENOMEM, and
getting that warn isn't going to help anyone...
Maybe we do need to fail probe on this after all, but it just seemed
pointless at the time it was introduced a few patches earlier.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list