From patchwork Wed Mar 8 15:39:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 66318 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp411513wrd; Wed, 8 Mar 2023 07:50:52 -0800 (PST) X-Google-Smtp-Source: AK7set+vDp7KcHamekPiKtIiqM0t+m6W+Y9XZfkB7ufpLE+u798UyqOTCJWx3Rby07+NEd6J0SUX X-Received: by 2002:a05:6a20:8406:b0:cc:cc27:9185 with SMTP id c6-20020a056a20840600b000cccc279185mr28198357pzd.50.1678290652171; Wed, 08 Mar 2023 07:50:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678290652; cv=none; d=google.com; s=arc-20160816; b=tRwwkiGMyCq/sTFHSb3c3TlUQ17/olYfL+0Neh17plxaPQBfaQ0NoUwptIbocUul62 rsADrKBSpC0i/5VQNb9mDPkEwwa8TF88SLx8UczZChFcB79gHvBzXTzmhpK60vTBmmFc QETSa0sOHvytYj9R9zmdtoJjWEAf8yxcCtY5jVPzCZRYFVlIsfb0NzLQZBUvxjWA+BBV dd4g36sYxCfElgtuCyt6ulgZd8VKRz8K84okjj2O8p9XTF+MQnOxgMemTElBIMA09X4/ AColKzQJtsDM03D0pcARve3W1sldUXFwu5zjSRmOJrFmkAIThyGo8YT8swreOa4zbSwR tTig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ERp9aJwImbi6vFtlNqFQD2zbp4UK439EK217B7O7tOY=; b=fgtTTOAMF0zR+u1GwZeKdyFvVO8LQ693dr12Ev4Qqe6Yh8MF0+ERkmuT59D9Dk9LRO IYmAn4gIvGpMfzxMQU3prybrSDfG/53PnYiDYf8Xj9gEcb17Xta0JWeNSFI7uUzzifbQ JMrk1m5I8y7J8aa2j+FZQpQzkpc9KZadM+stJsIvtZ8u4DjNK0Hxcb979M+1l963ppG0 yuGYyUozDZrKeNzIpeh42PtuQFFiSoupae0zt0uXM4WWt1rAo5Q3+Vp9GiFcRbFmxaDZ cw0+aHEoBByBdzuEQ3Bi10qJRND0EImWQnxfb01S/kVWzscHA7WLh0e2UEa6qPwtHK0s Ajag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MACEQGZm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a63c105000000b00502f10fa6e0si15049186pgf.819.2023.03.08.07.50.37; Wed, 08 Mar 2023 07:50:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MACEQGZm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbjCHPkf (ORCPT + 99 others); Wed, 8 Mar 2023 10:40:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232414AbjCHPkK (ORCPT ); Wed, 8 Mar 2023 10:40:10 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BF91B8F16 for ; Wed, 8 Mar 2023 07:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678289990; x=1709825990; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=UFsc11qcv0An3YTgsx2jUXx1nEcHzBdMgxW2w6BVW+0=; b=MACEQGZmaVuwhCs7LR/uQarID42E+EPlwAMla0aSVcu3DH6MYc3Ehbmw yXpZm/xLQIUqUSp9TXgiMVx3/p3U7j2oawiOyRzuA1oTZY7Xoq4VlO9yT dJA/6cJ3m6A9HWWI9ovnfQHqsZE672GSYLnZdpy0IyIk9gH9BuXdpbeS6 uCWPzLJpH/cNoUhyDgUZOBnZx74s/LtIVPkTr/8dMtL2D2mR4vk30hXMu diVHnds+untvk1QMH96rlAs9B/K++bshEd3SZrPFdZ/6wN+hhkPSnjSQP mwdnCOMd55EnuLYEiWm1QM5jDM5wI6n3KuaZozbCmub7C6EDCjttHdu3o g==; X-IronPort-AV: E=McAfee;i="6500,9779,10642"; a="337703537" X-IronPort-AV: E=Sophos;i="5.98,244,1673942400"; d="scan'208";a="337703537" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2023 07:39:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10642"; a="787160246" X-IronPort-AV: E=Sophos;i="5.98,244,1673942400"; d="scan'208";a="787160246" Received: from lab-ah.igk.intel.com ([10.102.42.211]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2023 07:39:44 -0800 From: Andrzej Hajda Date: Wed, 08 Mar 2023 16:39:03 +0100 Subject: [PATCH v5 1/4] drm/i915/gt: make nop_clear_range public MIME-Version: 1.0 Message-Id: <20230308-guard_error_capture-v5-1-6d1410d13540@intel.com> References: <20230308-guard_error_capture-v5-0-6d1410d13540@intel.com> In-Reply-To: <20230308-guard_error_capture-v5-0-6d1410d13540@intel.com> To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Andi Shyti , Chris Wilson , Nirmoy Das , Andrzej Hajda X-Mailer: b4 0.11.1 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759815298839210908?= X-GMAIL-MSGID: =?utf-8?q?1759815298839210908?= Function nop_clear_range can be used instead of local implementations. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 3 +-- drivers/gpu/drm/i915/gt/intel_gtt.h | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c index 842e69c7b21e49..b925da42c7cfc4 100644 --- a/drivers/gpu/drm/i915/gt/intel_ggtt.c +++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c @@ -345,8 +345,7 @@ static void gen6_ggtt_insert_entries(struct i915_address_space *vm, ggtt->invalidate(ggtt); } -static void nop_clear_range(struct i915_address_space *vm, - u64 start, u64 length) +void nop_clear_range(struct i915_address_space *vm, u64 start, u64 length) { } diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.h b/drivers/gpu/drm/i915/gt/intel_gtt.h index 5a775310d3fcb5..c15a4892e9f45d 100644 --- a/drivers/gpu/drm/i915/gt/intel_gtt.h +++ b/drivers/gpu/drm/i915/gt/intel_gtt.h @@ -672,4 +672,6 @@ static inline struct sgt_dma { return (struct sgt_dma){ sg, addr, addr + sg_dma_len(sg) }; } +void nop_clear_range(struct i915_address_space *vm, u64 start, u64 length); + #endif