devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" default value
@ 2023-11-16 18:07 Javier Martinez Canillas
  2023-11-20 15:50 ` Conor Dooley
  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, 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 related	[flat|nested] 3+ 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-20 15:50 ` Conor Dooley
  2023-11-20 19:37   ` Javier Martinez Canillas
  0 siblings, 1 reply; 3+ 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] 3+ messages in thread

* Re: [PATCH 1/3] dt-bindings: display: ssd1307fb: Change "solomon,page-offset" default value
  2023-11-20 15:50 ` Conor Dooley
@ 2023-11-20 19:37   ` Javier Martinez Canillas
  0 siblings, 0 replies; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2023-11-20 19:37 UTC | newest]

Thread overview: 3+ 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-20 15:50 ` 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;
as well as URLs for NNTP newsgroup(s).