From patchwork Fri Oct 6 13:26:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 13411522 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 CDCFAE81DFB for ; Fri, 6 Oct 2023 13:26:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C90510E4E4; Fri, 6 Oct 2023 13:26:35 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC6B810E1E9; Fri, 6 Oct 2023 13:26:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696598792; x=1728134792; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=UAgRlcuOey+hW3kwVaYUGKWmltIcll8TSbj5HIb6aJA=; b=cKbwprZwJJ3enGQ4+DEQ40S23bsTzjvJbjIaeg2gc7qiX8736Ildp/86 Z6GUojqxKa6RL0DV2O9bU0c6hGXAH4NSqvnGu84zvSXCsZGCOQY7QXPpg AvJBS0vbGZZ8MUv3O9FPHL2LrQ1T6zB7zqm99x6pyO9jKtGM9+R9LldFx CHVuDfaW8KzVOYvlOEHJYIYjV2ebBCAAYT154exwIs6PeFKiJdgd5eyfS oHaWDXJLXFz5HNil4MB0lgJQvuQBpN9pTl9mROXNpz/e6h5W1cjaJMIql 4kWke+Ifxl4xnkzGTlcriJc6YN62s0jXcN92ZSPNaOUloCWXy461VNCAY w==; X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="374096368" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="374096368" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 06:26:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="728839621" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="728839621" Received: from suthengc-mobl1.gar.corp.intel.com (HELO intel.com) ([10.215.154.2]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 06:26:23 -0700 From: Andi Shyti To: intel-gfx , dri-devel Date: Fri, 6 Oct 2023 15:26:06 +0200 Message-Id: <20231006132606.810110-1-andi.shyti@linux.intel.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] 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: Thomas Zimmermann , 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. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Matthew Auld Reviewed-by: Andi Shyti Signed-off-by: Nirmoy Das 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__)