From patchwork Tue Feb 20 14:19:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manna, Animesh" X-Patchwork-Id: 13564098 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 109D4C5475B for ; Tue, 20 Feb 2024 14:33:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7206310E455; Tue, 20 Feb 2024 14:33:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WYgpOgpP"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 32F2E10E455 for ; Tue, 20 Feb 2024 14:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708439625; x=1739975625; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=v32jO/cwHulbbHQpaO+2YPoTw9ep3itKcH31GnSv9cE=; b=WYgpOgpPzmfMxRcu3BhxadvGZXj50l3KyfZNe1hfhUjxlh3tSa3VFb7B l2WTRvm2Xk/a9jDIHlHraX5UoFzgqAtVs2MU5ISrqrcvt8Arenw8L6+Wu vLVL6+J8BtiJkKqpT7ddGtELzO5GQUmUTd/K3OWAFAQ/vdaxHHHmB8KoT PfBahRFo6rqayIAdL7/3PwE8wTqUlRMRgItkrW6sARvvjnawSSWgZBsRg OgCZMTeZstLmkMM5I+pZFO7dBkyWvS2cpQvo0e49JcL3WG6XVtTAYFgNL SRA2y0inx/7dSUmZXV0S9rbASkfWj2ao1AxckOb1AlJ2HdSGLInJGkmeC A==; X-IronPort-AV: E=McAfee;i="6600,9927,10989"; a="2655043" X-IronPort-AV: E=Sophos;i="6.06,172,1705392000"; d="scan'208";a="2655043" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2024 06:33:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,172,1705392000"; d="scan'208";a="4760575" Received: from srr4-3-linux-101-amanna.iind.intel.com ([10.223.74.76]) by fmviesa009.fm.intel.com with ESMTP; 20 Feb 2024 06:33:42 -0800 From: Animesh Manna To: intel-gfx@lists.freedesktop.org Cc: ville.syrjala@linux.intel.com, jouni.hogander@intel.com, arun.r.murthy@intel.com, Animesh Manna Subject: [PATCH v3] drm/i915/panelreplay: Panel replay workaround with VRR Date: Tue, 20 Feb 2024 19:49:19 +0530 Message-Id: <20240220141919.3502674-1-animesh.manna@intel.com> X-Mailer: git-send-email 2.29.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" Panel Replay VSC SDP not getting sent when VRR is enabled and W1 and W2 are 0. So Program Set Context Latency in TRANS_SET_CONTEXT_LATENCY register to at least a value of 1. HSD: 14015406119 v1: Initial version. v2: Update timings stored in adjusted_mode struct. [Ville] v3: Add WA in compute_config(). [Ville] Signed-off-by: Animesh Manna --- drivers/gpu/drm/i915/display/intel_dp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 217196196e50..eb0fa513cd0f 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2948,6 +2948,18 @@ intel_dp_compute_config(struct intel_encoder *encoder, intel_dp_compute_vsc_sdp(intel_dp, pipe_config, conn_state); intel_dp_compute_hdr_metadata_infoframe_sdp(intel_dp, pipe_config, conn_state); + /* + * WA: HSD-14015406119 + * Program Set Context Latency in TRANS_SET_CONTEXT_LATENCY register + * to at least a value of 1 when Panel Replay is enabled with VRR. + * Value for TRANS_SET_CONTEXT_LATENCY is calculated by substracting + * crtc_vdisplay from crtc_vblank_start, so incrementing crtc_vblank_start + * by 1 if both are equal. + */ + if (pipe_config->vrr.enable && pipe_config->has_panel_replay && + adjusted_mode->crtc_vblank_start == adjusted_mode->crtc_vdisplay) + adjusted_mode->crtc_vblank_start += 1; + return 0; }