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=1796380888; b=vZytWgIsW3HRLito9dky/Q+gUhynvERU3IJ4zsk2+NrPgBQmEOgB8SllvMmIFtb3gEfj 9EAybGjoERyceH6uAfc6steqBiSVz3Ix/wOfGnkiBJsf9sr6PR7KLNCnyzMNqBJ71rmmG liWYKU7JfnBumRmPWr0xwqR4nvUyPUX0svaKd7GQnTGPok5xORaIdoUZ73M5CaPVit3ub 4yhzSIvy0hXM3Fn8uCgBLguzqnogt6mVcQ8/1iOVtTQxgcK3pzV8FHu8K8YCLSgAvSCvB 7ybPLa1ZTlux/qsZVy+/xAuyAh/k6nlE+PtzimSE2P0XiHmvyiVtWDkoOjTkkD5Nqvw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380888; 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=bjafDMIQbFv/s+jkxsqyEywnLRDrmno8Bv0pRUtEBsI=; b=WEj0yCrdT5F6LiUj+lFZ27Oh3fFElO9dQT92UO1UGwA3IUJ1l+P+XZbR/fyltjWYN6Ok WHg6CGkIyMI6JlK1Xc7Ji+V8vi/6QAZZaySeNS6MI5UJB5QnYS1sx1aXzVgOi1UuEhQ3Z P1ElV3fpyh3ITJrnz9GiaXv61dbi31XgET53fptmZ96GesJ318S2Li6TqUZX0vl0UjvAj v2egypwYOWqFBgCAf/mkcbVS+c1gq3AQTpeeqSHoByYK7QAr1fuwWuIzQadd73eThCFof 1Xgi2G1DOaJTQ7jY+rWE+JPnK3pmdAhJ7IdSh96QPkt+ZJ4p/eIsltjcsjV2ZfCHtRg== 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="PakQ+cX/"; 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 969FF606A322; Fri, 4 Dec 2026 10:41:28 +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=PakQ+cX/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12FEF1F000CE; Fri, 4 Dec 2026 10:41:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380888; bh=bjafDMIQbFv/s+jkxsqyEywnLRDrmno8Bv0pRUtEBsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=PakQ+cX/hfmAKp+RVOTqQp0U3ltXbmRBIeCp3HNfGecDoj8xVBOSbY/L+kz7MudKN hbwyGxayK9gP1r7oBpTXHeAwYmdtl57TPtJg3vgrzy4rGZQEAFcovBXfqufAfdni8G qY4FJ0JSon1c5HNNZyKr3DXIiTTzT9Ltj8W+wZfM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tim Douglas , Helge Deller Subject: [PATCH 7.3 467/742] fbdev: macmodes: compare the pixel clock of each candidate mode Date: Fri, 4 Dec 2026 19:05:31 +0900 Message-ID: <20261204100647.560631905@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-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 @@ -342,7 +342,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;