All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
	intel-gfx <Intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Ebrahim Byagowi <ebrahim@gnu.org>
Subject: Re: Fwd: [PATCH] drm/i915: Fix enable OA report logic
Date: Wed, 08 Jan 2020 14:56:17 +0200	[thread overview]
Message-ID: <87a76yqf7y.fsf@intel.com> (raw)
In-Reply-To: <CAHp75Vdi35+9_4s1OzFRs-G0w0_vcAkKa2av_BWU+Axu1sYskg@mail.gmail.com>

On Wed, 08 Jan 2020, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> 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.

>
> ---------- Forwarded message ---------
> From: Ebrahim Byagowi <ebrahim@gnu.org>
> Date: Mon, Dec 23, 2019 at 12:17 PM
> Subject: [PATCH] drm/i915: Fix enable OA report logic
> To: <platform-driver-x86@vger.kernel.org>
>
>
>
> 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 <ebrahim@gnu.org>
> ---
>  drivers/gpu/drm/i915/i915_perf.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index 2ae14bc14931..db963f7c2e2e 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -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

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
	intel-gfx <Intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Ebrahim Byagowi <ebrahim@gnu.org>
Subject: Re: [Intel-gfx] Fwd: [PATCH] drm/i915: Fix enable OA report logic
Date: Wed, 08 Jan 2020 14:56:17 +0200	[thread overview]
Message-ID: <87a76yqf7y.fsf@intel.com> (raw)
In-Reply-To: <CAHp75Vdi35+9_4s1OzFRs-G0w0_vcAkKa2av_BWU+Axu1sYskg@mail.gmail.com>

On Wed, 08 Jan 2020, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> 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.

>
> ---------- Forwarded message ---------
> From: Ebrahim Byagowi <ebrahim@gnu.org>
> Date: Mon, Dec 23, 2019 at 12:17 PM
> Subject: [PATCH] drm/i915: Fix enable OA report logic
> To: <platform-driver-x86@vger.kernel.org>
>
>
>
> 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 <ebrahim@gnu.org>
> ---
>  drivers/gpu/drm/i915/i915_perf.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index 2ae14bc14931..db963f7c2e2e 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -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

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-01-08 12:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d24e431a-a5ca-6bb0-812c-bb368ee64876@gnu.org>
2020-01-08 12:34 ` Fwd: [PATCH] drm/i915: Fix enable OA report logic Andy Shevchenko
2020-01-08 12:34   ` [Intel-gfx] " Andy Shevchenko
2020-01-08 12:56   ` Jani Nikula [this message]
2020-01-08 12:56     ` Jani Nikula
2020-01-08 14:30 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a76yqf7y.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ebrahim@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.