* [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" default value
@ 2023-11-16 18:07 Javier Martinez Canillas
2023-11-16 18:07 ` [PATCH 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property " Javier Martinez Canillas
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Javier Martinez Canillas @ 2023-11-16 18:07 UTC (permalink / raw)
To: linux-kernel
Cc: Sahaj Sarup, Javier Martinez Canillas, Conor Dooley,
Daniel Vetter, David Airlie, Krzysztof Kozlowski,
Maarten Lankhorst, Maxime Ripard, Rob Herring, Thomas Zimmermann,
devicetree, dri-devel
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>
---
.../devicetree/bindings/display/solomon,ssd1307fb.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
index 3afbb52d1b7f..badd81459aaa 100644
--- a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
+++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
@@ -35,7 +35,7 @@ properties:
solomon,page-offset:
$ref: /schemas/types.yaml#/definitions/uint32
- default: 1
+ default: 0
description:
Offset of pages (band of 8 pixels) that the screen is mapped to
--
2.41.0
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property default value
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 ` Javier Martinez Canillas
2023-11-17 21:15 ` Andy Shevchenko
2023-11-16 18:07 ` [PATCH 3/3] drm/ssd130x: " Javier Martinez Canillas
2023-11-20 15:50 ` [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" " Conor Dooley
2 siblings, 1 reply; 9+ 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 [flat|nested] 9+ 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 " Javier Martinez Canillas
@ 2023-11-17 21:15 ` Andy Shevchenko
2023-11-17 22:18 ` Javier Martinez Canillas
0 siblings, 1 reply; 9+ 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] 9+ 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; 9+ 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] 9+ messages in thread
* [PATCH 3/3] drm/ssd130x: Change "solomon,page-offset" property default value
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 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property " Javier Martinez Canillas
@ 2023-11-16 18:07 ` Javier Martinez Canillas
2023-11-17 8:38 ` Maxime Ripard
2023-11-20 15:50 ` [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" " Conor Dooley
2 siblings, 1 reply; 9+ messages in thread
From: Javier Martinez Canillas @ 2023-11-16 18:07 UTC (permalink / raw)
To: linux-kernel
Cc: Sahaj Sarup, Javier Martinez Canillas, Daniel Vetter,
David Airlie, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, dri-devel
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(-)
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;
--
2.41.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] drm/ssd130x: Change "solomon,page-offset" property default value
2023-11-16 18:07 ` [PATCH 3/3] drm/ssd130x: " Javier Martinez Canillas
@ 2023-11-17 8:38 ` Maxime Ripard
2023-11-17 8:59 ` Javier Martinez Canillas
0 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2023-11-17 8:38 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Sahaj Sarup, Daniel Vetter, David Airlie,
Maarten Lankhorst, Thomas Zimmermann, dri-devel
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] drm/ssd130x: Change "solomon,page-offset" property default value
2023-11-17 8:38 ` Maxime Ripard
@ 2023-11-17 8:59 ` Javier Martinez Canillas
0 siblings, 0 replies; 9+ messages in thread
From: Javier Martinez Canillas @ 2023-11-17 8:59 UTC (permalink / raw)
To: Maxime Ripard
Cc: linux-kernel, Sahaj Sarup, Daniel Vetter, David Airlie,
Maarten Lankhorst, Thomas Zimmermann, dri-devel
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
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" default value
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 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property " Javier Martinez Canillas
2023-11-16 18:07 ` [PATCH 3/3] drm/ssd130x: " Javier Martinez Canillas
@ 2023-11-20 15:50 ` Conor Dooley
2023-11-20 19:37 ` Javier Martinez Canillas
2 siblings, 1 reply; 9+ messages in thread
From: Conor Dooley @ 2023-11-20 15:50 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Sahaj Sarup, Conor Dooley, Daniel Vetter,
David Airlie, Krzysztof Kozlowski, Maarten Lankhorst,
Maxime Ripard, Rob Herring, Thomas Zimmermann, devicetree,
dri-devel
[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]
On Thu, Nov 16, 2023 at 07:07:37PM +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>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> .../devicetree/bindings/display/solomon,ssd1307fb.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
> index 3afbb52d1b7f..badd81459aaa 100644
> --- a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
> +++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
> @@ -35,7 +35,7 @@ properties:
>
> solomon,page-offset:
> $ref: /schemas/types.yaml#/definitions/uint32
> - default: 1
> + default: 0
I think I saw it pointed out by Maxime elsewhere that this breaks the
ABI. It would be nice if DT defaults matched the hardware's, but I don't
really think it is worth breaking the ABI here. Expanding the property
description to explain the impact of the particular values might help
with incorrect usage.
Thanks,
Conor.
> description:
> Offset of pages (band of 8 pixels) that the screen is mapped to
>
> --
> 2.41.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" default value
2023-11-20 15:50 ` [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" " Conor Dooley
@ 2023-11-20 19:37 ` Javier Martinez Canillas
0 siblings, 0 replies; 9+ messages in thread
From: Javier Martinez Canillas @ 2023-11-20 19:37 UTC (permalink / raw)
To: Conor Dooley
Cc: linux-kernel, Sahaj Sarup, Conor Dooley, Daniel Vetter,
David Airlie, Krzysztof Kozlowski, Maarten Lankhorst,
Maxime Ripard, Rob Herring, Thomas Zimmermann, devicetree,
dri-devel
Conor Dooley <conor@kernel.org> writes:
Hello Connor,
> On Thu, Nov 16, 2023 at 07:07:37PM +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>
>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
>> ---
>>
>> .../devicetree/bindings/display/solomon,ssd1307fb.yaml | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
>> index 3afbb52d1b7f..badd81459aaa 100644
>> --- a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
>> +++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
>> @@ -35,7 +35,7 @@ properties:
>>
>> solomon,page-offset:
>> $ref: /schemas/types.yaml#/definitions/uint32
>> - default: 1
>> + default: 0
>
> I think I saw it pointed out by Maxime elsewhere that this breaks the
> ABI. It would be nice if DT defaults matched the hardware's, but I don't
> really think it is worth breaking the ABI here. Expanding the property
Yes, Maxime also agrees with you as you mentioned. It's fair to say that
this may affect potential users even when I honestly think that's unlikely.
I'll just discard these patches and point out to people reporting the same
problem than Sahaj, that they need to add a "solomon,page-offset" property.
> description to explain the impact of the particular values might help
> with incorrect usage.
>
I'm unsure how much that would help to be honest but I might post a patch.
> Thanks,
> Conor.
>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-11-20 19:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 2/3] fbdev: ssd1307fb: Change "solomon,page-offset" property " Javier Martinez Canillas
2023-11-17 21:15 ` Andy Shevchenko
2023-11-17 22:18 ` Javier Martinez Canillas
2023-11-16 18:07 ` [PATCH 3/3] drm/ssd130x: " Javier Martinez Canillas
2023-11-17 8:38 ` Maxime Ripard
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 19:37 ` 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
all inboxes | Powered by JetHome®