From mboxrd@z Thu Jan 1 00:00:00 1970 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 E1F51331203; Sat, 12 Sep 2026 18:43:10 +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=1789238592; cv=none; b=UMdlRBDRqQPoLAXaGxG8QCezjahZ3tlLgVnzfU9SxC19Vo+MgwjWzn4GliJMKRdWDzmUy6I9vXe1Rfeh1srSm/b2O1ppnC/urapgyx5LXBzXdFdZnHbv6BJv9NEh2crxWwXQgEXBTyICV54T9Zebq283EOqajBPh+B1u3OBVVHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789238592; c=relaxed/simple; bh=cgeBf8xTPoPxr6+y/80Ob3Hl7XsKdj6zsgZEWG569MQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r2Cjo6zBi46HFsltRv8oweGaPP9EC7R4pKfW2d/ncz7O7FhvwP+cEULvlKgOV5u58pxSGcJaIk0fZGTGkK41Su0bk5WuC3EvkjVVg+PMoWV+uh8Den3cWifLdGKy2nZifmlyCUPvw8JUGO+G9d11aosgr7Jqr0mklbd0LPh03AU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yaJxy7s6; 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="yaJxy7s6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8DD61F000FF; Sat, 12 Sep 2026 18:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789238590; bh=LUKaZAv9oW9sOrzIc7Gwdn6sOYAs49Vsq7DZfoS41J8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=yaJxy7s6qYyjBW3gGUNHVjMcUR8OS39kpxx7AWDzH6JSafzcgc4NZ1pZFHYBVkTR4 jQ3t97n3fAjJXyHYmj/hKr4bYRlPRa+bfdNLu9tmdOExBs1hch1uNeQQ1M2pAe96T3 rJJbgi2B/2slYgGGXVxk2mxYW/JJ80RFyMlI1PrE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ahmet Sezgin Duran , Sasha Levin Subject: [PATCH 5.15 450/935] staging: sm750fb: gate dualview dataflow using g_dualview Date: Sat, 12 Sep 2026 08:58:00 +0200 Message-ID: <20260912065537.150602109@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065526.833703348@linuxfoundation.org> References: <20260912065526.833703348@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 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ahmet Sezgin Duran [ Upstream commit d352778979d2eed09e266ed0f3a5e3ccd3983940 ] In sm750fb_setup and sm750fb_set_drv functions, the dualview related code is guarded by `sm750_dev->fb_count > 1` condition. That value is updated only after each framebuffer is registered, while both guards are used before any increment. Current flow: lynxfb_pci_probe() sm750fb_setup() // fb_count is 0 for each fb: sm750fb_framebuffer_alloc() lynxfb_set_fbinfo() sm750fb_set_drv() // fb_count is 0 or 1 register_framebuffer() sm750_dev->fb_count++; // fb_count is incremented Thus even if `dualview=1` parameter is passed down to the driver, fb_count is never > 1 at either check, so dualview dataflows are not selected and crtc->vidmem_size is never halved. Use `g_dualview` global variable instead of fb_count > 1 to correctly enable dualview capabilities. Fixes: a3f92cc94c61 ("staging: sm750fb: replace dual member of sm750_dev with fb_count") Signed-off-by: Ahmet Sezgin Duran Link: https://patch.msgid.link/20260521204425.82627-1-ahmet@sezginduran.net Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/sm750fb/sm750.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index d0260fd935272..90f0983767f33 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -597,7 +597,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par) crtc = &par->crtc; crtc->vidmem_size = sm750_dev->vidmem_size; - if (sm750_dev->fb_count > 1) + if (g_dualview) crtc->vidmem_size >>= 1; /* setup crtc and output member */ @@ -925,7 +925,7 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src) NO_PARAM: if (sm750_dev->revid != SM750LE_REVISION_ID) { - if (sm750_dev->fb_count > 1) { + if (g_dualview) { if (swap) sm750_dev->dataflow = sm750_dual_swap; else -- 2.53.0