From patchwork Tue Jan 17 11:53:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nirmoy Das X-Patchwork-Id: 13104549 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 A4A53C63797 for ; Tue, 17 Jan 2023 11:54:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 60BA810E4A4; 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 9967C10E4A4; Tue, 17 Jan 2023 11:53:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673956439; x=1705492439; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=zY6x6erYncaDzv05B6FWcty+zwpT4FccOl8jUshpKkY=; b=MD9CJbUYBvcmTk1jM06Kutw135Zj6feFOcAJdr1HGLXcdO2OHexB2UN2 /nqN1kJj5/u/Ug3LCJxLnz4Aj3urjXAzkM8jNxbGoatFi7wCq/UR0AoOL kNoh7lB4p6jYVQ2L1QjVYCef0u+a559/hdi2Eqh1ZZrl2Gw5GeX0UIhlt cYK0GQA9EILJ/qzPV/qsBSWXvSGNAdB8q+u3tv5rie+HPAop2jwhGU9mz JrMiowoK/OTiw8w7N8rb5yS8nIALm58Ns1detsgQVsdN+BrOgo+IUY6M8 1TVpWYs1cuxRJWpiWQDy3/GcdufeSwqPHzp9iVODuNIckItvNgAzoir8+ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="326744746" X-IronPort-AV: E=Sophos;i="5.97,222,1669104000"; d="scan'208";a="326744746" 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="767251895" X-IronPort-AV: E=Sophos;i="5.97,222,1669104000"; d="scan'208";a="767251895" 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:56 -0800 From: Nirmoy Das To: intel-gfx@lists.freedesktop.org Subject: [PATCH 1/2] drm/print: Add drm_dbg_ratelimited Date: Tue, 17 Jan 2023 12:53:49 +0100 Message-Id: <20230117115350.1071-1-nirmoy.das@intel.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Organization: Intel Deutschland GmbH, Registered Address: Am Campeon 10, 85579 Neubiberg, Germany, Commercial Register: Amtsgericht Muenchen HRB 186928 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matthew Auld , dri-devel@lists.freedesktop.org, Thomas Zimmermann , Nirmoy Das Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Reviewed-by: Sam Ravnborg --- 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 a44fb7ef257f..1d839f507319 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__)