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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BB58CC07E9D for ; Fri, 23 Sep 2022 20:12:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F18510E919; Fri, 23 Sep 2022 20:12:20 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id AAA3F10E8BA for ; Fri, 23 Sep 2022 20:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663963924; x=1695499924; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=rc31DsulKNvQzNUd1zA3S++/rvb/hnbbd0qDnyU8wd0=; b=bpv/5/0xPjSGVOwrAjn7mDL511VpFkDEnGS1lqMDaQq6OtzPBvKwQmxd CwhEBEqjsrdu6eDUo7qpr4XThyLtVBWVLGym3Qpl/abMVPiLA8OrnCb5Z NLoepyr8UzDUW4TRvV0SM0CsLJGe2fRt8ruNdiMW9HCRfn6RbMWi+76fp U2S1zTOzvWHgZJUVM6Vauy0nJLK+t/y675zvNUAE1AlxEF9psso2flBh8 MxAHsHn2To2NSEkZQvvrxbVniwGOGGENnZko3BL8rrgexMJeYh6pWIYNh TkZ29PIP1rzCQ32BHSHU302oITMhLXfcgio99VAjxWWekbaWY/Xt1Tvvd g==; X-IronPort-AV: E=McAfee;i="6500,9779,10479"; a="287807867" X-IronPort-AV: E=Sophos;i="5.93,340,1654585200"; d="scan'208";a="287807867" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 13:12:03 -0700 X-IronPort-AV: E=Sophos;i="5.93,340,1654585200"; d="scan'208";a="762747287" Received: from dut042-dg2frd.fm.intel.com ([10.105.19.4]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 13:12:02 -0700 From: Umesh Nerlige Ramappa To: intel-gfx@lists.freedesktop.org, Lionel G Landwerlin , Ashutosh Dixit , Joonas Lahtinen Date: Fri, 23 Sep 2022 20:11:45 +0000 Message-Id: <20220923201154.283784-7-umesh.nerlige.ramappa@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220923201154.283784-1-umesh.nerlige.ramappa@intel.com> References: <20220923201154.283784-1-umesh.nerlige.ramappa@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Intel-gfx] [PATCH v2 06/15] drm/i915/perf: Simply use stream->ctx 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" Earlier code used exclusive_stream to check for user passed context. Simplify this by accessing stream->ctx. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 657dff8bf395..2ec2da42a539 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -777,7 +777,7 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream, * switches since it's not-uncommon for periodic samples to * identify a switch before any 'context switch' report. */ - if (!stream->perf->exclusive_stream->ctx || + if (!stream->ctx || stream->specific_ctx_id == ctx_id || stream->oa_buffer.last_ctx_id == stream->specific_ctx_id || reason & OAREPORT_REASON_CTX_SWITCH) { @@ -786,7 +786,7 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream, * While filtering for a single context we avoid * leaking the IDs of other contexts. */ - if (stream->perf->exclusive_stream->ctx && + if (stream->ctx && stream->specific_ctx_id != ctx_id) { report32[2] = INVALID_CTX_ID; } -- 2.25.1