[Intel-gfx] [PATCH 5/9] drm/i915/perf: Group engines into respective OA groups
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Thu Feb 16 20:55:59 UTC 2023
On Thu, Feb 16, 2023 at 08:10:29PM +0200, Jani Nikula wrote:
>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...
Should I just add a debug message here instead of warn_ON?
>
>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.
Sorry about that, I will fix the order of patches.
Umesh
>
>BR,
>Jani.
>
>--
>Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list