mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Dmytro Malovanyi" <dmitrymalovanyy@gmail.com>
Cc: dri-devel@lists.freedesktop.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Harry Wentland <harry.wentland@amd.com>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Patrik Jakobsson <patrik.r.jakobsson@gmail.com>,
	Lyude Paul <lyude@redhat.com>, Danilo Krummrich <dakr@kernel.org>,
	nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] drm/dp: Always use enhanced framing for DPCD r1.2+
Date: Fri, 30 Oct 2026 13:36:31 +0200	[thread overview]
Message-ID: <59106a36510e33e851f76c877f41952b11a8c774@intel.com> (raw)
In-Reply-To: <auR8R7G5S8hv5R0e@intel.com>

On Fri, 30 Oct 2026, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Thu, Oct 29, 2026 at 11:18:22AM +0100, Dmytro Malovanyi wrote:
>> DP 1.2 section 2.2.1.1 says "An upstream device interoperating with a
>> downstream device with DPCD Revision of 1.2 or higher must enable
>> Enhanced Framing Mode". So for r1.2+ the DPCD revision is enough, the
>> DP_ENHANCED_FRAME_CAP bit does not need to be checked.
>> 
>> Some sinks get this bit wrong. The Xiaomi Monitor A24i (P24FBA-RAGL)
>> sets it in the base receiver caps, but clears it in the extended
>> receiver caps at 0x2200, which are the ones we use:
>> 
>>   base:     12 0a c4 01 01 00 01 80 02 00 06 00 00 00 81
>>   extended: 14 0a 44 00 01 00 01 80 02 02 06 00 00 00 81
>> 
>> Through a USB4 dock (CalDigit Element 5) the link trains without
>> enhanced framing (0x202-0x204: 77 77 81), but the sink never syncs to
>> the stream (SINK_STATUS 0x205: 00) and shows "No signal". Forcing RBR
>> does not change it. Connected directly to the laptop the same sink
>> syncs without enhanced framing, at RBR, HBR and HBR2.
>> 
>> Make drm_dp_enhanced_frame_cap() return true for DPCD r1.2+. This
>> changes behaviour for every driver using the helper, but only for sinks
>> which already violate the spec by not setting the bit.
>> 
>> Tested on i915 (Arrow Lake-U), with the dock the link now uses enhanced
>> framing (0x101: 84) and the sink syncs (0x205: 03).
>> 
>> Fixes: a1d926527b79 ("drm/i915: implement EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENT")
>> Cc: stable@vger.kernel.org
>> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17719
>> Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
>> Signed-off-by: Dmytro Malovanyi <dmitrymalovanyy@gmail.com>
>> ---
>>  include/drm/display/drm_dp_helper.h | 4 ++++
>>  1 file changed, 4 insertions(+)
>> 
>> diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
>> index 5b05a7fbe..4f20f60db 100644
>> --- a/include/drm/display/drm_dp_helper.h
>> +++ b/include/drm/display/drm_dp_helper.h
>> @@ -160,6 +160,10 @@ drm_dp_max_lane_count(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
>>  static inline bool
>>  drm_dp_enhanced_frame_cap(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
>>  {
>> +	/* DP 1.2 2.2.1.1: enhanced framing is mandatory for DPCD r1.2+ */
>
> DP_ENHANCED_FRAME_CAP is also mandatory so I think this needs
> a bit more detailed explanation.

Commit message not enough?

I think the wording in the specs suggest that with DPCD r1.2+ you should
just enable enhanced framing regardless of the cap.

BR,
Jani.

>
>> +	if (dpcd[DP_DPCD_REV] >= 0x12)
>> +		return true;
>> +
>>  	return dpcd[DP_DPCD_REV] >= 0x11 &&
>>  		(dpcd[DP_MAX_LANE_COUNT] & DP_ENHANCED_FRAME_CAP);
>>  }
>> -- 
>> 2.50.1 (Apple Git-155)

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-10-30 11:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 10:18 [PATCH v2 0/5] " Dmytro Malovanyi
2026-10-29 10:18 ` [PATCH v2 1/5] " Dmytro Malovanyi
2026-10-29 11:54   ` Jani Nikula
2026-10-30 11:15   ` Ville Syrjälä
2026-10-30 11:36     ` Jani Nikula [this message]
2026-10-30 11:44       ` Ville Syrjälä
2026-10-29 10:18 ` [PATCH v2 2/5] drm/bridge: cdns-mhdp8546: Use drm_dp_enhanced_frame_cap() Dmytro Malovanyi
2026-10-29 11:58   ` Jani Nikula
2026-10-29 10:18 ` [PATCH v2 3/5] drm/bridge: it6505: " Dmytro Malovanyi
2026-10-29 12:01   ` Jani Nikula
2026-10-29 10:18 ` [PATCH v2 4/5] drm/gma500: " Dmytro Malovanyi
2026-10-29 12:03   ` Jani Nikula
2026-10-29 10:18 ` [PATCH v2 5/5] drm/nouveau: Use enhanced framing for DPCD r1.2+ Dmytro Malovanyi
2026-10-29 12:07   ` Jani Nikula

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=59106a36510e33e851f76c877f41952b11a8c774@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dakr@kernel.org \
    --cc=dmitrymalovanyy@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=lyude@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=patrik.r.jakobsson@gmail.com \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --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

all inboxes | Powered by JetHome®