* [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups
@ 2023-06-05 7:47 Javier Martinez Canillas
2023-06-05 7:47 ` [PATCH 2/5] dt-bindings: display: ssd1307fb: Remove default width and height values Javier Martinez Canillas
2023-06-06 8:01 ` [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups Thomas Zimmermann
0 siblings, 2 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2023-06-05 7:47 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Zimmermann, Geert Uytterhoeven, Maxime Ripard,
Javier Martinez Canillas, Conor Dooley, Daniel Vetter,
David Airlie, Krzysztof Kozlowski, Rob Herring, devicetree,
dri-devel
Hello,
While working on adding support for the SSD132X family of 4-bit grayscale
Solomon OLED panel controllers, I noticed a few things in the driver that
can be improved and make extending to support other chip families easier.
I've split the preparatory patches in this series and will post the actual
SSD132X support as a separate patch-set once this one is merged.
Best regards,
Javier
Javier Martinez Canillas (5):
drm/ssd130x: Make default width and height to be controller dependent
dt-bindings: display: ssd1307fb: Remove default width and height
values
drm/ssd130x: Set the page height value in the device info data
drm/ssd130x: Don't allocate buffers on each plane update
drm/ssd130x: Remove hardcoded bits-per-pixel in ssd130x_buf_alloc()
.../bindings/display/solomon,ssd1307fb.yaml | 8 +-
drivers/gpu/drm/solomon/ssd130x.c | 124 ++++++++++++------
drivers/gpu/drm/solomon/ssd130x.h | 6 +
3 files changed, 93 insertions(+), 45 deletions(-)
--
2.40.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 2/5] dt-bindings: display: ssd1307fb: Remove default width and height values
2023-06-05 7:47 [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups Javier Martinez Canillas
@ 2023-06-05 7:47 ` Javier Martinez Canillas
2023-06-05 9:25 ` Maxime Ripard
2023-06-06 8:01 ` [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups Thomas Zimmermann
1 sibling, 1 reply; 6+ messages in thread
From: Javier Martinez Canillas @ 2023-06-05 7:47 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Zimmermann, Geert Uytterhoeven, Maxime Ripard,
Javier Martinez Canillas, Conor Dooley, Daniel Vetter,
David Airlie, Krzysztof Kozlowski, Rob Herring, devicetree,
dri-devel
A default resolution in the ssd130x driver isn't set to an arbitrary 96x16
anymore. Instead is set to a width and height that's controller dependent.
Update DT schema to reflect what the driver does and make its users aware.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
.../devicetree/bindings/display/solomon,ssd1307fb.yaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
index 94bb5ef567c6..e8ed642dc144 100644
--- a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
+++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
@@ -49,15 +49,15 @@ properties:
solomon,height:
$ref: /schemas/types.yaml#/definitions/uint32
- default: 16
description:
- Height in pixel of the screen driven by the controller
+ Height in pixel of the screen driven by the controller.
+ The default value is controller-dependent.
solomon,width:
$ref: /schemas/types.yaml#/definitions/uint32
- default: 96
description:
- Width in pixel of the screen driven by the controller
+ Width in pixel of the screen driven by the controller.
+ The default value is controller-dependent.
solomon,page-offset:
$ref: /schemas/types.yaml#/definitions/uint32
--
2.40.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/5] dt-bindings: display: ssd1307fb: Remove default width and height values
2023-06-05 7:47 ` [PATCH 2/5] dt-bindings: display: ssd1307fb: Remove default width and height values Javier Martinez Canillas
@ 2023-06-05 9:25 ` Maxime Ripard
2023-06-05 10:15 ` Javier Martinez Canillas
0 siblings, 1 reply; 6+ messages in thread
From: Maxime Ripard @ 2023-06-05 9:25 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Thomas Zimmermann, Geert Uytterhoeven, Conor Dooley,
Daniel Vetter, David Airlie, Krzysztof Kozlowski, Rob Herring,
devicetree, dri-devel
[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]
Hi,
On Mon, Jun 05, 2023 at 09:47:50AM +0200, Javier Martinez Canillas wrote:
> A default resolution in the ssd130x driver isn't set to an arbitrary 96x16
> anymore. Instead is set to a width and height that's controller dependent.
>
> Update DT schema to reflect what the driver does and make its users aware.
>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> .../devicetree/bindings/display/solomon,ssd1307fb.yaml | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
> index 94bb5ef567c6..e8ed642dc144 100644
> --- a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
> +++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
> @@ -49,15 +49,15 @@ properties:
>
> solomon,height:
> $ref: /schemas/types.yaml#/definitions/uint32
> - default: 16
> description:
> - Height in pixel of the screen driven by the controller
> + Height in pixel of the screen driven by the controller.
> + The default value is controller-dependent.
>
> solomon,width:
> $ref: /schemas/types.yaml#/definitions/uint32
> - default: 96
> description:
> - Width in pixel of the screen driven by the controller
> + Width in pixel of the screen driven by the controller.
> + The default value is controller-dependent.
I think we should document it still, either in the comment itself, or
through a conditional and different default values based on the
compatible.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/5] dt-bindings: display: ssd1307fb: Remove default width and height values
2023-06-05 9:25 ` Maxime Ripard
@ 2023-06-05 10:15 ` Javier Martinez Canillas
0 siblings, 0 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2023-06-05 10:15 UTC (permalink / raw)
To: Maxime Ripard
Cc: linux-kernel, Thomas Zimmermann, Geert Uytterhoeven, Conor Dooley,
Daniel Vetter, David Airlie, Krzysztof Kozlowski, Rob Herring,
devicetree, dri-devel
Maxime Ripard <mripard@kernel.org> writes:
Hello Maxime,
Thanks for your feedback.
> Hi,
>
> On Mon, Jun 05, 2023 at 09:47:50AM +0200, Javier Martinez Canillas wrote:
[...]
>> solomon,width:
>> $ref: /schemas/types.yaml#/definitions/uint32
>> - default: 96
>> description:
>> - Width in pixel of the screen driven by the controller
>> + Width in pixel of the screen driven by the controller.
>> + The default value is controller-dependent.
>
> I think we should document it still, either in the comment itself, or
> through a conditional and different default values based on the
> compatible.
>
Makes sense. I'll add that in v2.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups
2023-06-05 7:47 [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups Javier Martinez Canillas
2023-06-05 7:47 ` [PATCH 2/5] dt-bindings: display: ssd1307fb: Remove default width and height values Javier Martinez Canillas
@ 2023-06-06 8:01 ` Thomas Zimmermann
2023-06-07 7:17 ` Javier Martinez Canillas
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Zimmermann @ 2023-06-06 8:01 UTC (permalink / raw)
To: Javier Martinez Canillas, linux-kernel
Cc: Geert Uytterhoeven, Maxime Ripard, Conor Dooley, Daniel Vetter,
David Airlie, Krzysztof Kozlowski, Rob Herring, devicetree,
dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1760 bytes --]
Hi Javierm,
I've read through the patches and they look correct to me.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
But I had one question about the page size. You round up to multiples of
page_size in several places. That could lead to an out-of-bounds access.
Do you need to allocate GEM buffers to be multiples of page_size as well?
Best regards
Thomas
Am 05.06.23 um 09:47 schrieb Javier Martinez Canillas:
> Hello,
>
> While working on adding support for the SSD132X family of 4-bit grayscale
> Solomon OLED panel controllers, I noticed a few things in the driver that
> can be improved and make extending to support other chip families easier.
>
> I've split the preparatory patches in this series and will post the actual
> SSD132X support as a separate patch-set once this one is merged.
>
> Best regards,
> Javier
>
>
> Javier Martinez Canillas (5):
> drm/ssd130x: Make default width and height to be controller dependent
> dt-bindings: display: ssd1307fb: Remove default width and height
> values
> drm/ssd130x: Set the page height value in the device info data
> drm/ssd130x: Don't allocate buffers on each plane update
> drm/ssd130x: Remove hardcoded bits-per-pixel in ssd130x_buf_alloc()
>
> .../bindings/display/solomon,ssd1307fb.yaml | 8 +-
> drivers/gpu/drm/solomon/ssd130x.c | 124 ++++++++++++------
> drivers/gpu/drm/solomon/ssd130x.h | 6 +
> 3 files changed, 93 insertions(+), 45 deletions(-)
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups
2023-06-06 8:01 ` [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups Thomas Zimmermann
@ 2023-06-07 7:17 ` Javier Martinez Canillas
0 siblings, 0 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2023-06-07 7:17 UTC (permalink / raw)
To: Thomas Zimmermann, linux-kernel
Cc: Geert Uytterhoeven, Maxime Ripard, Conor Dooley, Daniel Vetter,
David Airlie, Krzysztof Kozlowski, Rob Herring, devicetree,
dri-devel
Thomas Zimmermann <tzimmermann@suse.de> writes:
Hello Thomas,
> Hi Javierm,
>
> I've read through the patches and they look correct to me.
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
Thanks a lot for your review!
> But I had one question about the page size. You round up to multiples of
> page_size in several places. That could lead to an out-of-bounds access.
> Do you need to allocate GEM buffers to be multiples of page_size as well?
>
That's a good point and I would need to have a closer look to the driver
to determine if that's needed or not as well. If that's the case though,
the issue is already present in the driver. We could fix it as follow-up.
> Best regards
> Thomas
>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-07 7:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-05 7:47 [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups Javier Martinez Canillas
2023-06-05 7:47 ` [PATCH 2/5] dt-bindings: display: ssd1307fb: Remove default width and height values Javier Martinez Canillas
2023-06-05 9:25 ` Maxime Ripard
2023-06-05 10:15 ` Javier Martinez Canillas
2023-06-06 8:01 ` [PATCH 0/5] drm/ssd130x: A few enhancements and cleanups Thomas Zimmermann
2023-06-07 7:17 ` 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).