From nobody Mon Apr 6 10:31:26 2026 Received: from OSPPR02CU001.outbound.protection.outlook.com (mail-norwayeastazon11013057.outbound.protection.outlook.com [40.107.159.57]) (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 6E45C39F173 for ; Mon, 30 Mar 2026 07:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.159.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774855240; cv=fail; b=fukfHx40mkp1vpIbz0c3XwuvvAq54ekbdxyFxeA7DhmuadF6EqB6Q27U/zoWN6dvPa5bZVsH3CHOVFAA/yb4MNr1Bt3PBnU5l+B3KwILqHW1GeoyYtoa1dj/EAe6788tUNUH/XG8H89w/4oGT1DiVCEDmnwhb27BXzVb1ArQ/ZE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774855240; c=relaxed/simple; bh=xD/XNvcuXmTdkuKqASNTGFXF4BKn1Vb938+s1j3+xaU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=qzC3aHwgCxD7RaEsmdTIoTfJ7Gl2IxbU/eX57xTeDgZ7Zx5z0BOtjzf6EyyRYk0NSVz/XZecyjjfI4+ZgCN917x+qLgr+4YBqLaKSO2W8znyuxtct3xM1CtFwSZs4/cSWQKkY7U2+IZ7vH3GJ/6rZF4YqnczQdX4eDyOGTgC2wk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=axis.com; spf=pass smtp.mailfrom=axis.com; dkim=pass (1024-bit key) header.d=axis.com header.i=@axis.com header.b=j/AeolFv; arc=fail smtp.client-ip=40.107.159.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=axis.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=axis.com header.i=@axis.com header.b="j/AeolFv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tA1VJy/Yh7tSeXXf+DS84ip2WmD4LpGj6sqEeB7m3rvo0vsfDNFt+aoxkKNLrruhRIAbF11s0eB8ab2g0kHaO/45Oyc+mTp2qHUr0X7N57IF1WcX5WeoB4K3UO9KeOSzjnXSQqgakkKi/jS9O1hkNGf4GSqBEgI7w88BZc8enf3XZNguIFPlELzAF1oY4v2B+H/xJPpCjlkYV3xAzXhzrgutHpyiTPRJrLBWEiKL7YLoueBPxmkt73u74TlfuW1UXywNF7Wwho/behidVJNUIpB2lAj0qdcnOLp7ajqavtSPThH0AuIYBbboaTM0GelaysVbCJW9JgYauCuVag69sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XCu3gjKeiE0fqeVwJuiS1jFx4PaIzKW1OG4qxDjshE4=; b=QxmHEEGAowoB0PxZ4/d0V++nWTEFoRMI7jtmUQ1qgkakT7n9Cky26mwl2IZlVSnPPJk+iMh5k6Y4t3iGWmiqfLoW244NDFNckrzENQKj/4ahmUAk0w7VgAL6iInNT3SIM+YUis+BZyUoypVtS0+pBGKzioMVIRAA1KB2E2GTb33y16fV8Fu3rZwvCqdDTe75SCt03Q8EvrkKOvvbvAt7cwlCdTPoLoOMm9Zz6I7JZp0hctNl4gvvANwPLfZC9wc7X/+yf6w/TehzsBoI2lqQEJEYqzPWesnIrajdEIiek0l1oIH6VtG8bdkXoUuFaTKSV21SH8h/ckAnIaPx0Icqtw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=baylibre.com smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XCu3gjKeiE0fqeVwJuiS1jFx4PaIzKW1OG4qxDjshE4=; b=j/AeolFvonYkl4L20/PsuG65U7zayUwc6e0VOIKJekKyUc8U5D57azqya/DiyDMogFhpA+5lLpF/0axnIGZLpYWPo41dld6/8UgW10rw9dWg0e7VS90haV5OKyatJtpyiHJnAtMeXbg2psBDZJNAeVQPQSciRzMCeWP8FJvAS6g= Received: from DUZPR01CA0002.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::8) by DB9PR02MB8910.eurprd02.prod.outlook.com (2603:10a6:10:3da::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.28; Mon, 30 Mar 2026 07:20:34 +0000 Received: from DB1PEPF00050A00.eurprd03.prod.outlook.com (2603:10a6:10:3c3:cafe::a0) by DUZPR01CA0002.outlook.office365.com (2603:10a6:10:3c3::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.28 via Frontend Transport; Mon, 30 Mar 2026 07:20:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by DB1PEPF00050A00.mail.protection.outlook.com (10.167.242.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9723.19 via Frontend Transport; Mon, 30 Mar 2026 07:20:34 +0000 Received: from SE-MAILARCH01W.axis.com (10.20.40.15) by se-mail11w.axis.com (10.20.40.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1748.39; Mon, 30 Mar 2026 09:20:33 +0200 Received: from se-mail11w.axis.com (10.20.40.11) by SE-MAILARCH01W.axis.com (10.20.40.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Mon, 30 Mar 2026 09:20:32 +0200 Received: from se-intmail02x.se.axis.com (10.4.0.28) by se-mail11w.axis.com (10.20.40.11) with Microsoft SMTP Server id 15.2.1748.39 via Frontend Transport; Mon, 30 Mar 2026 09:20:32 +0200 Received: from pc63130-2524.se.axis.com (pc63130-2524.se.axis.com [10.92.173.61]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id DD3872A48; Mon, 30 Mar 2026 09:20:32 +0200 (CEST) Received: by pc63130-2524.se.axis.com (Postfix, from userid 18369) id D9450602F3D3; Mon, 30 Mar 2026 09:20:32 +0200 (CEST) From: Tobias Johansson Date: Mon, 30 Mar 2026 09:20:16 +0200 Subject: [PATCH 1/2] drm/tiny: sharp-memory: fix line address assignment on partial update Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260330-flickering-v1-1-5a192bf4b93d@axis.com> References: <20260330-flickering-v1-0-5a192bf4b93d@axis.com> In-Reply-To: <20260330-flickering-v1-0-5a192bf4b93d@axis.com> To: Alex Lanzano , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Dmitry Baryshkov , "Mehdi Djait" , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= CC: , , "Tobias Johansson" , X-Mailer: b4 0.14.3 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF00050A00:EE_|DB9PR02MB8910:EE_ X-MS-Office365-Filtering-Correlation-Id: 4feaccaf-9a1c-48b7-c882-08de8e2cd5bd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|36860700016|1800799024|82310400026|22082099003|56012099003|18002099003; X-Microsoft-Antispam-Message-Info: dQMhzpji0ViXqTdEDBY9O2Oeznbeb1JxuU2omLbJxom9Fjv79vJbq9fvM1VrWNMmsmvCSb0V1XDOwhYk9PP3WJm4lPMaIBWRzNsfksQRfeNHUCbr6KCoGOjibiVM80lF2+jiTbbNgvqCScASfNQ6SpytxmORyLmkCPyprTkiXalMdY+S0g2PfExumnacIfdHE8mw/N2YiNXFfRR9rSHAUgcUUiBypZGzKpyRGPQjJXLDdF55CY6MJWbCoQtb/WSWTjPlp9LbyezTctziWN4K/b2DSKeI7o5q0p5dQC4IgasoRKNoFytyXv/GqJUO8FuIWM9e0O0gQ2pW0n6qLGOCex6x2VfkFhGOwreMSAyEm/qQFWDKK9JAQsgEZvZU41Brx1hFxirDU4dqOMm2M+G974oBpjcumNTVRk94spnBwEvr7SKOJVu+1FAuEE7pylsgJAPvEq7ULJElJzcuWlQPhofZ8bIBI7v7LYPOQ/kH4Fxgl9qFsNRwtu4bu2WXzD9DJnZuKgZQF+wrYRmR4QRD+dKE9fjmVjT3iZ+IGwE6UQt0sXr5HkAWMZfLAdeZ+0dUsGP8p4IZBBNVWdJPGs191EhybCPeZbnT1Basd+lbj7U0K2O4XHG9Ll/LyM0alHRj478uWB1pCINraOSw5IJHXyPA1YF8ZIELSCj+MavR1zSeUjdA5lAhzZTvFDvmQkdff46GVO1jkThHpj0rqiAqhv0FqA2y8cULtkgtqsbiN/mZ4UrsEaN47IPG0UInWy9KeINoBX0RbzOcA+grViWsUQ== X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(7416014)(376014)(36860700016)(1800799024)(82310400026)(22082099003)(56012099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mKKprRYtT+uGB00C1bq/a0k6KTY62z6roV6mGTHmymRg2dOUd1tWYaAJFJILWB5LLEOUAMUm9gbY9KmkFdcvzoH2QncJnbDacj99Bis7BX1FNPXzkXU45EqY9sIkafXUqDYlMcmiEsFRapAeIVDYmtwHlmmnV3weUK6wLQhlnBpXiShTuJiuMNKYa5fJ1hWWbd3l2fJrrNShU/Dm1FIrBcPMTzIhfsguyjMy+CrsPFBzYJ5GSSULjTisNx12BNcfvDMleOh9DGVz/ejqCNoTwSOY+39eyhMQlfxL5MAMdFjzhKUROFAcQeQ51ydPFBDTEmY6igahiiac2wQSwIxQWFqNLnBqPDhJqjEE/XCYu/8INl/nogHUzjqBySgSAwejiuEZj2XovCtn6W8xP50pBvl8oEdNZp+aMTjG201XL02PpOQYh2YTymn20/jNh9yu X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2026 07:20:34.8396 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4feaccaf-9a1c-48b7-c882-08de8e2cd5bd X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF00050A00.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR02MB8910 When only a subset of lines is dirty, the TX buffer sent to the panel contains incorrect line addresses, resulting in visible flickering on the display. sharp_memory_set_tx_buffer_addresses() iterates from line 0 to the last damaged line, assigning addresses sequentially from 1. When only lines 10-20 are dirty, line 10's pixel data is written to the slot with address 1 instead of address 11, corrupting the address- to-data mapping. Fix sharp_memory_set_tx_buffer_addresses() to iterate over only the damaged line count and offset assigned addresses by the clip start, so that addresses match the pixel data that follows. Fixes: b8f9f21716fec ("drm/tiny: Add driver for Sharp Memory LCD") Signed-off-by: Tobias Johansson --- drivers/gpu/drm/tiny/sharp-memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/sharp-memory.c b/drivers/gpu/drm/tiny/sha= rp-memory.c index cbf69460ebf3..595926ed660e 100644 --- a/drivers/gpu/drm/tiny/sharp-memory.c +++ b/drivers/gpu/drm/tiny/sharp-memory.c @@ -120,8 +120,8 @@ static inline void sharp_memory_set_tx_buffer_addresses= (u8 *buffer, struct drm_rect clip, u32 pitch) { - for (u32 line =3D 0; line < clip.y2; ++line) - buffer[line * pitch] =3D line + 1; + for (u32 line =3D 0; line < drm_rect_height(&clip); ++line) + buffer[line * pitch] =3D clip.y1 + line + 1; } =20 static void sharp_memory_set_tx_buffer_data(u8 *buffer, --=20 2.43.0 From nobody Mon Apr 6 10:31:26 2026 Received: from MRWPR03CU001.outbound.protection.outlook.com (mail-francesouthazon11011050.outbound.protection.outlook.com [40.107.130.50]) (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 41B7039EF2F for ; Mon, 30 Mar 2026 07:20:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.130.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774855239; cv=fail; b=GX6YMP/Jp6XYdMn9mNi7JltkB1eXHSUVn9MVjuEm9TpE4aIgggiCDDHrb8fXS6MbvbVsidhDemVgD8upThX+ypsk0sk0JjQxzTmRD3qUHuRdvSsCpzWLEK5RPRYA6+c9wG9rCcd/TriSuLuP8tg5gEoYvzcoHMRP67e2nIm5tdk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774855239; c=relaxed/simple; bh=j2mo76b1IB6m4JxfITvElLVmlO9HhznDUetXf9ROMSU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=aTm/eJNgA2nTjvzNrhs04SOsLMpo8WXC9F0dkOLw7UM2O1vIhiU0eCDKXhPyQVeEyYCCN7zBWLuj1dNIflBo33ans/PMnfpya03gHvvMHdjxLStTS8fiu5m04oo96T7TXo8He45BeXkSAqB4dkvUt1ih7p5f5Jn378L+/iHAKbQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=axis.com; spf=pass smtp.mailfrom=axis.com; dkim=pass (1024-bit key) header.d=axis.com header.i=@axis.com header.b=r1T1Xr4J; arc=fail smtp.client-ip=40.107.130.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=axis.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=axis.com header.i=@axis.com header.b="r1T1Xr4J" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Xf2KLGwtBu1Yxte+j0gOghaZ6VFYPhB+AuvOKnjywItk1exgAtwnOj0mmrOF1lMiKX3iMJIZ+QAgf85Kx1PrhKMV0C/I5GiQmMA3+AUcs+5IFrm3lBvY8bjbxid2ub2/RNNunhhlU/T5IK391mlviN2PacgfH0EC8EJLvgclHGU2Gp21vvPc/D5Qebwa3K2KOABfUWU1uH1OuA7JxxjqIgbQzTqWECa6Fw1gkh/pXhme+v59eq2Fop+kPV+P3oblEXVaTo3gaoCnBHaxfH0Xmdo0e/CpavZBLKjGkRno3M5ERhj0mCY+ZDAObCfwx/J68o+sOzwinjhost7I6HfWdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WQ0fcQFSvjb3CR+FT4pD182w1AJSezVIuW9/rtuW+Fw=; b=kxpWfwnaOGtIKLaDpRSFG/deh+vfVKqmxgYdjc29ZvDrj6prukMDfDXiXKDocQGinqDOfEyC4+e1nkb/XkC3azBNOWzGRHipOKCtIA0ziJtoXi11P+CCR2F5pgmThAY+HTzjttrsbo6z9vZdpq5dnBIkpPj6AlU6mp+qtQIdo4/vvnUQ6u7jkKw6lcErJ0eVs0VUqEzm1YaISy/308trBbb7h6FjAn+0vVZlyVoelIby2Vjtj1HyXZNE1r5KS97sfDN+Arl0+ThsYua2r0rtcx3pE60waiX7BZPRuKVyGBOUiZ4V2QHAPgxn6Z3ZLsjt74BuduWhKAKbaQvG0aSMUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=baylibre.com smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WQ0fcQFSvjb3CR+FT4pD182w1AJSezVIuW9/rtuW+Fw=; b=r1T1Xr4JcksQfAEBXcqcNc9+8PBF57AeB00ESX12pBCb2NGJc4fpfVNOkO53wXWLWNnzKYZTAmMZbLNgyMzicRKav8I8rYMsPWPSnKr3/SLRjcyI+1EPJgsk7rk52iMLvryu5DJPb4nwPHbWhDo1C25rCuEcHTXOkE0nlCTfvoQ= Received: from DUZPR01CA0014.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::7) by PAVPR02MB9913.eurprd02.prod.outlook.com (2603:10a6:102:310::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.28; Mon, 30 Mar 2026 07:20:34 +0000 Received: from DB1PEPF00050A00.eurprd03.prod.outlook.com (2603:10a6:10:3c3:cafe::e3) by DUZPR01CA0014.outlook.office365.com (2603:10a6:10:3c3::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.28 via Frontend Transport; Mon, 30 Mar 2026 07:20:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by DB1PEPF00050A00.mail.protection.outlook.com (10.167.242.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9723.19 via Frontend Transport; Mon, 30 Mar 2026 07:20:34 +0000 Received: from se-mail01w.axis.com (10.20.40.7) by se-mail11w.axis.com (10.20.40.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1748.39; Mon, 30 Mar 2026 09:20:33 +0200 Received: from se-mail11w.axis.com (10.20.40.11) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.61; Mon, 30 Mar 2026 09:20:32 +0200 Received: from se-intmail01x.se.axis.com (10.4.0.28) by se-mail11w.axis.com (10.20.40.11) with Microsoft SMTP Server id 15.2.1748.39 via Frontend Transport; Mon, 30 Mar 2026 09:20:32 +0200 Received: from pc63130-2524.se.axis.com (pc63130-2524.se.axis.com [10.92.173.61]) by se-intmail01x.se.axis.com (Postfix) with ESMTP id DEA7A934; Mon, 30 Mar 2026 09:20:32 +0200 (CEST) Received: by pc63130-2524.se.axis.com (Postfix, from userid 18369) id DB32B607D8EB; Mon, 30 Mar 2026 09:20:32 +0200 (CEST) From: Tobias Johansson Date: Mon, 30 Mar 2026 09:20:17 +0200 Subject: [PATCH 2/2] drm/tiny: sharp-memory: avoid transmitting stale TX buffer data Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20260330-flickering-v1-2-5a192bf4b93d@axis.com> References: <20260330-flickering-v1-0-5a192bf4b93d@axis.com> In-Reply-To: <20260330-flickering-v1-0-5a192bf4b93d@axis.com> To: Alex Lanzano , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Dmitry Baryshkov , "Mehdi Djait" , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= CC: , , "Tobias Johansson" , X-Mailer: b4 0.14.3 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF00050A00:EE_|PAVPR02MB9913:EE_ X-MS-Office365-Filtering-Correlation-Id: e82281ba-8a2b-431e-5e1b-08de8e2cd559 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|36860700016|376014|7416014|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: 5/TThs41aZCjoLZyA9C3mI8IYiQ2NT+y23xPduHoapSh4Kv9pVh5lH5W2K+azYlfXLeO3LGdSgBB8nwAObUos36W6pzGbZjlidve/17MIeqa5ACFuP8hJOaUOl108AP6rbvZ7YVxKKTPpaK7svknHjbMnlTj1e65/RSO0BRSN6CcTLAntKJ3upH/j/ht5NOe/+NimpPcjNr3ht3RORcmcExnhmt1L3WhRwkyCbIGat0CrCoLQuyF3wCbXXfCap2CUFigLZAdqLhwmfjf3x3YXr2XVX/9jV5PlOFCl98oHTlKCP0Mw/jm1N1OeUT2bMwk/IfFm2IIusc5Q//tbmlxYnLM6DPvmB805SCO7fA8gvJtS71eGJ0CURP/Z8BkksseSLF/rGKMdwxOgK4JCXUsdSB7Fb+oQa1MRnh+MVBCUGidgQ5CoPEUvnLCFXw7o9iY9qVecfLCuWxTys53x5yLnKb0N1CJ1BCzt2iuC1qEJAvgsiLrdS+xZ/TnZ5p0nwtg8X5ncKTOZJfbsrG9e1Hs3aU192khuQHzSMLZ8KulU/MbXR7Tff6jWOvfA2OjYQHJkrIkH/jfgOaTi7W+XrOUWkhpDU+LPU3NCfqxXk+mNCq4ym2ad7Gbsbmn/mHNjBQlvmjsQlcdFcCbopvih/FWzuVG75Vl+9VsnUKBU7++aTJR0HHfeGWWJNpz6vSJj2Ifm2f7UrMGPf3KmuvG+c00CMx7TSYMOLcePoDLussoh+uADC+/UGN0+9HbExvUsbEzV4Hqn4fPF/mzHvliJUO8LA== X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(36860700016)(376014)(7416014)(56012099003)(18002099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wrN+1qRdps5X+e+3yE4gaA3cFpzH7eSBsR4hbRwhtkLyza0ziugDVv6wFRA4NzPCVCnDT1uaIK6nf1VYhjGVgPd/7lebXN2qUkPat1KhNSCL+U0GqpbO5S5dnqQGgzTx4lnGH0pM6MwBrZ2JYEVVWonk+u6XTuwjZcMqrKrn7fGyeElurTMxaBZcK/aonuQGVLYfVM4SocdPI5zdqVT57wgYhTvi78YNzFqJ//HV7D49kpp+BTiWGoiLctqjyBZaEKE9Rt69dH0BRcBpn2UYvXfoepQqifmz5cLMU2wySuf3twD7OX1l5o/sg1yF2Ruw9uBfm0djrCM7IXXQOyUuklq0mOplwDQ5WOm3bHxzv1Oa1HZAJP7HsRvApG2DF/BwRDniehmrgSVL7lpGSO7+n4xA185hLSwYY+GS61zETjfCrC0KwyZ7rmucuU4BbPEQ X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2026 07:20:34.1817 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e82281ba-8a2b-431e-5e1b-08de8e2cd559 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF00050A00.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR02MB9913 When only a subset of lines is dirty, the TX buffer sent to the panel contains stale line data from previous updates, resulting in visible flickering on the display. sharp_memory_update_display() transmits the entire TX buffer regardless of how many lines were updated. Entries written by a previous larger update linger in the buffer and are retransmitted on every subsequent smaller update, overwriting the newly written data with stale content. Fix sharp_memory_update_display() to transmit only the buffer entries populated by the current update. Fixes: b8f9f21716fec ("drm/tiny: Add driver for Sharp Memory LCD") Signed-off-by: Tobias Johansson --- drivers/gpu/drm/tiny/sharp-memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/sharp-memory.c b/drivers/gpu/drm/tiny/sha= rp-memory.c index 595926ed660e..e7521fc6a010 100644 --- a/drivers/gpu/drm/tiny/sharp-memory.c +++ b/drivers/gpu/drm/tiny/sharp-memory.c @@ -155,7 +155,7 @@ static int sharp_memory_update_display(struct sharp_mem= ory_device *smd, u32 pitch =3D smd->pitch; u8 vcom =3D smd->vcom; u8 *tx_buffer =3D smd->tx_buffer; - u32 tx_buffer_size =3D smd->tx_buffer_size; + u32 tx_len =3D 1 + (drm_rect_height(&clip) * pitch); =20 mutex_lock(&smd->tx_mutex); =20 @@ -165,7 +165,7 @@ static int sharp_memory_update_display(struct sharp_mem= ory_device *smd, sharp_memory_set_tx_buffer_addresses(&tx_buffer[1], clip, pitch); sharp_memory_set_tx_buffer_data(&tx_buffer[2], fb, vmap, clip, pitch, fmt= cnv_state); =20 - ret =3D sharp_memory_spi_write(smd->spi, tx_buffer, tx_buffer_size); + ret =3D sharp_memory_spi_write(smd->spi, tx_buffer, tx_len); =20 mutex_unlock(&smd->tx_mutex); =20 --=20 2.43.0