From patchwork Wed Dec 6 21:09:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 13482283 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 66B0FC10DC1 for ; Wed, 6 Dec 2023 21:10:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 68B6110E0C2; Wed, 6 Dec 2023 21:10:11 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C62910E0C2; Wed, 6 Dec 2023 21:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701897009; x=1733433009; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=S8DzasmKalhH9QoxINouAITQkW99a3IA1JGy7jft/VM=; b=itcu/raTYj18iyBtlvlc+dp8eenP1JuGLamuclPVLi5xlHOz1VJQM6aP YknbWttaUHhleCe43qGcXHQaoR78HyYwYWMvOxXRjKONUYjbJ3k2Hih3P XGkWgxpxqRMcO8zcs9HC8imBcjbHVqeaEyZaSZoyJwGKaQXN6fc0G4o6d 0thETPA8w28zTcqQ0gFR1DYZS/cnjTAWG9pQQ4oaFiv8sKpcK48BK//Dw RPUAxibyqaTOacjbGUvWwfNGIJPaF54xU1rwYzMscoQqzxXdzl6Sly+Ic 87NJFj6CPh3IcBT3lCIAsdkNP5dd+Ngn4tJLPNEuYtu8FgR/205GdnG8o A==; X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="396917248" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="396917248" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 13:10:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="894879945" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="894879945" Received: from karthik-mobl.ger.corp.intel.com (HELO intel.com) ([10.252.46.178]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 13:10:05 -0800 From: Andi Shyti To: intel-gfx , dri-devel Date: Wed, 6 Dec 2023 22:09:47 +0100 Message-ID: <20231206210948.106238-2-andi.shyti@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231206210948.106238-1-andi.shyti@linux.intel.com> References: <20231206210948.106238-1-andi.shyti@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH RESEND AGAIN v2 1/2] drm/print: Add drm_dbg_ratelimited 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: Andrzej Hajda , Thomas Zimmermann , Sam Ravnborg , Maxime Ripard , Matthew Auld , Daniel Vetter , David Airlie , Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Nirmoy Das Add a function for ratelimitted debug print. Signed-off-by: Nirmoy Das Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Matthew Auld Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Reviewed-by: Sam Ravnborg Signed-off-by: Andi Shyti --- include/drm/drm_print.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index dd4883df876a..5ed26a702e3e 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -602,6 +602,9 @@ void __drm_err(const char *format, ...); drm_dev_printk(drm_ ? drm_->dev : NULL, KERN_DEBUG, fmt, ## __VA_ARGS__); \ }) +#define drm_dbg_ratelimited(drm, fmt, ...) \ + __DRM_DEFINE_DBG_RATELIMITED(DRIVER, drm, fmt, ## __VA_ARGS__) + #define drm_dbg_kms_ratelimited(drm, fmt, ...) \ __DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__) From patchwork Wed Dec 6 21:09:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 13482284 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 AA903C4167B for ; Wed, 6 Dec 2023 21:10:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B730310E7A6; Wed, 6 Dec 2023 21:10:17 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0E02010E78F; Wed, 6 Dec 2023 21:10:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701897016; x=1733433016; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=V99BWq/BClbvoctYkxrVbW5ahi33E7ki9yPATHuwTws=; b=WIeTQ0UtCL2r0PeEJJ8eT+vQBqn9Mcs6mtEe4bQxqrFoh9MyXIsGOiZY mGjaTkQ1AcOv3yclycmEASCzLNDV0YFsPZQ+rSHpXi4tBnZax37yoZ2CJ DHuc4798xqthQIE1NHjsQLbl4Nu3Hn94bBMJgqS6jLGINYjubpoUgAd9F GuL7+lL+6ee5ynLqpIbV08swbzO13dTYwE8sc3zwubmJ62WDh33dng21J tr9LHrsPHrFx1q9DcrOrdPtnim38wCQx8tMLZd5fdpAK+dEV92tXeoqIh M5a/AhUAoF0BKxLHjxUlInikJ/IgpL0wsxwnHS1fhc1lUzggjeQW763B0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="396917288" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="396917288" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 13:10:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10916"; a="894879986" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="894879986" Received: from karthik-mobl.ger.corp.intel.com (HELO intel.com) ([10.252.46.178]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 13:10:12 -0800 From: Andi Shyti To: intel-gfx , dri-devel Date: Wed, 6 Dec 2023 22:09:48 +0100 Message-ID: <20231206210948.106238-3-andi.shyti@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231206210948.106238-1-andi.shyti@linux.intel.com> References: <20231206210948.106238-1-andi.shyti@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH RESEND AGAIN v2 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: Andrzej Hajda , Thomas Zimmermann , Sam Ravnborg , Maxime Ripard , Matthew Auld , Daniel Vetter , David Airlie , Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Nirmoy Das 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 Signed-off-by: Nirmoy Das Cc: Matthew Auld Reviewed-by: Matthew Auld Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-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 9227f8146a58..6b69ef0cdbb4 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c @@ -1101,8 +1101,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;