Thank you for your contribution! Sashiko AI review found 3 potential issue(s) 
to consider:
- [Low] The patch uses the non-existent macro `CONFIG_ENABLED()`, which causes 
a build failure.
- [Low] Passing a struct by value instead of a pointer to 
`intel_uc_uses_guc_submission()` causes a compilation error.
- [Low] Missing `fallthrough;` annotation or `break;` statement in switch case 
causes a `-Wimplicit-fallthrough` build error.
--

commit b45d05f8f8fec20309384c6ec58105a6c7f737dd
Author: Maarten Lankhorst <[email protected]>

drm/i915: Disable "busy" pmu event on CONFIG_PREEMPT_RT

The busyness implementation for guc is incompatible with PMU,
so disable it to prevent upsetting lockdep.

> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index 1c3bafda9c708..d1949bd3b3b24 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -554,6 +554,9 @@ engine_event_status(struct intel_engine_cs *engine,
>  {
>       switch (sample) {
>       case I915_SAMPLE_BUSY:
> +             /* The guc submission engine->busyness() callback has issues 
> with CONFIG_PREEMPT_RT */
> +             if (CONFIG_ENABLED(CONFIG_PREEMPT_RT) && 
> intel_uc_uses_guc_submission(engine->gt->uc))

[Severity: Low]
Is CONFIG_ENABLED() a valid macro here? It appears this might cause a build
failure and should instead be IS_ENABLED().

Additionally, does intel_uc_uses_guc_submission() expect a pointer to the uc
struct? If uc is embedded in struct intel_gt, passing engine->gt->uc by value
will cause an incompatible type compilation error. Should this be passed as
&engine->gt->uc?

> +                     return -ENODEV;

[Severity: Low]
Does this code fall through to I915_SAMPLE_WAIT when the if condition is
false? 

Now that the I915_SAMPLE_BUSY case is no longer empty, falling through without
an explicit fallthrough; annotation or a break; statement will trigger a
-Wimplicit-fallthrough warning, which breaks the build.

>       case I915_SAMPLE_WAIT:
>               break;
>       case I915_SAMPLE_SEMA:

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to