From nobody Fri Oct 2 10:08:33 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A88F13C3789 for ; Sun, 2 Aug 2026 17:06:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785690421; cv=none; b=PABzphrBh3ZZJYdirN80ODY3LrE//O/5ICpiUEn0WCwpGhIv30l8h/qlcTn8p7Xd10m3kUZ6smCq5mgc6diNtw5DTGSXnZlEv7no0lG0wzHXEWk1GVRrB7TTNbSqYQ3eiio7p5JnCiHEfb6Zx/HvWjUxcH3eo6wom2KMwnbViIw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785690421; c=relaxed/simple; bh=idDD/gk4nhQcoPcMVCFpQIkHk5RR9ToCn3b5U9wdHwU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B5fAXTp51tXeE9qiVP6elDPxPPqc8fY8PvQw7uzCb2uDvKgcizc9L3VFWiYzB2dr2LSEn9cVgLNmf+xRHlrw6Y7kMz52ToIzXZZnkzbkpia2qSFl2Ovy/yDDr+4qPVrfwf9HocWrMurtcFIDyTWZah++tbn4KQegO1P5p+rYfj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kernel.srl; spf=pass smtp.mailfrom=kernel.srl; dkim=pass (2048-bit key) header.d=kernel.srl header.i=@kernel.srl header.b=hdUIMZYT; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kernel.srl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.srl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.srl header.i=@kernel.srl header.b="hdUIMZYT" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-496b7622a83so8052125e9.2 for ; Sun, 02 Aug 2026 10:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.srl; s=google; t=1785690418; x=1786295218; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/VNyRxg25eQX1o5yblY5pzpZRITiV9Czj9RlgyEyn0w=; b=hdUIMZYTPS3oZYLQEEW2kgGdEg8yozbWpwk0CgebXPhvI1wQ9e8085wfb3u/1PAj7N 5h0VAkC806tNarjjg3lKTxWgcsGgairU1Zrj6wLMHMFPDhtOBJA0CXun3u8V1fI4b2/2 IsT9ZTkoBeQHUnFhHM9mOf3X+2SVdnj+SUTXFG+55wUrKIfpqxCDG/UW+HfCfM619E1v ki+1staWCXdn3u+/NGylK9V36Z3iJx5saisiXkYuQlTZoiqjsZxmyNYqo8Z7+zb+ncu5 e0EpRrXMvMMSZVD7K/TSSHMVzZRB9ECPZOUYF7yuUYDavEtQK1Bix9aczJ8DRELkO21F 8Xyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785690418; x=1786295218; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=/VNyRxg25eQX1o5yblY5pzpZRITiV9Czj9RlgyEyn0w=; b=C5MOeGAg+/ilHflBFzobCe2vqCOaNfbaEo2QbHLJRenOhoDPbsvr/JBK1G4I/0q9py TIMt5yDExvzrCh4TV1Q8+B0wPG/jPXzdDr0tD2sfEDc0okv4RiDYkCdJpgQL387XYQkm Qkdl31dkkK/IJzf15tg/Sugmx/a3P3BUjla3+gJJJwoxQgdT3pMXeaDHihlBT71CdFyL 3pWx+GieEfZqGkDhgaDiXbC69r1SJ8RF+c7ponIQDyJixmrUi4zqOStz+sIdar7PlIxj KTXKO90xJYo0uKkED01rWT9cSNFfAYnSno6rfRdA2HjSJDMTr7ooWfEMTCJUvLcXtD0W c6nA== X-Forwarded-Encrypted: i=1; AHgh+Ro5rfQoD1iE0aub3cv7MG+DzB62NFftPv8vaBECwlRHzqMmfTQwGtSE3Eum6JgT0mPis+LMacfp/wjYYJE=@vger.kernel.org X-Gm-Message-State: AOJu0YxCODiSh5A3ATmecs8LahjOpfUpAqa9E6P2yotCyN15I0owbmXe QlKgOzzST45tpDG40NcOrmrVbfhfHH51djA30av64SOuR6vmXqeboREbG/kWQV97ASM= X-Gm-Gg: AR+sD10119CGA1dkIa6AEI+UCohQUzoSGgPVpJOrftAFmvTH1pGlozj0Oljonv6XSfJ 2tB3RFPeHMEfBpGsXKSN3jZvobYXCfI2RjfGQztEb1q1nHqStI43v3xz1DzQr+mGx31RM1AWfO2 Q7bDeQpQg4d9tsUe6ciaZZ4MZ9NL3T0ICflNVhFXX8j+JCjIDYwK9i0b3eWTon1cgGmbU8xcYGQ DZhLKocs9G995NxYsFjBNi1afNwaD4jfie5TiGXqsqsxiiKl+UIzQduI9S0n3vyuMf/mioKf5ue j6/SLAIZNDyfPnMDgiHXY8e5AjUGlh6nr2ujP8iXwDDqy8hrQ31jkbCsa8pwwLkp6wMC0QNwmsO 0ESll4si3AnlilpHSNXsfSKPVQ2CqFzqJK4+Aul5py/AptKGuF4faHIlw10YwJ2+fsR8Wg2/qov JJfWIclBLls/9TlBfYcOORboSAY8dmsLStK5EqNxkCTq4aiFN7hq1RkLb5U3PAy5c2iy1zOEF9O H4Oyt4uL6Hd3Xc2vWZ3QXYOSqsaJpr0YxwbE2cmpiTX2qXVV9KcvsPSj32s/mETvyEfx5s5gDQ9 7PCWYaNLrnjfS1BcNETfnFs/EJtqBSidFwx6W8mVGPPzy4Kct9BbJq9X/GUkYVdXG5jEYJItX5K WlbdpeXtqZ106AXmo/TLeJChooFM5bztb+utVF/H0zaQSQ7RLjQ== X-Received: by 2002:a05:600c:4fc5:b0:494:6baa:ccef with SMTP id 5b1f17b1804b1-4980f23257cmr144313965e9.11.1785690417802; Sun, 02 Aug 2026 10:06:57 -0700 (PDT) Received: from KITT.minareto (host-95-230-187-130.business.telecomitalia.it. [95.230.187.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49807b6745csm161687225e9.7.2026.08.02.10.06.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2026 10:06:56 -0700 (PDT) From: Cristian La Spina To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, jani.nikula@linux.intel.com, rodrigo.vivi@intel.com, joonas.lahtinen@linux.intel.com, tursulin@ursulin.net Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-kernel@vger.kernel.org, Cristian La Spina Subject: [PATCH 1/2] drm/edid: read the luminance range from DisplayID 2.0 Date: Sun, 2 Aug 2026 19:06:46 +0200 Message-ID: <20260802170647.206880-2-cristian.laspina@kernel.srl> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260802170647.206880-1-cristian.laspina@kernel.srl> References: <20260802170647.206880-1-cristian.laspina@kernel.srl> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Panels carrying CTA HDR static metadata get their luminance range computed into display_info.luminance_range by drm_calculate_luminance_range(). Panels publishing the same information through the DisplayID 2.0 Display Parameters Data Block get nothing: drm_displayid_parse_display_params() already reads that block, but only for the device technology. Such panels exist. The OLED panel in the Lenovo Yoga 9 2-in-1 14IPH11 (EDO EE00QBA63.E) carries two DisplayID 2.0 extension blocks and no CTA extension at all, and declares: Native Maximum Luminance (Full Coverage): 500.000 cd/m^2 Native Minimum Luminance: 4.000 cd/m^2 Fill in the luminance range from those fields when the EDID has not already provided one, so drivers doing nits based backlight control have a real range to work with instead of a hardcoded guess. CTA HDR static metadata is parsed first and keeps precedence, so panels providing both go on behaving exactly as before. DisplayID 2.0 encodes luminance as IEEE 754 binary16, an encoding the core has not needed until now; add a small decoder for it. Assisted-by: Claude:claude-opus-5 Signed-off-by: Cristian La Spina --- drivers/gpu/drm/drm_edid.c | 47 +++++++++++++++++++++++++++++++++++++ include/drm/drm_connector.h | 3 ++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 07970e5b5..f4845d799 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -6733,6 +6733,31 @@ static void drm_displayid_process_base_section_heade= r(struct drm_connector *conn info->non_desktop =3D true; } =20 +/* + * Convert an IEEE 754 binary16 value, the encoding DisplayID 2.0 uses for + * luminance, to nits rounded to nearest. Negative, zero, subnormal, infin= ite + * and NaN all report 0, meaning "no usable value". + */ +static u32 displayid_binary16_to_nits(u16 val) +{ + int exp =3D (val >> 10) & 0x1f; + u32 mant =3D (val & 0x3ff) | 0x400; + int shift; + + if (val & 0x8000 || exp =3D=3D 0 || exp =3D=3D 0x1f) + return 0; + + shift =3D exp - 25; + if (shift >=3D 0) + return shift > 15 ? 0 : mant << shift; + + shift =3D -shift; + if (shift > 11) + return 0; + + return (mant + (1 << (shift - 1))) >> shift; +} + static void drm_displayid_parse_display_params(struct drm_connector *connector, const struct displayid_block *block) @@ -6740,6 +6765,7 @@ drm_displayid_parse_display_params(struct drm_connect= or *connector, struct drm_display_info *info =3D &connector->display_info; const struct displayid_display_params_block *params =3D (const struct displayid_display_params_block *)block; + u32 max_luminance, min_luminance; u8 tech; =20 if (block->num_bytes < sizeof(*params) - sizeof(params->base)) { @@ -6770,6 +6796,27 @@ drm_displayid_parse_display_params(struct drm_connec= tor *connector, default: break; } + + /* + * CTA HDR static metadata is parsed before this and takes precedence, + * so panels providing both keep the range they already have. + */ + if (info->luminance_range.max_luminance) + return; + + max_luminance =3D displayid_binary16_to_nits(le16_to_cpu(params->max_lumi= nance_full)); + min_luminance =3D displayid_binary16_to_nits(le16_to_cpu(params->min_lumi= nance)); + + if (!max_luminance || min_luminance >=3D max_luminance) + return; + + info->luminance_range.max_luminance =3D max_luminance; + info->luminance_range.min_luminance =3D min_luminance; + + drm_dbg_kms(connector->dev, + "[CONNECTOR:%d:%s] DisplayID luminance range %u-%u nits\n", + connector->base.id, connector->name, + min_luminance, max_luminance); } =20 static void update_displayid_info(struct drm_connector *connector, diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index a0cf0268d..15176ae63 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -425,7 +425,8 @@ struct drm_monitor_range_info { * &drm_display_info. Calculated using data in EDID * * This struct is used to store a luminance range supported by panel - * as calculated using data from EDID's static hdr metadata. + * as calculated using data from EDID's static hdr metadata, or as read + * from the DisplayID 2.0 Display Parameters Data Block. * * @min_luminance: This is the min supported luminance value * --=20 2.52.0 From nobody Fri Oct 2 10:08:33 2026 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA3B53B8930 for ; Sun, 2 Aug 2026 17:07:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785690424; cv=none; b=KBWKKJP1Aq37NVhlVHLc96w27zpPbZuZWRzjdJLyoOvHJHZ+8t19vTrJExbt9b4RVnUsxjG38nsaW2Lk4DObN8yb9YWRiOtDUXFfl+VoN0+ePadZ1L1UMvk9JwCYGm2f0XtDXpQ+uUJeeSffn7EwZce5Wop5WD/Z16vAAPv95NM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785690424; c=relaxed/simple; bh=R4ejztCA0xEUf/Bgtxdpkh+XVfQJZK3zo7kDPdDRBPA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IoKTBeoBWh4oVCh0uNq4GelIFIaef4C10mkm6NeoYumemZuh9LvD2yres4B49WyA3SAD4wHfg78wXJsaLw5QZYgLS/orFfQI2un/Ty22pplY20gu6kdKpi6quvGiknHQlWPdXSake5NDic9FLZqiF1wl7mEXSlubCZ5Mb3lYgTA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kernel.srl; spf=pass smtp.mailfrom=kernel.srl; dkim=pass (2048-bit key) header.d=kernel.srl header.i=@kernel.srl header.b=YxX0+Ps6; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=kernel.srl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.srl Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.srl header.i=@kernel.srl header.b="YxX0+Ps6" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-490cf322ed0so6720355e9.1 for ; Sun, 02 Aug 2026 10:07:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.srl; s=google; t=1785690421; x=1786295221; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=BRAy2nVyQPy4R9FHWUMzTGUQy8Oyu41Og5cXR0XYVss=; b=YxX0+Ps6sumtQV8cy0DmJ5RGrtamLDD1C6zzDpBa4C0J4kVT/l8AmOBaCus9uZ8SDm l1bZd6OzmgCa8zxvS5iJ9Xto+Q0ZyT0rHNkQZejnyxRjsWJmJUUmDmZ5FD/G0C9aT9Fs oPikp7jIe7h/ITivtWz8AoAWl6L1Zk3RmucE/32bDFVHK0KnJrcE849YOeQQUiBgQqVx gdMNM9tE2tc/VSAHcNlfhRsu/5cXA6kEO6Wr/nqwXZhcbNWc+eaIkXRAwcZDA9LAGDd3 6iOCnt/zv9+AcqReKLP+8+45GhQcR1DsND5kvBuBM2dYM4/UANNf6IQYRWB0y1Zuieft YrcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785690421; x=1786295221; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=BRAy2nVyQPy4R9FHWUMzTGUQy8Oyu41Og5cXR0XYVss=; b=mtJmfLzrXgJB0DfoSYHT3Gm89ZD/npY5J/ehsXqtiZM7N4svLTlCQrBCPBcYg9zh0V hn6hyiEMaF1lMuJiHDetwhKGzOtJK1fX8/3Va3ZqUNSX7PMXPBxa0d8cu3yKOcbIqDd0 yhL1ZCCG8u7OpCLOtHV4fFHusH2zV0eOAA9VRMjhpwhHX1FWulKGdCbGg2n3ylQhq6ka JjqMXVSsHK11nKranSI/fZMPgd4Mp8CrXZDzjtbMrXsoHVH25mOhO/zVOdELWOg3o+/Y SKj6SL7we29iL+Lr9ImBTmTdomlulkDZg7uvnqrh6R6ue6zrijJFMSVD7aMr2/w652Kq TWCA== X-Forwarded-Encrypted: i=1; AHgh+Rps3S5unIn3gw9ZL9REnNm8J882TusiQBsrHnMF6w26soU+UBhHJBr4U66lBqaQqqEEkT4HZzB2eauqOaY=@vger.kernel.org X-Gm-Message-State: AOJu0Yw70ZcyIyt0KxN96j2bXcVVCpC8nZReFcUUMSwH23sLLYyVFlfg DKhZeXDnjKYidKOL3IRMzZKvFYEnO0GYCZ+uMpNPowMoROFGiTUQ2bDVl217oFvH/g4= X-Gm-Gg: AR+sD12rGm9Vo7ciaAmn+s6xG7SJ297wV12SILAGtxtv859A7IzDLsmZiUgp20onOII 8cx6iDXmiy8jJ05h+6CBChGoWebmwwHVejSRzVYia5udshR6y2lG7D4vkzXW6PnuDbsgZWmGVn3 AkXeD5yywdhFSu6HlGV/2xKAIeQg41y5d/K0lXDWo/IJ8iJ8BwpEBU16eQ0nvf/zT2d3jjQ8bJW nlG258jshT0v24wpDpT1Ic1rQDo5un11kZNSQP0WHdAOVhbspos+M7xpWr9L1iAFSfNMqwRPXFI iyDw/s0LZThD9hBzEh4cdPRSGmwXQVGWjLP+gCqwjmpS6Ry/1FhaU8KQtZBPZUAPMufrKReje7M N7QHOKbIlIPYKK0m0Wrs6Xipg3Hp5s2XjpkJb006l3h46EuqHfqCmHUzEnUn+c8TPE8CwsCtUPi RnzdRYYc0DQ2qc8CNqfTXcmWVA2m3PSnV/u6bCUMNmJj9sURPrgf7LXb91dqt3OOuEHiNr7j7A+ qdVsHZCQ8zGvo05PkvbTkmmFW9AJQRtfOF4IbO+VruSIj4DBqjqivpHo/eKwDMXxfUK+82fsoaE VBKsAeIHkWUhC4CdffGzetNvsh3eRmHQb+crs8rOAxSzu6t/F5DCAVeC9PXtEtoX4BqX3sjCodI g06SLCrk0IfL+pwcMVYBAcXAEG7BVirD2VCMqE5euZrMxJfiewg== X-Received: by 2002:a05:600c:8715:b0:498:273:327a with SMTP id 5b1f17b1804b1-4980c66b5d5mr160221615e9.7.1785690421108; Sun, 02 Aug 2026 10:07:01 -0700 (PDT) Received: from KITT.minareto (host-95-230-187-130.business.telecomitalia.it. [95.230.187.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49807b6745csm161687225e9.7.2026.08.02.10.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2026 10:07:00 -0700 (PDT) From: Cristian La Spina To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, jani.nikula@linux.intel.com, rodrigo.vivi@intel.com, joonas.lahtinen@linux.intel.com, tursulin@ursulin.net Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-kernel@vger.kernel.org, Cristian La Spina Subject: [PATCH 2/2] drm/i915/display: accept a luminance range from any source Date: Sun, 2 Aug 2026 19:06:47 +0200 Message-ID: <20260802170647.206880-3-cristian.laspina@kernel.srl> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260802170647.206880-1-cristian.laspina@kernel.srl> References: <20260802170647.206880-1-cristian.laspina@kernel.srl> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" intel_dp_aux_supports_hdr_backlight() refuses the Intel proprietary eDP backlight interface unless the panel carries CTA HDR static metadata. What the interface actually needs is the luminance range, and intel_dp_aux_hdr_setup_backlight() already reads that from display_info.luminance_range, which the DRM core now also fills in from the DisplayID 2.0 Display Parameters block. Accept a panel whose range came from there too. Panels carrying the CTA metadata are unaffected, including those that provide the metadata block without the optional luminance bytes and so still land on the hardcoded 512 nits fallback. On the Lenovo Yoga 9 2-in-1 14IPH11 this replaces a backlight that does not respond at all, because the PWM fallback drives nothing on an OLED panel, with working brightness over the 4-500 nits range the panel declares. Assisted-by: Claude:claude-opus-5 Signed-off-by: Cristian La Spina --- .../drm/i915/display/intel_dp_aux_backlight.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/driver= s/gpu/drm/i915/display/intel_dp_aux_backlight.c index 7a6c07f6a..8ac47ed18 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c @@ -136,19 +136,18 @@ intel_dp_aux_supports_hdr_backlight(struct intel_conn= ector *connector) return false; =20 /* - * If we don't have HDR static metadata there is no way to - * runtime detect used range for nits based control. For now - * do not use Intel proprietary eDP backlight control if we - * don't have this data in panel EDID. In case we find panel - * which supports only nits based control, but doesn't provide - * HDR static metadata we need to start maintaining table of - * ranges for such panels. + * Nits based control needs to know the panel's luminance range. The + * DRM core fills it in from CTA HDR static metadata, or from the + * DisplayID 2.0 Display Parameters block for the panels that publish + * it only there. With neither there is no way to detect the range at + * runtime, so do not use the Intel proprietary eDP backlight control. */ if (display->params.enable_dpcd_backlight !=3D INTEL_DP_AUX_BACKLIGHT_FOR= CE_INTEL && !(connector->base.display_info.hdr_sink_metadata.hdmi_type1.metadata_= type & - BIT(HDMI_STATIC_METADATA_TYPE1))) { + BIT(HDMI_STATIC_METADATA_TYPE1)) && + !connector->base.display_info.luminance_range.max_luminance) { drm_info(display->drm, - "[CONNECTOR:%d:%s] Panel is missing HDR static metadata. Possible supp= ort for Intel HDR backlight interface is not used. If your backlight contro= ls don't work try booting with i915.enable_dpcd_backlight=3D%d.\n", + "[CONNECTOR:%d:%s] Panel is missing its luminance range. Possible supp= ort for Intel HDR backlight interface is not used. If your backlight contro= ls don't work try booting with i915.enable_dpcd_backlight=3D%d.\n", connector->base.base.id, connector->base.name, INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL); return false; --=20 2.52.0