Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 930A547DFB9; Thu, 20 Aug 2026 17:54:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787248446; cv=none; b=kvbskBJqOJXu6X7t3udOVCCOc3l1jL3fBPloq84/6X5MvXmMavqrjXF3e0ZJt4wV2pBjvfTz07ZFaBUt35/VW6A1WY+lLxwVVZhL/1DbtZ68er4hp7YtUKKapqyTzDbq4HYGgpVu0oBCPlL3fxBfwFEjU0VnW4a5g6SwIbRy6u0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787248446; c=relaxed/simple; bh=JincaEiW7ER/Otq/xP8VHIMYN/OaOKVC/RE1EPmWo28=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d747SJISfmwjNF01UwW9c+Bhcoikai18GAiMc2dQyHfRZuRSrCuAsMqTYcZmJagnN3zgBRNH621W9PyM1+8qH/hjMq0EGcEAXrPhhVa3AboFwrjagCryM5GKAXJ9adoj0NUJxAkkcJDIQooW8zc0M/TKndhlLmI72z3z08Yau5Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uSbd+Kcn; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uSbd+Kcn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F08FC1F000E9; Thu, 20 Aug 2026 17:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787248445; bh=wf49TPY8u5/fZ2Ql9mAb8FmVyK9m0rMe3guWmZq4ZRU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uSbd+Kcn5nE17XLrEB0ibq4gw3hlY77zSKLk9Zo9BETlIcf2FxQZbc1PxtV0Ofx0y IfsWbn49mMQaSbVoFe8V2l8/Lcn+wX8C/7BiY7uw9HTt8Q1JWbC/9YORMvy82/O65V wenDPHAMOHDEoPvV3UKuzo7AxrTYMbmx1kZ3magA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Martin Hodo , Ankit Nautiyal , Jani Nikula , Joonas Lahtinen , Sasha Levin Subject: [PATCH 6.1 191/303] drm/i915/vrr: require valid min/max vfreq for VRR Date: Thu, 20 Aug 2026 16:55:27 +0200 Message-ID: <20260820145259.054715809@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260820145253.200766705@linuxfoundation.org> References: <20260820145253.200766705@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jani Nikula [ Upstream commit f8a9262c7a6fc2de9802e14b0228114f0333869e ] Ensure the EDID provided min/max vfreq are valid. Most scenarios are already covered (by coincidence) through the checks in intel_vrr_is_capable() and intel_vrr_is_in_range(), but be more explicit about it. At worst, a zero min_vfreq could lead to a division by zero in intel_vrr_compute_vmax(). Discovered using AI-assisted static analysis confirmed by Intel Product Security. Reported-by: Martin Hodo Fixes: 117cd09ba528 ("drm/i915/display/dp: Compute VRR state in atomic_check") Cc: stable@vger.kernel.org # v5.12+ Cc: Ankit Nautiyal Reviewed-by: Ankit Nautiyal Link: https://patch.msgid.link/20260625131040.1051272-1-jani.nikula@intel.com Signed-off-by: Jani Nikula (cherry picked from commit 1765cf59f517b02f3b0591fe5120930d08bddeb6) Signed-off-by: Joonas Lahtinen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/display/intel_vrr.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -40,6 +40,10 @@ bool intel_vrr_is_capable(struct intel_c return false; } + if (!info->monitor_range.min_vfreq || !info->monitor_range.max_vfreq || + info->monitor_range.min_vfreq > info->monitor_range.max_vfreq) + return false; + return info->monitor_range.max_vfreq - info->monitor_range.min_vfreq > 10; }