From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796329440; b=nIfW8q4Pk9IAxB4WQ01WOj1JlU2Mx1mGAAIJ02x/f+9eb9183lwSCIybYiB7+841B5DR hyc4cJcZ8tdUpwECQ1DY37U+Dqa+LuA8GzLnxxH6ICwK7ZnAiFSg/YHgHijy05gz/FT28 07HPpDnIgjJypwy2zEh6CWKOE9RCzl6RO61KEthe/+nO1GaQF4t/UXl0WZhjVgHkM/HPX JwDdgXKDx6UlQGT3EghtItOv0aZkQ5ynU1mbXIQclCwodURfMPbbu3au+ME809ESKwfs5 N3JWy4wgyLxiVjPSF68LXNpOcqlkia7voDrwkJ3npjgZeu3Do1660pEIhv3afEHhG7w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796329440; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:From:To:Cc:Subject: In-Reply-To:Organization:References:Date:Message-ID:MIME-Version: Content-Type; bh=+yEPvWqFoAhWfbALla59NOP6kdGR45gDd+wjStCovL8=; b=h/n+N2eeEHyYqSWfOq41UXjWfXRr7mQ2hi/pAXRbmcMz4irvLS1MO3QSs6RVCTrjzXwF x5N5Sl1O/qjU76QEwTGTIIfd3DiMCATzB1u7LduT7a10fEtzcH3Tcri3pM+VXkDc/SES/ eGt4juHwh8mlJK0Y+H8a9Vv1adGK+EkDL3B4T0HANaJHMK0ajl0Mw8FXLuA/vb8263VLP J7gMU1W/ZMv76c0nVY3dLlP9e61Aa3L9b5CtNgYiTlvxss+qaUnF5tTUuZmFWTK1GqUwp tPyePJ6mLegXgW+6Erba5c6Y9utr/yzIGMj2MPAMnNThO3NGkji6/U0NOEr9WVuRL/g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=M2VBtz3P; arc=none smtp.remote-ip=198.175.65.11 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0AD2B606A689 for ; Thu, 3 Dec 2026 20:23:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0AD2B606A689 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=M2VBtz3P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796329440; x=1827865440; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=+yEPvWqFoAhWfbALla59NOP6kdGR45gDd+wjStCovL8=; b=M2VBtz3PnMCRj40wOIDDxWKXNZ2dU9sZSC5QZY410hX7Pin1GKWqxKv+ OQD9Ep9v69Lq2F3/9efQ6lkIhXPnenTYAfh7gpIJHf7N8Y9u+4t0tG5g5 rYtIQotxBTCCIYJ3WE+fPl6rIzQ9AzdjaqwGJ/c07NNf3exHJAVmqNfqV TpwwJlYB/OLUezpKgc3gP9ZSBn2YC5jWw6X4jU2bOtkPSyQcUUpwScrlU PC9XInmfrH0vd5vQKRaBoG1d7LmicCPiS7OgOkN3QYzuXY1z/xHDyEjRK GFzBGwm4zJTcr46KeVAz6FkiyqDpo6H9cEm7MaTWFvNjctymMHydH2fp3 A==; X-CSE-ConnectionGUID: +dfBMztpRUON/9Y5WgHcGw== X-CSE-MsgGUID: 4f1Aio3ZSZerlHN1tvWaeQ== X-IronPort-AV: E=McAfee;i="6800,10657,11985"; a="5202433" X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="5202433" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 12:23:59 -0800 X-CSE-ConnectionGUID: 8pdGzQtCTS26U1vuHH7Nzw== X-CSE-MsgGUID: brlEFx98ToKtQm1oRd0k1Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="14137604" Received: from ncintean-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.244.190]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 12:23:56 -0800 From: Jani Nikula To: Eriksen Xie , dri-devel@lists.freedesktop.org Cc: Ville =?utf-8?B?U3lyasOkbMOk?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , linux-kernel@vger.kernel.org, Eriksen Xie Subject: Re: [PATCH] drm/edid: Don't prefer reduced blanking for standard timings on EDID < 1.4 In-Reply-To: <20261203170755.3958928-1-xiaolu.xie@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland References: <20261203170755.3958928-1-xiaolu.xie@intel.com> Date: Thu, 03 Dec 2026 22:23:52 +0200 Message-ID: <59a45731615cc6b5b521625f88fed44d6c4758e7@intel.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain On Fri, 04 Dec 2026, Eriksen Xie wrote: > drm_monitor_supports_rb() can only read the reduced blanking flag from > the range limits descriptor on EDID 1.4. For older EDIDs it just assumes > that every digital sink supports reduced blanking. > > drm_mode_std() uses that to prefer the reduced blanking variant of a > standard timing. The preference was added by > commit f6e252bac45c ("drm/edid: Allow drm_mode_find_dmt to hunt for reduced-blanking modes") > and only took effect once > commit 383a6d5fdd9a ("drm/edid: Add the reduced blanking DMT modes to the DMT list") > added the RB entries to the DMT table. > > As a result a sink that lists, for example, 1920x1200@60 as a standard > timing (DMT 0x45, 193.25 MHz) gets DMT 0x44 (154.0 MHz, RB) instead, > even if its EDID is 1.3 with only GTF range limits and never claims RB > support. 1680x1050@60 and 1280x800@60 are replaced the same way. A DELL > P2715Q (EDID 1.3) is one such sink. Please share the EDID. We might as well add the EDID in the commit message. BR, Jani. > > Where the support is only a guess, keep the plain DMT mode if it is > within the sink's range limits and only fall back to the reduced > blanking mode when it is not, or when there is no range limits > descriptor. That keeps RB for sinks that need it to fit their pixel > clock limit. EDID 1.4 sinks that explicitly declare reduced blanking are > unchanged. > > Signed-off-by: Eriksen Xie > --- > drivers/gpu/drm/drm_edid.c | 54 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 54 insertions(+) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index b8f882a17..a657da8c5 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -3402,6 +3402,45 @@ drm_gtf2_mode(struct drm_device *dev, > return mode; > } > > +static bool mode_in_range(const struct drm_display_mode *mode, > + const struct drm_edid *drm_edid, > + const struct detailed_timing *timing); > + > +struct std_dmt_range_closure { > + const struct drm_display_mode *mode; > + const struct drm_edid *drm_edid; > + bool found; > + bool in_range; > +}; > + > +static void std_dmt_in_range(const struct detailed_timing *timing, void *data) > +{ > + struct std_dmt_range_closure *closure = data; > + > + if (!is_display_descriptor(timing, EDID_DETAIL_MONITOR_RANGE)) > + return; > + > + closure->found = true; > + closure->in_range = mode_in_range(closure->mode, closure->drm_edid, timing); > +} > + > +/* > + * True only if the sink has a range limits descriptor and the plain > + * (non-reduced-blanking) DMT mode is inside it. > + */ > +static bool std_dmt_mode_in_monitor_range(const struct drm_edid *drm_edid, > + const struct drm_display_mode *mode) > +{ > + struct std_dmt_range_closure closure = { > + .mode = mode, > + .drm_edid = drm_edid, > + }; > + > + drm_for_each_detailed_block(drm_edid, std_dmt_in_range, &closure); > + > + return closure.found && closure.in_range; > +} > + > /* > * Take the standard timing params (in this case width, aspect, and refresh) > * and convert them into a real mode using CVT/GTF/DMT. > @@ -3473,6 +3512,21 @@ static struct drm_display_mode *drm_mode_std(struct drm_connector *connector, > > /* check whether it can be found in default mode table */ > if (drm_monitor_supports_rb(drm_edid)) { > + /* > + * Before EDID 1.4 reduced blanking support is only guessed, so > + * don't let the guess replace the timing the sink listed: keep > + * the plain DMT mode if it is within the sink's range limits. > + */ > + if (drm_edid->edid->revision < 4) { > + mode = drm_mode_find_dmt(dev, hsize, vsize, > + vrefresh_rate, false); > + if (mode) { > + if (std_dmt_mode_in_monitor_range(drm_edid, mode)) > + return mode; > + drm_mode_destroy(dev, mode); > + } > + } > + > mode = drm_mode_find_dmt(dev, hsize, vsize, vrefresh_rate, > true); > if (mode) -- Jani Nikula, Intel