From patchwork Tue Jan 17 11:53:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nirmoy Das X-Patchwork-Id: 13104547 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 EBCDCC3DA78 for ; Tue, 17 Jan 2023 11:54:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2588010E4A3; Tue, 17 Jan 2023 11:54:02 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 251F410E4A7; Tue, 17 Jan 2023 11:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673956440; x=1705492440; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a2PrZR1jiz8LYR3o3jCE3Q/50K+woVErDZP+Cs7VUzU=; b=PyfTk47CdGaWTnM1v0FiTDb8+EkZl1aiCgSJTVCAGArFWmyRyoZqIUps n3mcCclDLHAgNNQKksnEm3SLsCcrc/1xaWshePiCJiToFpheMldNxkQf2 HLXJJawtyneIqgmSGj87hlZwzDMXepOMMiuNe14bgkMPSRCmj6tu7HCVO 0nEyi2wtyZlFDfLF9Yt+UJupdbpamcSrcqVWRN8oiTbEQgW0Lj2bO4iSN xQQ/YOU4nWvjrC7FaKfTbkMjH5pnqLJX32QyNvuf6OszdaVU0bCtk7ILq 7nS1tV27WzoKMeXjQCZdDzBuGHLm+eha47YwUaQYTecZGF8/2q11vS3iY Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="326744753" X-IronPort-AV: E=Sophos;i="5.97,222,1669104000"; d="scan'208";a="326744753" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2023 03:53:59 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="767251903" X-IronPort-AV: E=Sophos;i="5.97,222,1669104000"; d="scan'208";a="767251903" Received: from nirmoyda-desk.igk.intel.com ([10.102.42.231]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2023 03:53:58 -0800 From: Nirmoy Das To: intel-gfx@lists.freedesktop.org Date: Tue, 17 Jan 2023 12:53:50 +0100 Message-Id: <20230117115350.1071-2-nirmoy.das@intel.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230117115350.1071-1-nirmoy.das@intel.com> References: <20230117115350.1071-1-nirmoy.das@intel.com> MIME-Version: 1.0 Organization: Intel Deutschland GmbH, Registered Address: Am Campeon 10, 85579 Neubiberg, Germany, Commercial Register: Amtsgericht Muenchen HRB 186928 Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Ratelimit debug log in vm_fault_ttm 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: , Cc: Matthew Auld , dri-devel@lists.freedesktop.org, Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Test like i915_gem_mman_live_selftests/igt_mmap_migrate can cause dmesg spamming. Use ratelimit api to reduce log rate. References: https://gitlab.freedesktop.org/drm/intel/-/issues/7038 Cc: Matthew Auld Reviewed-by: Matthew Auld Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index 8cfed1bef629..25294ddbee46 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c @@ -1077,8 +1077,9 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf) } if (err) { - drm_dbg(dev, "Unable to make resource CPU accessible(err = %pe)\n", - ERR_PTR(err)); + drm_dbg_ratelimited(dev, + "Unable to make resource CPU accessible(err = %pe)\n", + ERR_PTR(err)); dma_resv_unlock(bo->base.resv); ret = VM_FAULT_SIGBUS; goto out_rpm;