From patchwork Thu Feb 29 16:39:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Golani, Mitulkumar Ajitkumar" X-Patchwork-Id: 13577389 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 56A2EC54E4A for ; Thu, 29 Feb 2024 16:47:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 68DCC10E57C; Thu, 29 Feb 2024 16:47:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="jUW/W/Rk"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FF1110E1EF; Thu, 29 Feb 2024 16:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709225214; x=1740761214; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KhuxIvX09O4xbwz7fXGF/hhFg16NtD5KBBVU0rcTvwU=; b=jUW/W/Rkr1PYe2ZrwVGQZUQ8n0GTf21OoAHMfHJpdZIUXbDeCletFpt9 Mc1XAVGUMqkl8QHVEeVZx9LlaRdShi+x/5a6ZZpOAPhsFmWgFKm2DIWLe SDawietoaSY9vu+fjbWKP9bdcZsk6v4w9LJacsjxoy5Zit1tab+Rg+T1Y ZTrIP5y9fPAxJXZd7IU6F79z0sDufd90oHyCklaEPZlC2Zv5j9pRWpit6 wOyEYXnDpo7p542qNizLw4CFpnpFWe2xCxUDN0bX9DbKhjoNa+PSqFqAu ewElbhl9JknzrASylMK9mx58HyqokoD8/laBRxW4E4RFiWnjgEKnvqB0i Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="3877582" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="3877582" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 08:46:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="7811561" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa010.jf.intel.com with ESMTP; 29 Feb 2024 08:46:49 -0800 From: Mitul Golani To: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, jani.nikula@intel.com, ankit.k.nautiyal@intel.com, Mitul Golani Subject: [PATCH v14 3/9] drm: Add crtc state dump for Adaptive Sync SDP Date: Thu, 29 Feb 2024 22:09:51 +0530 Message-Id: <20240229163957.2948182-4-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240229163957.2948182-1-mitulkumar.ajitkumar.golani@intel.com> References: <20240229163957.2948182-1-mitulkumar.ajitkumar.golani@intel.com> MIME-Version: 1.0 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add crtc state dump for Adaptive Sync SDP to know which crtc specifically caused the failure. Signed-off-by: Mitul Golani --- .../gpu/drm/i915/display/intel_crtc_state_dump.c | 13 +++++++++++++ drivers/gpu/drm/i915/display/intel_display_types.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c index 4bcf446c75f4..1e4618271156 100644 --- a/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c +++ b/drivers/gpu/drm/i915/display/intel_crtc_state_dump.c @@ -51,6 +51,15 @@ intel_dump_infoframe(struct drm_i915_private *i915, hdmi_infoframe_log(KERN_DEBUG, i915->drm.dev, frame); } +static void +intel_dump_dp_as_sdp(struct drm_i915_private *i915, + const struct drm_dp_as_sdp *as_sdp) +{ + struct drm_printer p = drm_dbg_printer(&i915->drm, DRM_UT_KMS, "AS_SDP"); + + drm_dp_as_sdp_log(&p, as_sdp); +} + static void intel_dump_dp_vsc_sdp(struct drm_i915_private *i915, const struct drm_dp_vsc_sdp *vsc) @@ -302,6 +311,10 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config, if (pipe_config->infoframes.enable & intel_hdmi_infoframe_enable(DP_SDP_VSC)) intel_dump_dp_vsc_sdp(i915, &pipe_config->infoframes.vsc); + if (pipe_config->infoframes.enable & + intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC)) + intel_dump_dp_as_sdp(i915, &pipe_config->infoframes.as_sdp); + if (pipe_config->has_audio) intel_dump_buffer(i915, "ELD: ", pipe_config->eld, diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 8ce986fadd9a..1256730ea276 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1335,6 +1335,7 @@ struct intel_crtc_state { union hdmi_infoframe hdmi; union hdmi_infoframe drm; struct drm_dp_vsc_sdp vsc; + struct drm_dp_as_sdp as_sdp; } infoframes; u8 eld[MAX_ELD_BYTES];