Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property default value
       [not found] <20231116180743.2763021-1-javierm@redhat.com>
@ 2023-11-16 18:07 ` Javier Martinez Canillas
  2023-11-17 21:15   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Javier Martinez Canillas @ 2023-11-16 18:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Sahaj Sarup, Javier Martinez Canillas, Andy Shevchenko,
	Geert Uytterhoeven, Helge Deller, Sam Ravnborg, Thomas Zimmermann,
	Uwe Kleine-König, dri-devel, linux-fbdev

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property default value
  2023-11-16 18:07 ` [PATCH 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property default value Javier Martinez Canillas
@ 2023-11-17 21:15   ` Andy Shevchenko
  2023-11-17 22:18     ` Javier Martinez Canillas
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2023-11-17 21:15 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Sahaj Sarup, Geert Uytterhoeven, Helge Deller,
	Sam Ravnborg, Thomas Zimmermann, Uwe Kleine-König, dri-devel,
	linux-fbdev

On Thu, Nov 16, 2023 at 07:07:38PM +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.
> 
> 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>

Closes?
Fixes?

> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property default value
  2023-11-17 21:15   ` Andy Shevchenko
@ 2023-11-17 22:18     ` Javier Martinez Canillas
  0 siblings, 0 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2023-11-17 22:18 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-kernel, Sahaj Sarup, Geert Uytterhoeven, Helge Deller,
	Sam Ravnborg, Thomas Zimmermann, Uwe Kleine-König, dri-devel,
	linux-fbdev

Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

Hello Andy,

> On Thu, Nov 16, 2023 at 07:07:38PM +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.
>> 
>> 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>
>
> Closes?

There's no report in a mailing list or bug tracker to reference.

> Fixes?
>

Since the default has been the same since the driver was merged,
it doesn't make that much sense for me to reference that commit.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-17 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20231116180743.2763021-1-javierm@redhat.com>
2023-11-16 18:07 ` [PATCH 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property default value Javier Martinez Canillas
2023-11-17 21:15   ` Andy Shevchenko
2023-11-17 22:18     ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox