drm/i915: Fix enable OA report logic
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 drm/i915: Fix enable OA report logic
I forwarding this to a (sub)set of correct MLs/maintainers. Please, follow the instructions they give.
---------- Forwarded message ---------
From: Ebrahim Byagowi <[email protected]>
Date: Mon, Dec 23, 2019 at 12:17 PM
Subject: [PATCH] drm/i915: Fix enable OA report logic
To: <[email protected]>
Clang raises
drivers/gpu/drm/i915/i915_perf.c:2474:50: warning: operator '?:' has
lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses]
!(stream->sample_flags & SAMPLE_OA_REPORT) ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
drivers/gpu/drm/i915/i915_perf.c:2474:50: note: place parentheses
around the '|' expression to silence this warning
!(stream->sample_flags & SAMPLE_OA_REPORT) ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
drivers/gpu/drm/i915/i915_perf.c:2474:50: note: place parentheses
around the '?:' expression to evaluate it first
!(stream->sample_flags & SAMPLE_OA_REPORT) ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^with -Wbitwise-conditional-parentheses and apparently is right as '|' is evaluated before '?:' which doesn't seem to be the intention here so let's put parentheses in the right place to fix it.
--- drivers/gpu/drm/i915/i915_perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_perf.c +0 -0
@@ -2471,9 +2471,9 @@ static int gen12_enable_metric_set(struct
i915_perf_stream *stream)
* If the user didn't require OA reports,
instruct the
* hardware not to emit ctx switch reports. */
- !(stream->sample_flags & SAMPLE_OA_REPORT) ?
- _MASKED_BIT_ENABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS) :
- _MASKED_BIT_DISABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS));
+ (!(stream->sample_flags & SAMPLE_OA_REPORT) ?
+ _MASKED_BIT_ENABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS) :
+ _MASKED_BIT_DISABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS)));
intel_uncore_write(uncore, GEN12_OAG_OAGLBCTXCTRL, periodic ?
(GEN12_OAG_OAGLBCTXCTRL_COUNTER_RESUME |
--
2.24.0
Signature · 6 lines
With Best Regards, Andy Shevchenko _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 2 lines · Andy Shevchenko
I forwarding this to a (sub)set of correct MLs/maintainers. Please, follow the instructions they give.
Thanks, already fixed by commit 9278bbb6e43c ("drm/i915/perf: Reverse a ternary to make sparse happy") in our -next.
BR,
Jani.
Quoted 59 lines
---------- Forwarded message ---------
From: Ebrahim Byagowi <[email protected]>
Date: Mon, Dec 23, 2019 at 12:17 PM
Subject: [PATCH] drm/i915: Fix enable OA report logic
To: <[email protected]>Clang raises
drivers/gpu/drm/i915/i915_perf.c:2474:50: warning: operator '?:' has
lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses]!(stream->sample_flags & SAMPLE_OA_REPORT) ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ drivers/gpu/drm/i915/i915_perf.c:2474:50: note: place parentheses around the '|' expression to silence this warning !(stream->sample_flags & SAMPLE_OA_REPORT) ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ drivers/gpu/drm/i915/i915_perf.c:2474:50: note: place parentheses around the '?:' expression to evaluate it first !(stream->sample_flags & SAMPLE_OA_REPORT) ? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^with -Wbitwise-conditional-parentheses and apparently is right as '|' is evaluated before '?:' which doesn't seem to be the intention here so let's put parentheses in the right place to fix it.
Signed-off-by Ebrahim Byagowi <[email protected]>--- drivers/gpu/drm/i915/i915_perf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_perf.c +0
-0@@ -2471,9 +2471,9 @@ static int gen12_enable_metric_set(struct i915_perf_stream *stream) * If the user didn't require OA reports,instruct the
* hardware not to emit ctx switch reports. */drivers/gpu/drm/i915/i915_perf.c +0
-2- !(stream->sample_flags & SAMPLE_OA_REPORT) ? -
_MASKED_BIT_ENABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS):
-_MASKED_BIT_DISABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS));drivers/gpu/drm/i915/i915_perf.c +2
-0+ (!(stream->sample_flags & SAMPLE_OA_REPORT) ? +
_MASKED_BIT_ENABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS):
+_MASKED_BIT_DISABLE(GEN12_OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS)));intel_uncore_write(uncore,
GEN12_OAG_OAGLBCTXCTRL, periodic ?
(GEN12_OAG_OAGLBCTXCTRL_COUNTER_RESUME|
--
2.24.0
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for Fwd: [PATCH] drm/i915: Fix enable OA report logic
In reply to a message not in the archive== Series Details ==
== Series Details ==
Series: Fwd: [PATCH] drm/i915: Fix enable OA report logic
URL : https://patchwork.freedesktop.org/series/71761/
State : failure
== Summary ==
Applying: Fwd: [PATCH] drm/i915: Fix enable OA report logic
error: corrupt patch at line 19
error: could not build fake ancestor
hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0001 Fwd: [PATCH] drm/i915: Fix enable OA report logic When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx