Message ID | 20231116180743.2763021-3-javierm@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:6513:b0:164:83eb:24d7 with SMTP id sk19csp42486rwb; Thu, 16 Nov 2023 10:08:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHcvdhw2BYR59HVt+p9KItClgRpPxxXhSN47qnuNZ4X20DWtKN+9cfLDTPO5dGGnPuB87nd X-Received: by 2002:a17:902:f54e:b0:1c9:f780:8070 with SMTP id h14-20020a170902f54e00b001c9f7808070mr12771231plf.19.1700158113447; Thu, 16 Nov 2023 10:08:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700158113; cv=none; d=google.com; s=arc-20160816; b=xQEA3lCmQyjc1XW29qsYs+woIThBDS6H+BaguGcl6aQoorw0H5rAG7/Z+nep6ibr0d WNMIunYRziw6AxYg/8jp/lGmveY+kSE7zbMGeitC9/xoMV8TjJLhxuZhsrq9M5+TPRMh q7/lQoy9GvK0p7yeizEx+ft0BUeobWfpoXjcMGeWwrvShjcsqGqc9ksVYpJKonQgSVk5 XRBkGOheyt7LtYPchkOVXRzcmBDb+oWpnqPtgntJqoevPjPzNO1N2uCsog+HnNtmC3rQ Ihclv+nb8rl/GhUlgTd8W0DIZ5q0XQ9moSz/HC4TTEr26Qq3wEUaDTNC9fTgmcMVSWrf BBqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=abMypBf5ucI4kN1b2IUT7QxG30gkYzFxCp5z4V1rKYE=; fh=3Zv55Ewp3pb2z3n4lYcg3b7V9G+WJAfUlIwwYEoRBtU=; b=NkmXXjVA9LR3i2YhMni2GT2s/1Cxy4xWS/JJhQWomB0dkjohPn+u2VTQH0ZW01rWKd k+gDo0rVKWrFJzHBuS8S6yWZD5do/d6dDgO+T+i31t6C2PelOirdHm8UtjEuMpf2roK8 vju//vc0rSOGevWBA9Clr9Fm+Ly4M3pFURRQ7wa6RxFWkgeESuPWB5pBxVtIAWP8lehe 6+LRzIV6zbl5Z9rcWvM7nkRlo8Qg2PTLB8vr0/WE2vT/PRa0c8lbwoWYj1IZXkf93YrQ lZ8bigguwkAQB1dZio4Miw0muYSYTZh0Q/w2DFIjoD30OOUr8SPDS1XbOhdOMlsrraAM ktOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DptkUAYX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q9-20020a170902dac900b001c0c86a541asi13916632plx.375.2023.11.16.10.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 10:08:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DptkUAYX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3841A81CEB07; Thu, 16 Nov 2023 10:08:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345436AbjKPSIJ (ORCPT <rfc822;jaysivo@gmail.com> + 30 others); Thu, 16 Nov 2023 13:08:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345421AbjKPSIH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 16 Nov 2023 13:08:07 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BCCF195 for <linux-kernel@vger.kernel.org>; Thu, 16 Nov 2023 10:08:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700158083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=abMypBf5ucI4kN1b2IUT7QxG30gkYzFxCp5z4V1rKYE=; b=DptkUAYX9+gBJwotIhbneBWTZmUUrwZCqOk0YwhjYrBPLBYir0f8BeUnJ2AvaEX0SAY+JB tzu+b8QlW7z0TYhFdWVH60jgcAo6ywsPAeHOqVnZ4LgVNUoZSjYplvlsemOnudUPH/ySNx 3YMQv7eud3OwNbrBEeZnBeoKUYMkRxY= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-283-gfzvP2BAPL-AeZgb0sH-VA-1; Thu, 16 Nov 2023 13:08:00 -0500 X-MC-Unique: gfzvP2BAPL-AeZgb0sH-VA-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2c6ed315cc3so10312111fa.2 for <linux-kernel@vger.kernel.org>; Thu, 16 Nov 2023 10:08:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700158077; x=1700762877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=abMypBf5ucI4kN1b2IUT7QxG30gkYzFxCp5z4V1rKYE=; b=QJTfPq0+zw61imxxayzG+kFdu3pRKYwUyg1qvXJGWlLIuUCr8681x7OSzWyPG/iijQ mUDGfZAi99VdT0MZIE0bPQwJqpD3oF89lcmJAPvydVBcvj+hkPyk/T8/l4cl9L8vBCZl sLifro/FPB8TwuC3dNViTbo46EcKQa6n+zbzxtgE/5FiJcHLQZKe7BfSlanzHWdg4gnt w6zQbDHS8Zxbnx8oTXb2WQCzGHy+t0VoeI/o+46t4XrWsUioJHuKdshBa7CkJpXaLS8J dN20aAG/3jFOw9X9k2KT9ay8JvAgZHDTczSpVPLiFp3VM6SqTtkdyFG4dfvsZHEe9kLE 1/Dw== X-Gm-Message-State: AOJu0Ywvo8mDgLlIArsYumqn/mmlLknOXUc1ZOXgqEZlhoq2acqBAiaT DK8sM20bMomGN9O13QfHzq6LpaGcafum2G1tcHOf8Kudh2Vfg0qvKhhwKQQiDkWV6Co4nzAXlW+ O2hScNgh2NGlAjVmA2lWlYdmVsUmXcjh3qzjJlq3nq82QUFxiayiGG+qpG64X87GF46sPHP8wtS OMSrOM8C4= X-Received: by 2002:a2e:9b13:0:b0:2c5:2813:5534 with SMTP id u19-20020a2e9b13000000b002c528135534mr7628264lji.51.1700158077746; Thu, 16 Nov 2023 10:07:57 -0800 (PST) X-Received: by 2002:a2e:9b13:0:b0:2c5:2813:5534 with SMTP id u19-20020a2e9b13000000b002c528135534mr7628244lji.51.1700158077374; Thu, 16 Nov 2023 10:07:57 -0800 (PST) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id q9-20020a05600c330900b0040a3f9862e3sm3216257wmp.1.2023.11.16.10.07.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 10:07:56 -0800 (PST) From: Javier Martinez Canillas <javierm@redhat.com> To: linux-kernel@vger.kernel.org Cc: Sahaj Sarup <sahaj.sarup@linaro.org>, Javier Martinez Canillas <javierm@redhat.com>, Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm/ssd130x: Change "solomon,page-offset" property default value Date: Thu, 16 Nov 2023 19:07:39 +0100 Message-ID: <20231116180743.2763021-3-javierm@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231116180743.2763021-1-javierm@redhat.com> References: <20231116180743.2763021-1-javierm@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 16 Nov 2023 10:08:31 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782744994161666073 X-GMAIL-MSGID: 1782744994161666073 |
Series |
[1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" default value
|
|
Commit Message
Javier Martinez Canillas
Nov. 16, 2023, 6:07 p.m. UTC
This is used to specify the page start address offset of the display RAM.
The value is used as offset when setting the page start address with the
SSD130X_SET_PAGE_RANGE command, and the driver currently sets its value to
1 if the property is not present in the Device Tree.
But the datasheet mentions that the value on reset for the page start is a
0, so it makes more sense to also have 0 as the default value for the page
offset if the property is not present.
In fact, using a default value of 1 leads to the display not working when
the emulated fbdev is attached to the framebuffer console.
Reported-by: Sahaj Sarup <sahaj.sarup@linaro.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/solomon/ssd130x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Nov 16, 2023 at 07:07:39PM +0100, Javier Martinez Canillas wrote: > This is used to specify the page start address offset of the display RAM. > > The value is used as offset when setting the page start address with the > SSD130X_SET_PAGE_RANGE command, and the driver currently sets its value to > 1 if the property is not present in the Device Tree. > > But the datasheet mentions that the value on reset for the page start is a > 0, so it makes more sense to also have 0 as the default value for the page > offset if the property is not present. I can see the argument, but that's a DT ABI breaking change. > In fact, using a default value of 1 leads to the display not working when > the emulated fbdev is attached to the framebuffer console. Could we fix that one instead? What is the issue about, exactly Maxime
Maxime Ripard <mripard@kernel.org> writes: Hello Maxime, > On Thu, Nov 16, 2023 at 07:07:39PM +0100, Javier Martinez Canillas wrote: >> This is used to specify the page start address offset of the display RAM. >> >> The value is used as offset when setting the page start address with the >> SSD130X_SET_PAGE_RANGE command, and the driver currently sets its value to >> 1 if the property is not present in the Device Tree. >> >> But the datasheet mentions that the value on reset for the page start is a >> 0, so it makes more sense to also have 0 as the default value for the page >> offset if the property is not present. > > I can see the argument, but that's a DT ABI breaking change. > Yes, I know it's a DT ABI breaking change but what I'm trying to argue is that the DT binding schema isn't correct to start with. Even the RPi DTBO for this device (which I guess is used by most people with a SSD1306) has a property to explicitly set this to 0: ssd1306: oled@3c{ ... solomon,page-offset = <0>; ... }; https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/ssd1306-overlay.dts >> In fact, using a default value of 1 leads to the display not working when >> the emulated fbdev is attached to the framebuffer console. > > Could we fix that one instead? What is the issue about, exactly > This is the issue that Sahaj reported: https://twitter.com/sahajsarup/status/1725088484736766364 I can try to figure out how to make the fbcon to work with a page-offset=1 but didn't investigate since thought that 0 is a much better default. Just like the maximum resolution is the default if no width and height are set. > Maxime
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c index bef293922b98..8944129a8e0b 100644 --- a/drivers/gpu/drm/solomon/ssd130x.c +++ b/drivers/gpu/drm/solomon/ssd130x.c @@ -1453,7 +1453,7 @@ static void ssd130x_parse_properties(struct ssd130x_device *ssd130x) ssd130x->height = ssd130x->device_info->default_height; if (device_property_read_u32(dev, "solomon,page-offset", &ssd130x->page_offset)) - ssd130x->page_offset = 1; + ssd130x->page_offset = 0; if (device_property_read_u32(dev, "solomon,col-offset", &ssd130x->col_offset)) ssd130x->col_offset = 0;