From patchwork Fri Mar 1 08:44:57 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: 13578166 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 466A5C5475B for ; Fri, 1 Mar 2024 08:52:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 025D710EC0D; Fri, 1 Mar 2024 08:51:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="k3FqT3Jl"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 140A910EC0D; Fri, 1 Mar 2024 08:51:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709283117; x=1740819117; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FQSwVbk0GjfRCtFqTiHg+5ZBLMtKEj3aCARUJiU3eq4=; b=k3FqT3JlxUZl9Jo73XiWY9o6ODJ7h3m6uy5bPnp5WWem7oVoVcWePvhv bV6MBN+VVmvKRaSM5UXo9WHKwFKQt7ZvqnnXfJLswmYjfGpE1SAGpVY6R UVTaWkfwfmLf3mIsF/Hi6SbfuLpCNhKHBV2r8+BA88eUFjf2P6g3abPid IU/V6WASJfHj4hIZ/Kgmib51Dn/DWRfi0rNn6L2GdinaE5ZWNPkv89pHL sncckdSmAcgrJloFb+/EapPehxhPeG9tuJpLBM2qsoDP35wfJoYQbgnV0 dFDqr8scWk10GoiuV8sJYWmTVhJSYzlwrScE3nnlSA58b9RlFOQ6Gg9zz g==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="14516480" X-IronPort-AV: E=Sophos;i="6.06,195,1705392000"; d="scan'208";a="14516480" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 00:51:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,195,1705392000"; d="scan'208";a="38986455" Received: from mgolanimitul-x299-ud4-pro.iind.intel.com ([10.190.239.114]) by orviesa002.jf.intel.com with ESMTP; 01 Mar 2024 00:51:56 -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 v15 3/9] drm: Add crtc state dump for Adaptive Sync SDP Date: Fri, 1 Mar 2024 14:14:57 +0530 Message-Id: <20240301084503.2971826-4-mitulkumar.ajitkumar.golani@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240301084503.2971826-1-mitulkumar.ajitkumar.golani@intel.com> References: <20240301084503.2971826-1-mitulkumar.ajitkumar.golani@intel.com> 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" Add crtc state dump for Adaptive Sync SDP to know which crtc specifically caused the failure. Signed-off-by: Mitul Golani Reviewed-by: Ankit Nautiyal --- .../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 860e867586f4..098957cea25b 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1338,6 +1338,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];