From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A71B7C33CA2 for ; Wed, 8 Jan 2020 12:56:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 846A8206F0 for ; Wed, 8 Jan 2020 12:56:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 846A8206F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0475D6E267; Wed, 8 Jan 2020 12:56:25 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5E2E76E267; Wed, 8 Jan 2020 12:56:23 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 04:56:22 -0800 X-IronPort-AV: E=Sophos;i="5.69,410,1571727600"; d="scan'208";a="233592883" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 04:56:20 -0800 From: Jani Nikula To: Andy Shevchenko , intel-gfx , dri-devel , Daniel Vetter , Ebrahim Byagowi Subject: Re: Fwd: [PATCH] drm/i915: Fix enable OA report logic In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: Date: Wed, 08 Jan 2020 14:56:17 +0200 Message-ID: <87a76yqf7y.fsf@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, 08 Jan 2020, Andy Shevchenko 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 > Date: Mon, Dec 23, 2019 at 12:17 PM > Subject: [PATCH] drm/i915: Fix enable OA report logic > To: > > > > 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 > --- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1A3CC33CA3 for ; Wed, 8 Jan 2020 12:56:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B15472072A for ; Wed, 8 Jan 2020 12:56:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B15472072A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69D1D6E2CD; Wed, 8 Jan 2020 12:56:25 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5E2E76E267; Wed, 8 Jan 2020 12:56:23 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 04:56:22 -0800 X-IronPort-AV: E=Sophos;i="5.69,410,1571727600"; d="scan'208";a="233592883" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 04:56:20 -0800 From: Jani Nikula To: Andy Shevchenko , intel-gfx , dri-devel , Daniel Vetter , Ebrahim Byagowi In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: Date: Wed, 08 Jan 2020 14:56:17 +0200 Message-ID: <87a76yqf7y.fsf@intel.com> MIME-Version: 1.0 Subject: Re: [Intel-gfx] Fwd: [PATCH] drm/i915: Fix enable OA report logic X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 08 Jan 2020, Andy Shevchenko 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 > Date: Mon, Dec 23, 2019 at 12:17 PM > Subject: [PATCH] drm/i915: Fix enable OA report logic > To: > > > > 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 > --- > 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