From patchwork Wed Jan 15 11:01:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 13941419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54434C02180 for ; Thu, 16 Jan 2025 08:08:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 10A9F10E8E5; Thu, 16 Jan 2025 08:08:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=inmusicbrands.com header.i=@inmusicbrands.com header.b="mTWLkIU1"; dkim-atps=neutral Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2070e.outbound.protection.outlook.com [IPv6:2a01:111:f403:2009::70e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2EBC210E5E6 for ; Wed, 15 Jan 2025 11:01:55 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UWaMWI+GyTGOgcv31TsdX5uDnZNS85uOu7EwY9nPxOrwNKVGhK4ExNvIeYGf5p0M9+USinQEJWoaPC8SlvBr3MDGn4CbeaqUetAxjXx9h6taPcfJ/itzCdlO1qW16z80f+BssP3GSl3z5jEyTjYrCyPJjZdQwl2Ucd4mXT2HtsNojiUclNzUd2Fn1vNJqDA3Ug0LeSfawYJ1iaQMOY289DCe59ryIBHnby4uM5ByxnE7MWaedXL1IVlvqwTxkHVQQBfE8JM9Uc2/Lf514ezhE5KS9SGnkJsnOII0Cj6dZQFl1hwE8Wwkkj2L5nw7Ty1ECvm2HQNv/lQzIU9kNHvrDA== 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=t4dF1/vajZHlStSiQTr9hy92T3CSMv5aH+8yJyR6smc=; b=U8KaiZyy1tND5PbnZM6qeeDBKxuwKtz1UO4ocBOB7PWYnDg8HsJtpSQFzJgtOq46JDUHqnOO6G8dTxJ3FKd9Ak+g+EcIFqwJ7a+f2p3PDdJPXLVnG/PGbdZtFS6JKJ7Q8aQSutw4c/hefjrztocwJ9o2mydN3b+Js6O4TgBUkIGCrsO1yF4BU47HjuoDJg+tBL6qz3tKDrG3EG/Av+Ilj8GELstW09D2UhIo3Sr9YH9u2cySlUlFwpN6Oot7cORRSpNIGUbzn6ENzyGmRFuoIyu3yILzkvS9b8yy4bnHMDefnoMpmdxpC8Ott+PgNn7bUGDZliT/hkUFNOg/sPjeAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=inmusicbrands.com; dmarc=pass action=none header.from=inmusicbrands.com; dkim=pass header.d=inmusicbrands.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inmusicbrands.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t4dF1/vajZHlStSiQTr9hy92T3CSMv5aH+8yJyR6smc=; b=mTWLkIU1EsPoccBzAgy8oQoy+kbl+NAyn8wCOiHPyW5eqwhHTWdHYSpBboJoYq0aBDPgic2B0QynYfJ7LgDbBruMq3qaMpgTam6pLVIoYhYwCKsT0843usnbUen5AkjWj+//gxzHLu7XeO/E7+uGo7e54mqkwMPrIERh4JNlxFo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=inmusicbrands.com; Received: from MW4PR08MB8282.namprd08.prod.outlook.com (2603:10b6:303:1bd::18) by CH0PR08MB6842.namprd08.prod.outlook.com (2603:10b6:610:c8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.13; Wed, 15 Jan 2025 11:01:53 +0000 Received: from MW4PR08MB8282.namprd08.prod.outlook.com ([fe80::55b3:31f1:11c0:4401]) by MW4PR08MB8282.namprd08.prod.outlook.com ([fe80::55b3:31f1:11c0:4401%3]) with mapi id 15.20.8335.015; Wed, 15 Jan 2025 11:01:53 +0000 From: John Keeping To: Javier Martinez Canillas Cc: John Keeping , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] drm/ssd130x: fix ssd132x encoding Date: Wed, 15 Jan 2025 11:01:37 +0000 Message-ID: <20250115110139.1672488-2-jkeeping@inmusicbrands.com> X-Mailer: git-send-email 2.48.0 In-Reply-To: <20250115110139.1672488-1-jkeeping@inmusicbrands.com> References: <20250115110139.1672488-1-jkeeping@inmusicbrands.com> X-ClientProxiedBy: LO4P123CA0215.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a5::22) To MW4PR08MB8282.namprd08.prod.outlook.com (2603:10b6:303:1bd::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR08MB8282:EE_|CH0PR08MB6842:EE_ X-MS-Office365-Filtering-Correlation-Id: 043542f2-866e-40c2-03de-08dd355404a0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014|7053199007; X-Microsoft-Antispam-Message-Info: JKpjA+p5U+Z13092pwJOkLaB11RjO8KyymcTVjWLOaPMM6jAx9xO4tlLdXlymtClz6J1w1xcU0u1Q375oWKXtUCRbSVBB8h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HvyGoMQDmTfKN4VLH+QDU6YP0dPfdfBhq2i9/RkmKLdLFS33bxJpunICmIjZgSJV7ouQjUJXbhmyKNY65W/aitjLrhrdmkw2XJFb2YrlnMb138fwrrR8STO/Faw0OGQSCnczG8IFPOUzsVIpRpWm/1/vLpFSDloEFhLVWbD0NHjpmfetHQ+cR07RvphtvPTkPUQaytfDEvrGxSqZqPnU2aJGKHWS/ZlG2Bq6ShsQwspSjByXalAWRVCRM8cdJfsW3S0SLMV7sHcefVMFIUKIGqjMbEKh8rq2k9dI/R5HE7+DIZZph6CoYNK7MkHynYxUqP7 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR08MB8282.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(366016)(1800799024)(38350700014)(7053199007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QRlSJ8JJuSSufrEJHJ9anfDJrliMxkA52kgs6nrl66XII8HkG66+tPcuX9cMKl//gc1n/1DM4/kriuhax4ylq17dADLe9Z/7Pl05NikmOCsec/lQTbRXD5GopMggLh0zYqbvXtIvV0f3lB3uaWL/jWZ2N4Yp8N2JflkqLuKRUxc1wxKAMBEdtom5Q94dsXGa12qyeCvYNavD7AXuEvdp/Iu0Oi+k1sleRo52Y7Fi32f40tjuHbW9/UqCsRzgjrO4SxkPyGc+EKOrDqubHpQ5ZBXvxX9N67EkxPTQinwHldkZCcqescIh0C6HF0uOiqEy+wow5U64mSCSooTHBrHc5xXhlpkBcoFOtupKMPSH8Lyfh7HPSNu4YNN2xc1Ih1iMGAS7zXD6oOno/2u8IfZeR7F8A+Y1qqDbJ7QkceoDq7qUNZ28DqufcHfG1yC7CSBzhMC7hC1mEU2q+WTt+eT7N139847g1t789ly7Z8teARrMx069O+RXXpqcP0yFuAjZ7ZdCSDBk43zzNXrJw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Ql4HyziPCYUbc3xQw== X-OriginatorOrg: inmusicbrands.com X-MS-Exchange-CrossTenant-Network-Message-Id: 043542f2-866e-40c2-03de-08dd355404a0 X-MS-Exchange-CrossTenant-AuthSource: MW4PR08MB8282.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2025 11:01:53.0520 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 24507e43-fb7c-4b60-ab03-f78fafaf0a65 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rtbwnNnqWMb5PNDl07rW13+rVhAmeMkVZLisn5SgVQusUpZZbYTTfkdXad0j9+pOVQELvnCwiXncIpShKfg/R1NzK1Z3TuETasYuf88QFH8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR08MB6842 X-Mailman-Approved-At: Thu, 16 Jan 2025 08:07:59 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The ssd132x buffer is encoded one pixel per nibble, with two pixels in each byte. When encoding an 8-bit greyscale input, take the top 4-bits as the value and ensure the two pixels are distinct and do not overwrite each other. Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family") Signed-off-by: John Keeping Reviewed-by: Javier Martinez Canillas --- Changes since v1: - Correct a typo in the commit message - Add Fixes and Reviewed-by tags (thanks Javier!) drivers/gpu/drm/solomon/ssd130x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c index b777690fd6607..4bb663f984ce3 100644 --- a/drivers/gpu/drm/solomon/ssd130x.c +++ b/drivers/gpu/drm/solomon/ssd130x.c @@ -880,7 +880,7 @@ static int ssd132x_update_rect(struct ssd130x_device *ssd130x, u8 n1 = buf[i * width + j]; u8 n2 = buf[i * width + j + 1]; - data_array[array_idx++] = (n2 << 4) | n1; + data_array[array_idx++] = (n2 & 0xf0) | (n1 >> 4); } } From patchwork Wed Jan 15 11:01:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 13941418 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76EFBC02188 for ; Thu, 16 Jan 2025 08:08:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AAA3910E8DE; Thu, 16 Jan 2025 08:08:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=inmusicbrands.com header.i=@inmusicbrands.com header.b="fbPLGm/R"; dkim-atps=neutral Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2094.outbound.protection.outlook.com [40.107.93.94]) by gabe.freedesktop.org (Postfix) with ESMTPS id 736A310E5DB for ; Wed, 15 Jan 2025 11:01:56 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JGdtDlKKzZLJhE3VQLZnBd/AQGayhKXsgGK38iwee1+ywGZ+fgQ+FNao6N8dkr9Y4Kd+dMqf7NgmK7vikNOta8IydvYOZpETEzDWnip79LjxaCp2TpfahjGYv7L7Y9AA+fmbedndr/6AFl6xSY8+Rh+7a8hMNfIjpnD1zxPwjSk+iTIN6zccv4nYqhiTrRNk3SPgTyE7r7wvUth9VpB005yveF6R8q/fFBK4C3GC2QcgMVmvQdwUHVIeAb/AePouFNx0Ze///JzbgwDanZEF1G2RaAatAkr8HAb9yyQAMHiQsVGQDR6OfMmHXmhiVBIn97o8c7SL1d/aZwxMm3H64g== 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=exkryPA9kC4YcCxJyZEE8U8u9uu36BXbsDs6dLKoCJI=; b=uZP2gnDMnAq7TgvdmSj+Z+HXy/tJCWPCt7O2oSsqRhT1ySgVBg39/TitdwLWcZGXO4GMKTa3qJIEIAd74HdHQojdin0sWHaNRzP/cAFXcMg7ZeYRtQKaumyVyB3xIMhOcrjORecorRogFq2EDwUTMjgW/OZdrzntK6GsG1+A2/IP6wjyKB/Mp9yqyZDV1Yw03KKH1atrO1z3WuhsrYd83EIeTI67BFOBn+cCRk6DobVwyFIGQePB6k3BhV0utBCpXK41N3aIQoY6vN3g/6Hhtrq+/84ngknPJ8P8yEqlMAV7LeesggBwwSmiXFujpDvt+jO4mzsRT+9HUnA+0YrpTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=inmusicbrands.com; dmarc=pass action=none header.from=inmusicbrands.com; dkim=pass header.d=inmusicbrands.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inmusicbrands.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=exkryPA9kC4YcCxJyZEE8U8u9uu36BXbsDs6dLKoCJI=; b=fbPLGm/RLbhv/S1cluhO5GCcvhLvLw2W2k4z9R6w5eM1yCRUEiKbTWD3Ms0hfFWqjK2i1fu4ITtcWB4gtuwR8HsjDXB6XVDofBxXJnLjHUlxu5GLccRL0TbGcpdtSgte+F+KeDoWbiS4+162nWFS1zIEyW9OKUmD9YoMXwCR83U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=inmusicbrands.com; Received: from MW4PR08MB8282.namprd08.prod.outlook.com (2603:10b6:303:1bd::18) by CH0PR08MB6842.namprd08.prod.outlook.com (2603:10b6:610:c8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.13; Wed, 15 Jan 2025 11:01:55 +0000 Received: from MW4PR08MB8282.namprd08.prod.outlook.com ([fe80::55b3:31f1:11c0:4401]) by MW4PR08MB8282.namprd08.prod.outlook.com ([fe80::55b3:31f1:11c0:4401%3]) with mapi id 15.20.8335.015; Wed, 15 Jan 2025 11:01:55 +0000 From: John Keeping To: Javier Martinez Canillas Cc: John Keeping , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] drm/ssd130x: ensure ssd132x pitch is correct Date: Wed, 15 Jan 2025 11:01:38 +0000 Message-ID: <20250115110139.1672488-3-jkeeping@inmusicbrands.com> X-Mailer: git-send-email 2.48.0 In-Reply-To: <20250115110139.1672488-1-jkeeping@inmusicbrands.com> References: <20250115110139.1672488-1-jkeeping@inmusicbrands.com> X-ClientProxiedBy: LO4P123CA0215.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a5::22) To MW4PR08MB8282.namprd08.prod.outlook.com (2603:10b6:303:1bd::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR08MB8282:EE_|CH0PR08MB6842:EE_ X-MS-Office365-Filtering-Correlation-Id: b6fa193c-0f35-405e-c77b-08dd355405f1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014|7053199007; X-Microsoft-Antispam-Message-Info: Ni0XLmCm6kidoXINeaE0TcffQyA3JFAIN43yOX/kPjmLjSoGVTjyZpTkZJmnux1wLxIAieRVBc0d63zP1hA+YKylz/ZKai39rZu0Pjq+uKHAaoraq5Ah+JToXkkJcgKSMflNbgkkSlnCC8LPL5zfJXA9noJpz5NC9rcELgHzyThxPc0wHP/qpSQnpWyAraPnt2+j3IMi2OHSzDxaNKEdUYqG83DGacFlf6nI0/1eIH4aq3sBVW7FRsCHPuommdGHyxbILtzGft/Bevw0xohl1GNe3k60sU2qcSuO46/rYWm9hKY88BBlRGa51hWwNM3cIejhfF3meqqsq5NHtdMKaUyIvwopjMwpJcfYbUh+Sj+uKxZS6f0wUzlJKAXoN3Kowuum8FMQEcAqJJ+stoD5mm9ayKP5CxnaUWnKaJVjoM4dpVQPFI5AX49p7apkG9WvWhtsDrE1vIarOZPRjKY1B1Ycmr+s90v0Ao7Mj+e31fpACmJkCLvzYpd6ifufn58BaRt2QyEb6i5cXLoHvRFJWbefeIX/B9CcKPIm8UYRYf7GBL5NrxoQNHhd5zhVuqdyZwkM9Yj/ig1/9k6ilZTVnP96KMCKQepi+rkCg+DkQOjAcKGy/X5bWuUq0HajxIasBQa8WPcgBiLtR7SMD/xnoY4jUrCmsPMzdd2t+orFOn4dN7ALpvcyNPPpV9+7xF1ZVd5cwwLYvfQZaVHBgi8zkyhMpZmqXN9m0F3DCAPIMVby9YxSmHWngSNHiUulT3f7oOEaRccCEvuCSZoKctwviaXC3Yy6NmTO/nFskqM9dTxe3xyw4TL7UtVMEy3gaYkOQNIlZi9Ujobv/YTS5SwviPcSwWvG8f7t3WcwIdwSbMXRvXGki13TlJzw+QAZqFKLC/V4gbV2of6VC+HbjIToxjVCA8+tVYKbPZiUevN0BxqDvUWllIm9/oyAMhTrh748+zYRTeTvGarYcV2Iroshk6ZGNb7unU7mlIIm39SD54HK8kwHDowHHsDomu6vIgR1+XzQvKKzkkrfSgmH6/p9urgaoyT0Z6aMp1zlGvND+jfqO66uoAsXjjv3ccIwdu6EkohtzaL+XsQaGUb5lY8GIuxsJlBbfZCircuOTjtaTH6HIKxgdl4YXFYOjyeMa1+hb7nXtnXll0pAcQ3AU+P2kPNjdik61FVK8tdXhBGkbAp+6xQ6MCqoD9HCH7a+3+WqPYqI6eZnRCA+xYMxAahcrFOmoeFNv/5GGRgpmQtgF7dUTT7wQgyqDkXKhS/Ck7poWDqUAJT61h9HbUklhSJ9Q0ffnnbMzCtKsJOfgeR5QuSj2mRxXhS7BsyHQTPruPpfeRnTxQivop2LYvnZt7bkA/ralL9WrYKPPNGqwgvpV4yjU0JblHo/CEkDkPj8OmEHSvZU6VJW/q2dg2FUIiH/LmE3BMG6SxNTv5nbbnBsGipAMiA23wpGq+ulR/8d0daj X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR08MB8282.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(366016)(1800799024)(38350700014)(7053199007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vkKOBRpuZfbnion6+MX2jM9o0AXZKYr1hKPCXSiEqtv7ZHG491hPNDYNWu+9GqxeT3iqoEYbk3yZLcDkEZYzBXK5fvWrh5dIZV7wmVJ51VD7II4N9zP6sOYfuT0EXf4yUgKilt0+NqQkZz557+K5SargqMupWY8z62vX9ztRlcpRNRRi56EoghMu3DJbSmaz4whEg+hR1IC+i1oORKrGazqVfbL/096TtUPD2Z3h0da+OmXjBpsS7KeFw/Ve4uCbrepYFJf0feBSFY8ttNiHMOWuPGTu5jplJfDRIX8w1eQLDDyD3/Xcwd8dwiuizLprFLtgL1RAHEP1gTSKrujAJfEFhyQh5FC1lX8Rns8iWaOt8CM645hwTyjU+/NQH861z2lP0fI4Jl6lai0H8iN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+vdRuKR67HcoP3/ooPR0DRYUn4O1fOlvnABUKvfCedL4k3+CPScy2xKGirEfZXmaidhreR3YdA5WDGSH9HQUmc+BTlfshlQR9v6QTvS3xGNVetnWiiGVwRmWDMMamg75rKhNFO09oODAJl6vnOnkVew== X-OriginatorOrg: inmusicbrands.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6fa193c-0f35-405e-c77b-08dd355405f1 X-MS-Exchange-CrossTenant-AuthSource: MW4PR08MB8282.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2025 11:01:55.0428 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 24507e43-fb7c-4b60-ab03-f78fafaf0a65 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sdZBMxAXYR6dck3dM6cF89G4T6SzFGt9VoIrYilqVIAJGzb0XGBqbg3vFVb8kqJFU8/Wpxn5pSljgt92Bz8IZyZAPFX/e9rFxJQZLXVVvG4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR08MB6842 X-Mailman-Approved-At: Thu, 16 Jan 2025 08:07:59 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The bounding rectangle is adjusted to ensure it aligns to SSD132X_SEGMENT_WIDTH, which may adjust the pitch. Calculate the pitch after aligning the left and right edge. Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family") Signed-off-by: John Keeping Reviewed-by: Javier Martinez Canillas --- Changes since v1: - Correct typos in the commit message - Add Fixes and Reviewed-by tags (thanks Javier!) drivers/gpu/drm/solomon/ssd130x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c index 4bb663f984ce3..dd2006d51c7a2 100644 --- a/drivers/gpu/drm/solomon/ssd130x.c +++ b/drivers/gpu/drm/solomon/ssd130x.c @@ -1037,7 +1037,7 @@ static int ssd132x_fb_blit_rect(struct drm_framebuffer *fb, struct drm_format_conv_state *fmtcnv_state) { struct ssd130x_device *ssd130x = drm_to_ssd130x(fb->dev); - unsigned int dst_pitch = drm_rect_width(rect); + unsigned int dst_pitch; struct iosys_map dst; int ret = 0; @@ -1046,6 +1046,8 @@ static int ssd132x_fb_blit_rect(struct drm_framebuffer *fb, rect->x2 = min_t(unsigned int, round_up(rect->x2, SSD132X_SEGMENT_WIDTH), ssd130x->width); + dst_pitch = drm_rect_width(rect); + ret = drm_gem_fb_begin_cpu_access(fb, DMA_FROM_DEVICE); if (ret) return ret;