From patchwork Mon Jan 13 15:27:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 13938510 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 ACB06C02184 for ; Tue, 14 Jan 2025 08:34:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A4DEC10E44C; Tue, 14 Jan 2025 08:34:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=inmusicbrands.com header.i=@inmusicbrands.com header.b="U5XS0AZl"; dkim-atps=neutral Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2121.outbound.protection.outlook.com [40.107.223.121]) by gabe.freedesktop.org (Postfix) with ESMTPS id 27C5D10E6DF for ; Mon, 13 Jan 2025 15:28:11 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xHXgW84EEPtFTfhjq16unnvH1B4tj8rpEFXoPqVTKz+WyCTHx5eMvKZUUzdLY7es9dkGWWsPueni46lCXqEwLUl2e9RzgvrTg/6NzLpVbDHLMSh2bGbIbYFKWeyX+aj1AxLdArbe2H493lPRPTX6UXDRFWByHsO4ab0SQXYtvIrQLLoQ+SXZGezu+tCREmdGutMnhwWlA/67Oe8tY5KYfs3Nacw+SzVi474uHJN+Zs8qOyunYC3mqgPc3GQ4aRJ/40g7/2bYlLF8i8L+QsHjtZFaOTWeOp9FYOKdQyzDHOcWk9kvqlTHc1S5DyRAbJIu4wB+2K8RgplGcS91uZxEcw== 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=Tsgt/pjIHXHX/3g25D/d6wzDbwkP6JsSbrSvcEOgSUY=; b=Qnc+nU4SnW41hMYkZDZpwwpO8ac4mBNSzRzc01cGCBOIl8/a0WOp4vsUZ7b5EFGYGcos+orFDB8X3AU0PM1ZU/DeEpV0Pom4xtsS55J2w2uvRcTwcGieVf+AUi947ZfWJDqENXeejFVbLRo0TewFLmwmN6jnH3kuC8MzHtxYiP84zmIQiRW6bSFTYEOA/U68uUUC2AzUR2x9+ab4aEL7ngMShrrsI4W19Vj/75ya3o8hh5gV0jrJ3AZbODAK1jMk3bG+6yRhrDnoycpXsPiyhQDF/VvTB7pv/o6oNeK+HRJo2ZIxfDjtXBx4wmeX8OskqiCVHDmYp0pp/lfI2OJHRw== 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=Tsgt/pjIHXHX/3g25D/d6wzDbwkP6JsSbrSvcEOgSUY=; b=U5XS0AZlVPuMwr7wstoVcgVl/zQWuXR/kjV7RW1ek5bZoD40w/5vTd07gxb9jF5IBXmqhkJYYpNDbCZ6HmnErqHWKf860GPY8mRA9kYo2UPU+vn9FbdBnvsb3Lrai9nrDAZpcnLutlyoGbqYHps6+VeemkOIMHggWtUjfMqLQ4M= 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 CH3PR08MB9065.namprd08.prod.outlook.com (2603:10b6:610:1c9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Mon, 13 Jan 2025 15:28:07 +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; Mon, 13 Jan 2025 15:28:07 +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 1/3] drm/ssd130x: Fix reset timing for ssd132x Date: Mon, 13 Jan 2025 15:27:49 +0000 Message-ID: <20250113152752.3369731-2-jkeeping@inmusicbrands.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250113152752.3369731-1-jkeeping@inmusicbrands.com> References: <20250113152752.3369731-1-jkeeping@inmusicbrands.com> X-ClientProxiedBy: LO3P265CA0015.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:bb::20) To MW4PR08MB8282.namprd08.prod.outlook.com (2603:10b6:303:1bd::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR08MB8282:EE_|CH3PR08MB9065:EE_ X-MS-Office365-Filtering-Correlation-Id: e6fb6594-5004-41b1-e0b0-08dd33e6e171 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: DK6erbnwaY0El1S7LaaL5Zu38irs7kCDch2Kw9YF+R+7Ul2gKtOHQBdufXORwNVIdEJ2ydG6tdVYhDYaYy29/K80hKBBg0db4NWocZkn16j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0rUNmvRndrGb5BsfgXiv3hGrEfHjagtLXMZgjzcUFsmj1LuccE1G4XU/IGC8jord7TFX/3rAkDiR3dIHxcjexPgwzZ1aLkq3KROiA0i5EU7oElXkFmC097qDkY7pjxP+RMZJKMj9dGVYj6eXPaKYnOuWmXj+KtNR/JnXWMSn/guzGg/f6/4Jp2WKUapGqN3KT8C+90JdDVNrgd4ipCZkdVIQC9ElsnlieE7rYiJOKYW64eIUr0WEyAxJ2QZfKqjJbjOpP0TDBa1wEwxsiP5ZVV/Jp3LD7Vy 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)(366016)(1800799024)(52116014)(376014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +bQh10O1esLEWjLqnMUGDezU7ToG9qFt5MiuFUgOeNy8cpUmKeetZLSW59hIjgpyKixHrTjAWQStcKx0PwzrgHP15jTteKL7XL5wND3/d3S0MWJ/iTZBq6Wa2NCmzpCq6lWzMl5SMXIExJH0BPb6DNxb6F4hyhGbJGllMH0uClYuzan1kVRtLrrz5a+qYgEQHEtjUjmzq3BnP737Q46df/RphCPTK1rRaD6wU5mrVHpw2AZ58Za2xcJ7339M4Koymkid8bkzt0gH4RqhT4dpZBHKOmqtMB6tOp0SNKSOKgwlpmTiYvrf8/IYMVimHRLrNLpLCN6/PcSTGNcsUlmppW7wa6sD18r9EjZ6psUin7g+BT6vOBkFmk2V/LNoGqfXa03Og0sJSNRyp7evxwRRwG7SdtlKYrerQzRPozWfBl6P4dlrEn1o0/wVYZMcD5+VZTstdC7hn8lYXnSha9kgVf3GKYae30NL1NwsgO2/5ttLXiueqpHyb3ujVhTRL1FUM/C3kRTNhIngiQh3H6sT976cnsrrfMMtcWAYC15dbJItn6hzkAhwCJit7UC/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X-MS-Exchange-CrossTenant-Network-Message-Id: e6fb6594-5004-41b1-e0b0-08dd33e6e171 X-MS-Exchange-CrossTenant-AuthSource: MW4PR08MB8282.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2025 15:28:07.7138 (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: NOtP2Xyi1U763F4PYOmVH0A9gZBvhQILuI9iZZF7AHIwAB+hcLHR/CtG167hx+iwtoMlwyVsBuRxFgE/h6qqLwdfceFtpGXGYBH0kBq7gx4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR08MB9065 X-Mailman-Approved-At: Tue, 14 Jan 2025 08:33: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 family of chips require the result pulse to be at least 100us in length. Increase the reset time to meet this requirement. Signed-off-by: John Keeping --- 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..2622172228361 100644 --- a/drivers/gpu/drm/solomon/ssd130x.c +++ b/drivers/gpu/drm/solomon/ssd130x.c @@ -363,7 +363,7 @@ static void ssd130x_reset(struct ssd130x_device *ssd130x) /* Reset the screen */ gpiod_set_value_cansleep(ssd130x->reset, 1); - udelay(4); + usleep_range(100, 1000); gpiod_set_value_cansleep(ssd130x->reset, 0); udelay(4); } From patchwork Mon Jan 13 15:27:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 13938509 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 43041E77188 for ; Tue, 14 Jan 2025 08:34:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7D5B010E44A; Tue, 14 Jan 2025 08:34:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=inmusicbrands.com header.i=@inmusicbrands.com header.b="cTbdG2LS"; dkim-atps=neutral Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2123.outbound.protection.outlook.com [40.107.236.123]) by gabe.freedesktop.org (Postfix) with ESMTPS id B236410E6E5 for ; Mon, 13 Jan 2025 15:28:12 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=p8b8kRkgIRGTc4i3gMO8UdI/STn4irVoAu40JA5i3VapYK9Xv3qgRqjSZ32SPRz30r60Y75vZ9kVcPrC2rxjOWDekS9UeLEV1A/oaIUUUqyKj2O77DY4x4GHkBfEkOF5q9G22WMLH8t+tIWuK5KhOtGMgpZvVJeHszcHxbGH8U0ZKBVREiEzA4IKYQXMYNf9lF1iQHhwtYPxTGqLtN6Wt0qsJNMh0Oerp6eFCIstAXOaxs+SycS0lcsAiFmQcte9b0Tbhckb0tQ/fE08EvmluksTMnNUPoydN8oP4vu3bXFDKYWP9qYGd+/p8UvtN9Y5JFX7ZeJpG4I62VRH2ALqKA== 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=r3JVBf06rT6OZJlPNsZPT+2+04Zi3Zhs3/v+TZCc6e4=; b=S3qt/UhtA9cGqQEux1qtGee9XVJ9zxHXtg0w+UbwKOiB6Xsr8SVa0s3bki20oiK7L5sc1E9ZA9LFg+UaMQyJa0fDURq23XjM76V78lJ7KBjQMhw0TsF99yJIsRYEcn/FMGlHQ3AETR2tZHuR+xZUqZOJLxyZA1YLtGuyRxM4kYKcIamiNZVRjRByXBU89PmvFfjb0bSutlzXNY0KP1xQLdNByFXyjhSsLfA0nh6k9MZXNna7Eai6MQs+UfGpb9NlKyo8Dqt3L4ZmbCeiIYZntm7VZtIzqPqZ0t93fdD+xz2pFpeAK4PCit3ujdrZKJFF+tTQSOwrdrhDp2/s4lQpiA== 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=r3JVBf06rT6OZJlPNsZPT+2+04Zi3Zhs3/v+TZCc6e4=; b=cTbdG2LSU6cP0QjJRnMu/IdDre528b2cNSE4PxafRQbIM3BSYRSqjaH/t9/Wsgt+I7v3SK8rdpR4yCXXgdnhejDTHnnVq5SAP7p9lo2rKYaJirVPI2+h/IgKsm8KmGQ6/Gr30w9MDUPYGuk25FAaWX142k2nhz9msunG618m4hE= 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 CH3PR08MB9065.namprd08.prod.outlook.com (2603:10b6:610:1c9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Mon, 13 Jan 2025 15:28:10 +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; Mon, 13 Jan 2025 15:28:10 +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 2/3] drm/ssd130x: fix ssd132x encoding Date: Mon, 13 Jan 2025 15:27:50 +0000 Message-ID: <20250113152752.3369731-3-jkeeping@inmusicbrands.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250113152752.3369731-1-jkeeping@inmusicbrands.com> References: <20250113152752.3369731-1-jkeeping@inmusicbrands.com> X-ClientProxiedBy: LO3P265CA0015.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:bb::20) To MW4PR08MB8282.namprd08.prod.outlook.com (2603:10b6:303:1bd::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR08MB8282:EE_|CH3PR08MB9065:EE_ X-MS-Office365-Filtering-Correlation-Id: ea36fb3f-9650-4d2a-1c9c-08dd33e6e307 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: 9ltebddyMWGSv6asHPe715TDv3eoEW+vrarFWGZgeRSi8yZJiKu+EHvaWftePM7xAUYTYo76l9rpaGFJwXCPyTv+cTCzmIZCsB1GxDsOYjesQiqXmZhhXOihhvvrcdUoUA8jorDp4OYu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h7FBd3EY03bP3etftzMSNaQbnA02zs5Xx3SRbBGKfJy8gNubWcN75V6ir9MIfjCKuuAXkTbR/h44Lxa9JWwjEYk/Q5bK6NcOk+LGMReFj6n1K/4rqkfrGB8liumPe654up6kq2I+izhiW/Kl8oKqdQElgc9sRaHlWIFMH1IQFhsK/lufTjFj6PKiRCGQUOzfNiFP10NSjAOuzHCUfTq6p18v6gI+UOfMT1RUtHVerE95ZK0zw5DITXs40MJcc 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)(366016)(1800799024)(52116014)(376014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: n/OZ1D3Hz9rcFegNEv0SjYK9D1p5pE9TW05KgFKW2MrlIYO6kvd9DKG4xRTu8yAcRluUhQkukE2CSBPscisktSaF996NBPjcfwUlOekTT7H2LlV+E27UNMJelUpcQKFUGRXk61RH+m5trofxUrHhvqzRbx0Y10vFm2VmQuqXqNaN+g/JXa1XcCkekXAE6+2wAU5Csx0mxZbBGlbpS5jQjozoqHdcAyLMpq6oJrAPZAQceg/HOMNdUZxr404CRYtx6jNpVGDuep/84URwYFjPwyeahO9PcgZMBfNYeuj+nHho/QUqOz9XUVW0Jw/PMytnXOGBwh3unzca0PG8IHkMbEHk8Up4of8wgweBq1Wd4Hsk2m7XQa/4EpfwOyw+uCOLlUJFpq+jr+rkMWaJPJmPjIx10s5hhPC4ISxuTEhSQAiVtcejlKdhsscQ9jfWKiBh2Ha9VCm5km6/56/3CIkh+lRWunqxrfD3EVf990F9mqvYNL9u2Y+Qt6SGxYV/eW2JGxEhB7yuxnuCwRVURYKShJFP7Hhyabfsv2s38hMHZsRYF1pmwbQhNuvtbJ8izNW5U+bT96RlLHw6MdBRm1Rr73HF9lFFOKsaOifZafKRQIAh0EO//cFTvMNYbmH2OGDWVmdQl0pvgVeq5dXx06n8mDP8ACVbnoEgTAyQMgoxj61G0XN14OjehxQlmf/Cge1mpiunAWtJfO3nusgL0BgTuW0EDNywJXjloBMC9rSuPe2h4bJ/9eZ7TamcCf6yJGztyihI2meF3YivEEqvI6puR02xad+4K6r5YjevONwi5amT/OBM2sQHaqVLYcmBMsernVkdAMlWGNkfFUVLx//dZW9fhSlaQtcrFytI4uum7+WqIzWRBjCF3ST/p+xxa/z1HQq9gozShFyNC+wGx3wrLRfVn0I+azT5E8/3seqoMwuBdk5nFkwPRdmU5CzxB/UHsNbyLkF8l7kLdThCVLwcSKJKP3OVBXUnpN//WQHQXJJSU6lt+VnEjhal/YuumqlHtH8aJais32TYwzxLS9ICePPaUt83OjdkFY0oG2dxPCPSZZu2TcQBIafTfeS1xwbLHIPqJ2KVNoCu9/2nVtdK1Znwbk7uplgD0qPd8xvo/fN5JRC9aJXmfx6q2NZ74NIlc6cCiQsMnJM2VcU0PHASz/wHEKcFCPksOe54skk85FJjGlbQHMgYvyIhijryPXUy0LZZzBVHqY7VVaDBRg2XDHnmuoa/+jZSjTxobOyJQnhRDjviSypuesH1SJLrVRKCrBS6MRyweTpd8dl5alYikOM5ADvYxX0cJZG7aylmeIcXP/S6ktbBfH7B0Ks7twdMWby7N1eC5BfkZAHOkxiwlROdGthq7vIV3X4r5YekGkFEvtAWKUGobzYTKB5PNWYMygPFWFS/hDoju8JYIEACj2naR3uGcG0gB8mym0jagElQr1VxuTCXgHyUPLJFDl5TY0wY9t6IToK1z2j/pKN1fAatU4qD8qIyZ5D9y3GNoDQN4fpgOf5+W/3XHrXojfiLbvhiQYYQXLskYQTAK7BY3Ah0VRV7GhwYQ+O9KGxe1ObkVJZVCIfPrXhTqx98U4eoQxp7ay9cFSYzda1zfk5scA== X-OriginatorOrg: inmusicbrands.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea36fb3f-9650-4d2a-1c9c-08dd33e6e307 X-MS-Exchange-CrossTenant-AuthSource: MW4PR08MB8282.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2025 15:28:10.3428 (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: zip10aXRCHB3C8z4PJVOiW/+lE+k9u2GSypOGq35E8jep9o1nlULFGF8iNjC8qxBT+LbNtDVVnTGjj7eIvfRBu1noIbDQSI11/DbMoHD7vQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR08MB9065 X-Mailman-Approved-At: Tue, 14 Jan 2025 08:33: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 and 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. Signed-off-by: John Keeping Reviewed-by: Javier Martinez Canillas --- 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 2622172228361..64f1123080996 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 Mon Jan 13 15:27:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 13938512 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 00119E77188 for ; Tue, 14 Jan 2025 08:34:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9EB3610E878; Tue, 14 Jan 2025 08:34:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=inmusicbrands.com header.i=@inmusicbrands.com header.b="bpnelLRd"; dkim-atps=neutral Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2093.outbound.protection.outlook.com [40.107.223.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFD6410E6DF for ; Mon, 13 Jan 2025 15:28:13 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yd9mOUNjn7xulFbPh1jvwvVvVmGSlmEAS2XXiCdASVVT4VuU5lgs42/9N+aoA1wUVqaVPTFO6GOL5ZTjPTaTrbiWfVPj6Nw1/Rrl8kdbB5p8ehxeWVqLfgOzWrVO5WCagOsqvSnvXFOyKoZMWTmDhSbjhQWNLEJT1Ge+lfFW9idXXU1N5y3TVTuL/07CSCw88NneDBXNvi8qLmn7dRkburiNnNXn5NuzpuG4M6KIssFIYggO0HSqSIv/ZEwNp/Kh8KYCxJ3dCf5qiDTRygHkcAYi4ZsTncb+EnA25ZgJBaxxWzFwXczsGoy12raOqOe3oDeBwyGC01eb3jIDlP46kw== 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=U8oV6gs0Gn9i42Ohy+HtPGWy/FPOVrO/IdVHIU1gJM8=; b=X2mJnb2+Yppeu07u+K3bNTEdDQQBOvOpxnbqRj5AlhgjB7yMz85DbGL/luoSmtzdLZ8HkNjd15RDaQLNdwso32MxWYO3QQ/1FvKH4xcEHeZrh6TBuaCzaPK3UbQ+IvYD8gz97bQmTW3wHEZ1FnF6UVCWzjsv5bUqPdrNndtIxLDoRVLD/DwM0Znbd9vaDHLynfpVaEo4ohP77YxY6r3iC5vH3bWvVytGwa8ZRx/4zT2uN/xJEXK83d06KbSk64MF63bpwn4l50cUG/qWaUnJFH0J9X0Q80UjrADZoA/5sKKpS8YpKPetv1ebUKvDvvtCgrZEu5TDIfto6d9IrCqIKQ== 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=U8oV6gs0Gn9i42Ohy+HtPGWy/FPOVrO/IdVHIU1gJM8=; b=bpnelLRdEAti5tkKp/LC0ASRi9/fm3HIzWdvsVJhY6rf6vyFMi7JFr8xQhOGXTIuLARJTTUmUoIzFcjZJiwamJlHy66cUqqNn2Gwv4YLQkvhGDQf0T1oETEoCB9opQe0CXJaxz0fxGxqMtrm7usw/PdlaNGIWZsoXNjEH6+Wnio= 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 CH3PR08MB9065.namprd08.prod.outlook.com (2603:10b6:610:1c9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Mon, 13 Jan 2025 15:28:12 +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; Mon, 13 Jan 2025 15:28:12 +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 3/3] drm/ssd130x: ensure ssd132x pitch is correct Date: Mon, 13 Jan 2025 15:27:51 +0000 Message-ID: <20250113152752.3369731-4-jkeeping@inmusicbrands.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250113152752.3369731-1-jkeeping@inmusicbrands.com> References: <20250113152752.3369731-1-jkeeping@inmusicbrands.com> X-ClientProxiedBy: LO3P265CA0015.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:bb::20) To MW4PR08MB8282.namprd08.prod.outlook.com (2603:10b6:303:1bd::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR08MB8282:EE_|CH3PR08MB9065:EE_ X-MS-Office365-Filtering-Correlation-Id: f3d6f105-b322-483e-2f20-08dd33e6e444 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: KQpB/zFhpH8hcSw+qvJ2yC3B3sxaNpJu4CAdK1xQA85ZHkYx4dyFMH8d0+HPK6mu3Qa7NEsXnnC8F6zroOctMq84VB3rbRD+P+vmYIB/5PpUYXisYuGWebm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TOu4LyhdhyXYlMWQqb79wCCgirTX//Q9oGFXE3Ajwi0H6BdGs1CpbGTAMWgMgsyDpN7lkLTKvO7sBvbUKGxXNtWcFIcE++9bHxO4i7eNmJYpLISGzGaPcwRmo7zfK5V7fBz7/yVbulmyyqKbIjoQQP1RxZbjTdbQ1OBLCdGobTWGPf54G4ymPkJg+OQWbQtcDjaw2y+XpnDVrcdxIxuI0/9u63eZN7ucwq3zQXp2aOoKPq0IUC3apXxY3/UOwSpRcQKfs95eujn1NlZGZT4X8yv0YVKUGKX8 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)(366016)(1800799024)(52116014)(376014)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LcTXT3BPM76oGgVOUFRu+IV1sk0t6NN0h2Yl5urPPaJo8zTW6MpT1VJCw7HqYQCZfiEaaALtnEO6fk79CM0IBTyRE7DVOM/eLCl0poI5Lo3akEVRcGDjMVGEh5Ugwv81uGNtOfB3GfgBcLZT3usapx73AyT7mtDHb5iC/2QjNMmKFLAVoDQFgBq1yOgxlVDFOsKBvNAq23nKWvWJevEr53c6XNCyfuoCx1vm3bZea0+1k5GaRJrCGnNa6wmO2xCxlmdg69nhaX6xfxq49ew4xLb+GonmSwqiKu5Ehq3idyT0cpTylruHmfjrU6CfI9+m+gzrqC1VSdWJJGvWaCeCw8gtusLrNftiAOPCBejiOBBVdndgJgTYeQBJK8/rvcE+KyBMJPUR4SsE7uUHMtgmA3YxWfg4NiH1N1baXi0Th75khSz55ZXSDlXzloFtFXdwBAyF+IfxX71SzQRsV5VgNQll6MSjqfNE+nZFgdCSdG4z1j3wUi8WK9tuYw80Yjsw50t4LmHVY8BCJ1HFUvrQBLyMpERUDscVmO9P5KK0FA7I5rYB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OriginatorOrg: inmusicbrands.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3d6f105-b322-483e-2f20-08dd33e6e444 X-MS-Exchange-CrossTenant-AuthSource: MW4PR08MB8282.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2025 15:28:12.4532 (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: HOMvMiF+T9FzPRWcd64kILYGzRUhU+QQSnJepwFlx6GuhDanUH4dwbg8KTxVr0vWd1xXCyn/zVjrM2riR3mXOnL2fCzAZ3ml/dqyTTR5tgo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR08MB9065 X-Mailman-Approved-At: Tue, 14 Jan 2025 08:33: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. Calcuate the pitch after alighting the left and right edge. Signed-off-by: John Keeping Reviewed-by: Javier Martinez Canillas --- 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 64f1123080996..38f31c3624062 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;