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 4E958FD5F98 for ; Wed, 8 Apr 2026 08:58:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E5DE110E5A3; Wed, 8 Apr 2026 08:57:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="LtXYilEU"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3FF6510E5B7; Wed, 8 Apr 2026 08:57:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775638679; x=1807174679; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5cW2FCibFvSHNgBH78UGUtxwxJ658xGT7zSnghT/zeo=; b=LtXYilEUBHLZejGcTEMZz7WScdpikN1UdmR+xPE9IIp9gaD0UCTWBAAW RQ6+g3oI7/Taw/UiP7SzCN6Lu/yR9eNiwagAFdERydXr1B5ekRHpM5z5C uI1XCuH0aJqwWTZIjXjBmTaWI/Kmj1I/vGKQU2KV3/GliSB70WWa741er XnKujnDujHoNR2Vv61n777TKNeQEQcm8vGldpUmI+tO0sHZwwCdFCNjLD 4B8jR7FI7alFljvLa/ZdrazvWCP9UYnYd6lvi9EGWc1ApqMXV6GnvR1bA cRKHrlrR+AIUon60fm3klq6JM2u6WCisvwgCKgE+fGIuCOv7C9f5daQEm A==; X-CSE-ConnectionGUID: bdNTQDEnSUe54Wnup7IH1A== X-CSE-MsgGUID: 8DF7/Z0CSqy3p4ToZi5CxQ== X-IronPort-AV: E=McAfee;i="6800,10657,11752"; a="76516637" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="76516637" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 01:57:58 -0700 X-CSE-ConnectionGUID: YnPyonHXTceoNFV8HA8+GQ== X-CSE-MsgGUID: kHeUXAWCSzmu6gwhpwujbw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="227572517" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 01:57:55 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: ville.syrjala@linux.intel.com, jouni.hogander@intel.com, animesh.manna@intel.com, Ankit Nautiyal , Mitul Golani Subject: [PATCH 08/26] drm/i915/dp: Fix readback for target_rr in Adaptive Sync SDP Date: Wed, 8 Apr 2026 14:12:20 +0530 Message-ID: <20260408084239.1295325-9-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260408084239.1295325-1-ankit.k.nautiyal@intel.com> References: <20260408084239.1295325-1-ankit.k.nautiyal@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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" Correct the bit-shift logic to properly readback the 10 bit target_rr from DB3 and DB4. v2: Align the style with readback for vtotal. (Ville) Fixes: 12ea89291603 ("drm/i915/dp: Add Read/Write support for Adaptive Sync SDP") Cc: Mitul Golani Cc: Ankit Nautiyal Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 602efaf500bd..49eeb35973a1 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -5298,7 +5298,7 @@ int intel_dp_as_sdp_unpack(struct drm_dp_as_sdp *as_sdp, as_sdp->length = sdp->sdp_header.HB3 & DP_AS_SDP_LENGTH_MASK; as_sdp->mode = sdp->db[0] & DP_AS_SDP_OPERATION_MODE_MASK; as_sdp->vtotal = (sdp->db[2] << 8) | sdp->db[1]; - as_sdp->target_rr = (u64)sdp->db[3] | ((u64)sdp->db[4] & 0x3); + as_sdp->target_rr = ((sdp->db[4] & 0x3) << 8) | sdp->db[3]; as_sdp->target_rr_divider = sdp->db[4] & 0x20 ? true : false; return 0; -- 2.45.2