From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796389272; b=TgOaZNfk4jL+g7SoP57l8ni0tS1SIaog2fDz8zBaClRSwxCLmesL/qDt/YRiFILivjg0 t3m02jN10hhSy++9B0QkVDqaZTiF7tBFcQH9mKoIkM3FOt1jpkNgrmtlzDTxaekacKWMu /XBbFYlyBDf84Q07Ef1Q5p6pa+qsUAYEeQJ0UW9l7Umfhdov024/64syBU/6SYJSC0GSh gzsFlryjxPAkpcTWHGh/xvFXgs44x5RwRQ/n2DmsmsK/R7RUpFJxoulrDvJbMT+sVHvM9 jCk8AnTkP6iXPwgJ++anK0zH6VKoZjXX1lmBMAHpIQZBpPDlNGnG5qXbiCtEIvNU9Gw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796389272; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=c6hIt4LlRdd52csPFI3Yv12lbBQPTIHhNDmJIewitdU=; b=MmkcNLosWJBYtPBZBNWv8QwTRYCbVhj5Jg8NT6y0lxB+IMZGcQC/iK53INAHObHUivNr b2q3bHPxdes9dxsU+S/yg/dXvlTOT4FeJFzB9o927VoO3DAStTjgwXc5BcgZeiyiVoLC7 PxvydEywdxiRYCFqSUfEdy5+hinJRGx7ggl44mSoDRqjUgRE3FaitN6GAoPMxj9xzEXE5 /SKgR9SKdE0dmNXZo1sYVupHyWKjTMhGPGQIzlkzN60TcuSH4rxID8102Hw5pWL7Qw0Yo kMpuBrXNQz1NPF5nQtuqNi0a7NGIhzz6Bpaicxr2sLeacjRodG745a9Hu9YHXw3jRLQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=bswEe7j6; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BAFA606A322; Fri, 4 Dec 2026 13:01:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=bswEe7j6 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 041D31F00931; Fri, 4 Dec 2026 13:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796389272; bh=c6hIt4LlRdd52csPFI3Yv12lbBQPTIHhNDmJIewitdU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bswEe7j6FSceMDTV8SG24yWX0/BKKPr6vZ6/GnXZnXm8JKDJ+3Mdv8IE5OsQn9Cuz HEoQ0ui9+m6h64Ujj1YZg+Pmk6tzJA3nhRVwB4iyRjbzl0wWKHwwlesGPGWQ4GJrpK IoWbASJrR12NnU1+bNOAA/v0zsx206Xk9Qzl28gM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tim Douglas , Helge Deller Subject: [PATCH 6.1 0928/1059] fbdev: macmodes: compare the pixel clock of each candidate mode Date: Fri, 4 Dec 2026 19:07:39 +0900 Message-ID: <20261204100708.060932037@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tim Douglas commit 3e973ab62c86d620b2db9e90eb8fc3b065929e6e upstream. In the second pass through the mode table in mac_var_to_vmode(), the requested pixel clock period was compared with the first mode's period at every step. The last mode at that resolution was therefore returned even when its period was too short. Compare against the current candidate's period. Tested on a Performa 6200CD using a kernel with local platform support. With video=valkyriefb:vmode:10 (800x600 at 60 Hz), the measured refresh rate was about 72 Hz before the fix and 60 Hz afterward. At 640x480, 67 Hz was also selected for a 60 Hz request before the fix. AI assistance was used to investigate the mode-table walk and draft the fix. Signed-off-by: Tim Douglas Fixes: d876c11a0fd4 ("fbdev: mac_var_to_mode() fix") Cc: stable@vger.kernel.org Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/macmodes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/video/fbdev/macmodes.c +++ b/drivers/video/fbdev/macmodes.c @@ -341,7 +341,7 @@ int mac_var_to_vmode(const struct fb_var if (mode->xres != clk_mode->xres || mode->yres != clk_mode->yres) break; - if (var->pixclock > mode->pixclock) + if (var->pixclock > clk_mode->pixclock) break; if (mode->vmode != clk_mode->vmode) continue;