All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: matthew.auld@intel.com
Subject: [PATCH 02/11] drm/i915/perf: check the value of PROP_SAMPLE_OA uapi parameter
Date: Mon, 26 Mar 2018 10:08:22 +0100	[thread overview]
Message-ID: <20180326090831.22686-3-lionel.g.landwerlin@intel.com> (raw)
In-Reply-To: <20180326090831.22686-1-lionel.g.landwerlin@intel.com>

We've been a bit loose about this opening parameter. We should only
add the flag for writing OA reports when the value of this parameter
is != 0.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/i915/i915_perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 3beb24bc9277..9de935501aad 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -2747,7 +2747,8 @@ static int read_properties_unlocked(struct drm_i915_private *dev_priv,
 			props->ctx_handle = value;
 			break;
 		case DRM_I915_PERF_PROP_SAMPLE_OA:
-			props->sample_flags |= SAMPLE_OA_REPORT;
+			if (value)
+				props->sample_flags |= SAMPLE_OA_REPORT;
 			break;
 		case DRM_I915_PERF_PROP_OA_METRICS_SET:
 			if (value == 0) {
-- 
2.16.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-03-26  9:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26  9:08 [PATCH 00/11] drm/i915/perf: optimize perf stream usage on Gen7.5 Lionel Landwerlin
2018-03-26  9:08 ` [PATCH 01/11] drm/i915/perf: pass stream to enable metric set vfuncs Lionel Landwerlin
2018-03-26 19:21   ` Matthew Auld
2018-03-26 19:33     ` Matthew Auld
2018-03-27 10:15       ` Lionel Landwerlin
2018-03-26  9:08 ` Lionel Landwerlin [this message]
2018-03-26 19:28   ` [PATCH 02/11] drm/i915/perf: check the value of PROP_SAMPLE_OA uapi parameter Matthew Auld
2018-03-26  9:08 ` [PATCH 03/11] drm/i915/perf: simplify OA unit enabling on gen7 Lionel Landwerlin
2018-03-26 11:50   ` Matthew Auld
2018-03-26  9:08 ` [PATCH 04/11] drm/i915/perf: do not warn when OA buffer is already allocated Lionel Landwerlin
2018-03-26 12:00   ` Matthew Auld
2018-03-26 12:49     ` Lionel Landwerlin
2018-03-26  9:08 ` [PATCH 05/11] drm/i915/perf: remove empty line Lionel Landwerlin
2018-03-26 12:02   ` Matthew Auld
2018-03-26  9:08 ` [PATCH 06/11] drm/i915: rename PPGTT/GGTT fields OA registers Lionel Landwerlin
2018-03-26 12:08   ` Matthew Auld
2018-03-26  9:08 ` [PATCH 07/11] drm/i915/perf: pass stream as argument to oa enable vfunc Lionel Landwerlin
2018-03-26 19:41   ` Matthew Auld
2018-03-26  9:08 ` [PATCH 08/11] drm/i915/perf: add more debug message on open perf open & configs Lionel Landwerlin
2018-03-26 19:46   ` Matthew Auld
2018-03-26  9:08 ` [PATCH 09/11] drm/i915/perf: allowing opening the perf stream without sampling Lionel Landwerlin
2018-03-26 20:16   ` Matthew Auld
2018-03-26  9:08 ` [PATCH 10/11] drm/i915/perf: limit OA buffer size to minimum when unread Lionel Landwerlin
2018-03-26 13:02   ` Lionel Landwerlin
2018-03-26  9:08 ` [PATCH 11/11] drm/i915/perf: remove redundant oa buffer initialization Lionel Landwerlin
2018-03-26  9:56 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/perf: optimize perf stream usage on Gen7.5 Patchwork
2018-03-26  9:59 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-03-26 10:20 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-26 11:14 ` ✗ Fi.CI.IGT: failure " 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=20180326090831.22686-3-lionel.g.landwerlin@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    /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.