From patchwork Tue Oct 10 12:15:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 13415302 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 2BE21CD80B7 for ; Tue, 10 Oct 2023 12:16:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8059210E33E; Tue, 10 Oct 2023 12:16:45 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8875C10E33C; Tue, 10 Oct 2023 12:16:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696940203; x=1728476203; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4b290UuADYzo8HimFx6+MUFP60YFM6y6WoHDK+i2AvE=; b=Z+wHlrz/ypoVJFqd3zfJ3mQ7bmOA0eTK6NlIUdp7f9TpEZaw8FjoQ/l9 FsC3F89rX+gvWkpLYM2lN3riR+3meZn2UE1Z3t38Q67w99CxdBzLb0BIx rUwMwsboNHop3U1fzdFHfuMNWT4UexApB62eIx1VqcDVEo+z9h8fXIcP1 N+RsHo6cm+/yhnb+flcNRYtBzQNYDp7qcQFXI3rpmx4b+y6mm5EEZhUqx ZsiQ9bTy91coql7OT9sfDTFy63u1FS1qu35TQcWmCjdJA4E6yet+gCyVC 74Iwy+4n3dqmS4cUl5oODed/G+eGiZZDgWMR69QBDLmt3fe/ENsDNqXBW g==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="470641536" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="470641536" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 05:16:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="753384989" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="753384989" Received: from ppalanyk-mobl.gar.corp.intel.com (HELO intel.com) ([10.213.148.82]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 05:16:34 -0700 From: Andi Shyti To: intel-gfx , dri-devel Date: Tue, 10 Oct 2023 14:15:44 +0200 Message-Id: <20231010121545.1046793-2-andi.shyti@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231010121545.1046793-1-andi.shyti@linux.intel.com> References: <20231010121545.1046793-1-andi.shyti@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH RESEND 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 a93a387f8a1a..ad77ac4b6808 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 Tue Oct 10 12:15:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 13415303 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 0690ACD80B7 for ; Tue, 10 Oct 2023 12:17:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 387D710E1EC; Tue, 10 Oct 2023 12:17:17 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A42410E1E7; Tue, 10 Oct 2023 12:17:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696940233; x=1728476233; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z0Tza+/umRIrseJOU8xgUOGIETM+RdAwkixwca8zxlg=; b=eqmiAO6BACZxi7wsT0P21A2UoCRXS6lm9cGkAwGE2X75l8XnOCwDNNI3 DA//HLxlh+1i824hSwwi74pIAGCMenTQ5ScWDRGEabu1XstYldn5xscD3 mL6Ifm96uiKMJczeXmjg/LzNqiiltuSAMBp9IhF7ZrfEk3BcRwg24k2ti 1wg/TUngOt1L6KZzKx4nzVbi1JKYrdJ2mzJqraLBbSIzOfsjafK0ql276 YMm+OoTZyM29xUaa0F1Bh0/5c5FjEeU/3co4binI+Z2nxNyY7mgpTyztG 7aGLL1RD9x0jCF06QnE8mv+YcrFDsz+FiSDeEe2exINZQJbWlT39yxk8T w==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="369442282" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="369442282" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 05:16:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="897168803" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="897168803" Received: from ppalanyk-mobl.gar.corp.intel.com (HELO intel.com) ([10.213.148.82]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 05:15:06 -0700 From: Andi Shyti To: intel-gfx , dri-devel Date: Tue, 10 Oct 2023 14:15:45 +0200 Message-Id: <20231010121545.1046793-3-andi.shyti@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231010121545.1046793-1-andi.shyti@linux.intel.com> References: <20231010121545.1046793-1-andi.shyti@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH RESEND 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;