From patchwork Thu Mar 7 20:39:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13586257 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 A63A7C54798 for ; Thu, 7 Mar 2024 20:40:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5990F10F546; Thu, 7 Mar 2024 20:40:10 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="RK+kh9Xv"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 199F210F54A; Thu, 7 Mar 2024 20:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709844003; x=1741380003; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iPLq7WWRHXR3x1I/IBCp+ljHLEXkUTNs6qmyxZ+qJ5U=; b=RK+kh9Xv5/ZmtwEm2fHJOuQdFQTj7UnfWIb9gL//7GUoNE2FX8rEcPIS p3gmG3plVO1OYWtUJspX7JozRu1SY4cusmVf7aqrqItI7JRXyHXotQx32 TTSP5ejqZgtXm2eOX7Cv/W7rzpufPs54QQulXcqH0sklflwRASX2J1Ptn NQ4fjWgJ9Mo8Mhp+tu/LS0Ld3VP+liotk73UJfnbLq4ay4+GZxBYLeaOo X3ecn0kokXojx0ixOHS1RXzQlBXFiOkAEaV/ZiED23Pn/Z27rbIjxOjOL jQaVXo4E4FbnZRB/D1lYiIoBiDnZUDTLNj0qLFne+DGoZD1t2Wxv7Gwka A==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4680417" X-IronPort-AV: E=Sophos;i="6.07,107,1708416000"; d="scan'208";a="4680417" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 12:40:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,107,1708416000"; d="scan'208";a="10362419" Received: from tofferse-mobl.ger.corp.intel.com (HELO localhost) ([10.252.33.212]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 12:39:59 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, jani.nikula@intel.com Subject: [PATCH 3/6] drm/modes: switch drm_mode_prune_invalid() to use struct drm_printer Date: Thu, 7 Mar 2024 22:39:35 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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" Use device based debug logging for the mode via drm_printer. This changes the output from the format: [drm:drm_mode_debug_printmodeline] Modeline "6144x3456": 60 1378800 6144 6192 6224 6464 3456 3459 3464 3555 0x48 0x9 [drm:drm_mode_prune_invalid] Not using 6144x3456 mode: CLOCK_HIGH to format: i915 0000:00:02.0: [drm] Rejected mode: "6144x3456": 60 1378800 6144 6192 6224 6464 3456 3459 3464 3555 0x48 0x9 i915 0000:00:02.0: [drm] Rejected mode: "6144x3456": CLOCK_HIGH Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_modes.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 711750ab57c7..0fff5a8d4d81 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -1825,10 +1825,13 @@ void drm_mode_prune_invalid(struct drm_device *dev, DRM_MODE_FMT "\n", DRM_MODE_ARG(mode)); } if (verbose) { - drm_mode_debug_printmodeline(mode); - DRM_DEBUG_KMS("Not using %s mode: %s\n", - mode->name, - drm_get_mode_status_name(mode->status)); + struct drm_printer p; + + p = drm_dbg_printer(dev, DRM_UT_KMS, "Rejected mode:"); + + drm_mode_print(&p, mode); + drm_printf(&p, "\"%s\": %s\n", mode->name, + drm_get_mode_status_name(mode->status)); } drm_mode_destroy(dev, mode); }