From patchwork Wed Jan 8 12:34:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11323423 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B5BB6930 for ; Wed, 8 Jan 2020 12:35:11 +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 93FCE206DB for ; Wed, 8 Jan 2020 12:35:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hjE2wtNy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 93FCE206DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 DB4BC89173; Wed, 8 Jan 2020 12:35:09 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id B519789173; Wed, 8 Jan 2020 12:35:08 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id x6so1544071pfo.10; Wed, 08 Jan 2020 04:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=yKbQ6scm0B1cCM4QbxSmHwfLhuhy6eM9BFR8w0agbVM=; b=hjE2wtNyVKjcLhTFrmAR60mkR2+RNNf3n5IfqQXJD9Xhg6yZpoGFcyPBrKfH9vGR7X PKo5HEIOWOtvFv79p45h4Xixi/3MvqLmrnPS86Ot7ISVYvhxc4ZCoJigOv2mfqdMmDsD GL6vjCFotR64tXCURLMP1mj4YT9gBJmt7fhudJxX9MKh9sn09xhqnXfLY79S8sWOwJfO 6pduNnG9xZA/0gHH9Dlr9b7qbwM73JV0CbuZwMUm9+ZEUYyaLHK7oMis5+obVZJVJUpL 4ZOnNm/RvrF6r3y2xefUsHrXXQKwaY99ABreLrfq/8fp/eWwAfQtRnG2qeBrwWwNjiqT uBUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=yKbQ6scm0B1cCM4QbxSmHwfLhuhy6eM9BFR8w0agbVM=; b=aPLeniNULpVLeEkGvynOb4YcbawGG8cd/3GySfs4Mdz6eGhI+dkpoTt/k/qVZfpE4K EGhjadzLIhVyKu7oyUTeyGO5/572TX26hN1tqHUOlyiWaeJhAlS6OaUb7stTPWnyevIP to6sG4L2Bl6uLM70PM5sFVr4aFGZovYxUAwV2TsKe77uCPbwXlRn7z5ZJiISX1FcxuVZ olIVrtL9+7rpAN/pICx6tPyxKcmrjFnlIyQrI9ebPMYm5rDHWJZZqj6ZoSSA97o4x7QY Zo1U3VyNe71v9Dk+bB1lTgCdBE4TQtDsofWPu6KRVS7WyOz6dBvyZV3Q8XsVgZMBVsa5 vl4A== X-Gm-Message-State: APjAAAWPHiVqj2rmjj3AUf3Ov+SerMCpv7ISZNEctRfwAXLXECoetCcM j7aCQvORF64NP9BRQ/CVwV28s9B4ADkxj5ajeX2iwfO81kQ= X-Google-Smtp-Source: APXvYqz1If4V6LRQ2PWvObaqfBgi/38PONPe7a3bcuiSrQEJmIhAHzuDBYi36f/xHbu/oDjxCgk4eyUnTi971BBC+4c= X-Received: by 2002:a63:941:: with SMTP id 62mr5142130pgj.203.1578486908001; Wed, 08 Jan 2020 04:35:08 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Andy Shevchenko Date: Wed, 8 Jan 2020 14:34:59 +0200 Message-ID: To: intel-gfx , dri-devel , Jani Nikula , Daniel Vetter Subject: [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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" I forwarding this to a (sub)set of correct MLs/maintainers. Please, follow the instructions they give. ---------- 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(-) _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 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) ? +