From patchwork Fri May 17 12:57:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Wajdeczko X-Patchwork-Id: 13666977 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 5F5B3C25B77 for ; Fri, 17 May 2024 12:57:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B171B10EEA6; Fri, 17 May 2024 12:57:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ZAzRHDQp"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2A5EC10EE9D; Fri, 17 May 2024 12:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715950666; x=1747486666; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=UIjknq9H/p1x3eVO1ZvOJBk6p66jGpdvdJktDTeiHKE=; b=ZAzRHDQp1EBV3vJe9UNpqui0M6GnndDwi4vpOmtrzSFgsiZAsMne45U4 El+SM2Wt8hLUZJkSRIU06ErxuVwvrKJzV3xke0K4rlCXpzff1dU9T+KHV mknjF4R3jX7pNcQtT1TvRBpT2hJOeNUWzpyMNqjF1UG9DI253i7VukiB+ qmx2Q0VD7hl9J7Cy/HuTb5WgrleQPM/KatjzRrQ+wM6QiGOungUgrPkGe 2SR9lN/DIquLrsFbRtA75JRDUWBEIjVms9j0lvcR7K8am2FVV0gADJzJJ JR6LtxgMIsggvNbPwUsrqShXafjAXkazcAyITPjaf2jLsYCrZjM2xWSOU w==; X-CSE-ConnectionGUID: +GLd0mZ8SsCpU2FybiOaHw== X-CSE-MsgGUID: EG5VuUpgQtyxWymruYZADw== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="12314177" X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="12314177" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 05:57:45 -0700 X-CSE-ConnectionGUID: H0CcssJORsyPR9pV6KwNuA== X-CSE-MsgGUID: juK8DQE0T2+0pkOk2lmxbQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="31604886" Received: from mwajdecz-mobl.ger.corp.intel.com ([10.94.252.59]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 05:57:44 -0700 From: Michal Wajdeczko To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Michal Wajdeczko , Maxime Ripard , Jani Nikula Subject: [PATCH 0/3] Improve drm printer code Date: Fri, 17 May 2024 14:57:27 +0200 Message-Id: <20240517125730.2304-1-michal.wajdeczko@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" We already have some drm printk functions that need to duplicate a code to get a similar format of the final result, for example: [ ] 0000:00:00.0: [drm:foo] bar [ ] 0000:00:00.0: [drm] foo bar [ ] 0000:00:00.0: [drm] *ERROR* foo Add a generic __drm_dev_vprintk() function that can format the final message like all other existing function do and allows us to keep the formatting code in one place. Above also allows to improve drm_dbg_printer() that today lacks of outputing symbolic name of the caller, like drm_dbg() does. Cc: Maxime Ripard Cc: Jani Nikula Michal Wajdeczko (3): drm/print: Add generic drm dev printk function drm/print: Improve drm_dbg_printer drm/i915: Don't use __func__ as prefix for drm_dbg_printer drivers/gpu/drm/drm_print.c | 50 ++++++++++++---------- drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- drivers/gpu/drm/i915/gt/selftest_context.c | 2 +- include/drm/drm_print.h | 5 +++ 4 files changed, 34 insertions(+), 25 deletions(-)