[igt-dev] [PATCH i-g-t] lib/i915/perf: Propagate return from unsupported_i915_perf_platform

Lionel Landwerlin lionel.g.landwerlin at intel.com
Wed Nov 16 18:41:01 UTC 2022


On 16/11/2022 19:07, Ashutosh Dixit wrote:
> NULL return from unsupported_i915_perf_platform must be propagated up the
> call stack to inform callers of intel_perf_for_devinfo and
> intel_perf_for_fd.
>
> Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/7358
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>


Thanks a lot, well spotted!

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>


> ---
>   lib/i915/perf.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/i915/perf.c b/lib/i915/perf.c
> index 28f37948e52..4a946906a84 100644
> --- a/lib/i915/perf.c
> +++ b/lib/i915/perf.c
> @@ -366,7 +366,7 @@ intel_perf_for_devinfo(uint32_t device_id,
>   			intel_perf_load_metrics_tglgt2(perf);
>   			break;
>   		default:
> -			unsupported_i915_perf_platform(perf);
> +			return unsupported_i915_perf_platform(perf);
>   		}
>   	} else if (devinfo->is_rocketlake) {
>   		intel_perf_load_metrics_rkl(perf);
> @@ -391,7 +391,7 @@ intel_perf_for_devinfo(uint32_t device_id,
>   		else if (is_acm_gt3(&perf->devinfo))
>   			intel_perf_load_metrics_acmgt3(perf);
>   		else
> -			unsupported_i915_perf_platform(perf);
> +			return unsupported_i915_perf_platform(perf);
>   	} else {
>   		return unsupported_i915_perf_platform(perf);
>   	}




More information about the igt-dev mailing list