All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Helge Deller" <deller@gmx.de>, "Sam Ravnborg" <sam@ravnborg.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: [PATCH 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property default value
Date: Thu, 16 Nov 2023 19:07:38 +0100	[thread overview]
Message-ID: <20231116180743.2763021-2-javierm@redhat.com> (raw)
In-Reply-To: <20231116180743.2763021-1-javierm@redhat.com>

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 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/video/fbdev/ssd1307fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 5ae48e36fccb..34f014bf4994 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -637,7 +637,7 @@ static int ssd1307fb_probe(struct i2c_client *client)
 		par->height = 16;
 
 	if (device_property_read_u32(dev, "solomon,page-offset", &par->page_offset))
-		par->page_offset = 1;
+		par->page_offset = 0;
 
 	if (device_property_read_u32(dev, "solomon,col-offset", &par->col_offset))
 		par->col_offset = 0;
-- 
2.41.0


WARNING: multiple messages have this Message-ID (diff)
From: Javier Martinez Canillas <javierm@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org,
	"Sahaj Sarup" <sahaj.sarup@linaro.org>,
	"Helge Deller" <deller@gmx.de>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	dri-devel@lists.freedesktop.org,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Sam Ravnborg" <sam@ravnborg.org>
Subject: [PATCH 2/3] fbdev: ssd1307fb: Change "solomon, page-offset" property default value
Date: Thu, 16 Nov 2023 19:07:38 +0100	[thread overview]
Message-ID: <20231116180743.2763021-2-javierm@redhat.com> (raw)
In-Reply-To: <20231116180743.2763021-1-javierm@redhat.com>

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 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/video/fbdev/ssd1307fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 5ae48e36fccb..34f014bf4994 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -637,7 +637,7 @@ static int ssd1307fb_probe(struct i2c_client *client)
 		par->height = 16;
 
 	if (device_property_read_u32(dev, "solomon,page-offset", &par->page_offset))
-		par->page_offset = 1;
+		par->page_offset = 0;
 
 	if (device_property_read_u32(dev, "solomon,col-offset", &par->col_offset))
 		par->col_offset = 0;
-- 
2.41.0


  reply	other threads:[~2023-11-16 18:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 18:07 [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" default value Javier Martinez Canillas
2023-11-16 18:07 ` [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon, page-offset" " Javier Martinez Canillas
2023-11-16 18:07 ` Javier Martinez Canillas [this message]
2023-11-16 18:07   ` [PATCH 2/3] fbdev: ssd1307fb: Change "solomon, page-offset" property " Javier Martinez Canillas
2023-11-17 21:15   ` [PATCH 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" " Andy Shevchenko
2023-11-17 21:15     ` Andy Shevchenko
2023-11-17 22:18     ` Javier Martinez Canillas
2023-11-17 22:18       ` Javier Martinez Canillas
2023-11-16 18:07 ` [PATCH 3/3] drm/ssd130x: " Javier Martinez Canillas
2023-11-16 18:07   ` [PATCH 3/3] drm/ssd130x: Change "solomon, page-offset" " Javier Martinez Canillas
2023-11-17  8:38   ` [PATCH 3/3] drm/ssd130x: Change "solomon,page-offset" " Maxime Ripard
2023-11-17  8:38     ` Maxime Ripard
2023-11-17  8:59     ` Javier Martinez Canillas
2023-11-17  8:59       ` Javier Martinez Canillas
2023-11-20 15:50 ` [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" " Conor Dooley
2023-11-20 15:50   ` Conor Dooley
2023-11-20 19:37   ` Javier Martinez Canillas
2023-11-20 19:37     ` Javier Martinez Canillas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231116180743.2763021-2-javierm@redhat.com \
    --to=javierm@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sahaj.sarup@linaro.org \
    --cc=sam@ravnborg.org \
    --cc=tzimmermann@suse.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.