From patchwork Thu Oct 13 08:40:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nirmoy Das X-Patchwork-Id: 13005739 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 E77B7C4332F for ; Thu, 13 Oct 2022 08:40:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C223E10E508; Thu, 13 Oct 2022 08:40:27 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 70F3B10E508; Thu, 13 Oct 2022 08:40:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665650423; x=1697186423; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xKHdxIv4CwA4m4kX+kREgjAR3kuPjYj7CbjXhpkWhVU=; b=KLu+5EHFlSLM8OVb14WbenqX1X6eBo+J1jhp2//FiABk+mxlnITf/Hbu h2moPKUrlpNlBoiyMtiSsHnLKHishACBlMLwjXyWUZ5zQYksyJ2cQSkou T9LX8ICB0NxJ/UNXCVv19qA1y5rI4ZlBF4CoNhin5e1571/r65hdJI0TY u7hMTKf9C/e89rpq22zlZFQte308wGIUzfzmD4/a2rWEFErrfjbTUAQDG aiA46flIpTrTRMwHc/N+gMGuxBSYhufWA0pLNpaYhjdhSM8yLRTOXE+nN la91l8l+3Z/FL8zyxOFa6S++3dJRYK8LPUrYfTmUcqU2b1zMWVmNeiLh+ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="306655585" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="306655585" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2022 01:40:22 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10498"; a="658098659" X-IronPort-AV: E=Sophos;i="5.95,180,1661842800"; d="scan'208";a="658098659" Received: from nirmoyda-desk.igk.intel.com ([10.102.13.19]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2022 01:40:20 -0700 From: Nirmoy Das To: intel-gfx@lists.freedesktop.org Date: Thu, 13 Oct 2022 10:40:06 +0200 Message-Id: <20221013084007.19843-1-nirmoy.das@intel.com> X-Mailer: git-send-email 2.37.3 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 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: Daniel Vetter , Maxime Ripard , dri-devel@lists.freedesktop.org, Thomas Zimmermann , David Airlie , Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Add a function for ratelimitted debug print. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Nirmoy Das Reviewed-by: Matthew Auld --- 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 22fabdeed297..1e2e26378570 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -562,6 +562,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__)