public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: [PATCH v2 4/6] drm/i915/dp: Keep cached LTTPR mode up-to-date
Date: Mon,  8 Jul 2024 22:00:27 +0300	[thread overview]
Message-ID: <20240708190029.271247-5-imre.deak@intel.com> (raw)
In-Reply-To: <20240708190029.271247-1-imre.deak@intel.com>

Nothing depends on the cached LTTPR mode, however for consistency keep
it up-to-date with the value programmed to the DPCD register.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_link_training.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
index 56b9c5cb1254d..af0b71bdf1fcf 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
@@ -114,7 +114,13 @@ intel_dp_set_lttpr_transparent_mode(struct intel_dp *intel_dp, bool enable)
 	u8 val = enable ? DP_PHY_REPEATER_MODE_TRANSPARENT :
 			  DP_PHY_REPEATER_MODE_NON_TRANSPARENT;
 
-	return drm_dp_dpcd_write(&intel_dp->aux, DP_PHY_REPEATER_MODE, &val, 1) == 1;
+	if (drm_dp_dpcd_write(&intel_dp->aux, DP_PHY_REPEATER_MODE, &val, 1) != 1)
+		return false;
+
+	intel_dp->lttpr_common_caps[DP_PHY_REPEATER_MODE -
+				    DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV] = val;
+
+	return true;
 }
 
 static bool intel_dp_lttpr_transparent_mode_enabled(struct intel_dp *intel_dp)
-- 
2.43.3


  parent reply	other threads:[~2024-07-08 19:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08 19:00 [PATCH v2 0/6] drm/i915/dp: Fix LTTPR detection Imre Deak
2024-07-08 19:00 ` [PATCH v2 1/6] drm/i915/dp: Reset intel_dp->link_trained before retraining the link Imre Deak
2024-07-11  9:38   ` Nautiyal, Ankit K
2024-07-08 19:00 ` [PATCH v2 2/6] drm/i915/dp: Don't switch the LTTPR mode on an active link Imre Deak
2024-07-11  9:40   ` Nautiyal, Ankit K
2024-07-08 19:00 ` [PATCH v2 3/6] drm/i915/dp: Reset cached LTTPR count if number of LTTPRs is unsupported Imre Deak
2024-07-11  9:41   ` Nautiyal, Ankit K
2024-07-08 19:00 ` Imre Deak [this message]
2024-07-11  9:42   ` [PATCH v2 4/6] drm/i915/dp: Keep cached LTTPR mode up-to-date Nautiyal, Ankit K
2024-07-08 19:00 ` [PATCH v2 5/6] drm/dp: Add helper to dump an LTTPR PHY descriptor Imre Deak
2024-07-11  9:43   ` Nautiyal, Ankit K
2024-07-08 19:00 ` [PATCH v2 6/6] drm/i915/dp: Dump the LTTPR PHY descriptors Imre Deak
2024-07-11  9:50   ` Nautiyal, Ankit K
2024-07-11 10:53     ` Imre Deak
2024-07-08 19:50 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp: Fix LTTPR detection (rev2) Patchwork
2024-07-08 19:50 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-07-08 19:59 ` ✓ Fi.CI.BAT: success " Patchwork
2024-07-09 11:12 ` ✓ Fi.CI.IGT: " Patchwork
2024-07-11 18:49   ` Imre Deak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240708190029.271247-5-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox