* [PATCH] drm/ssd130x: fix ssd132x_clear_screen() columns
@ 2025-06-11 11:13 John Keeping
2025-06-11 12:47 ` Javier Martinez Canillas
2025-06-12 12:06 ` Javier Martinez Canillas
0 siblings, 2 replies; 5+ messages in thread
From: John Keeping @ 2025-06-11 11:13 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: John Keeping, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, dri-devel,
linux-kernel
The number of columns relates to the width, not the height. Use the
correct variable.
Signed-off-by: John Keeping <jkeeping@inmusicbrands.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 dd2006d51c7a2..eec43d1a55951 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -974,7 +974,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
static void ssd132x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
{
- unsigned int columns = DIV_ROUND_UP(ssd130x->height, SSD132X_SEGMENT_WIDTH);
+ unsigned int columns = DIV_ROUND_UP(ssd130x->width, SSD132X_SEGMENT_WIDTH);
unsigned int height = ssd130x->height;
memset(data_array, 0, columns * height);
--
2.49.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/ssd130x: fix ssd132x_clear_screen() columns
2025-06-11 11:13 [PATCH] drm/ssd130x: fix ssd132x_clear_screen() columns John Keeping
@ 2025-06-11 12:47 ` Javier Martinez Canillas
2025-06-11 15:38 ` Thomas Zimmermann
2025-06-12 12:06 ` Javier Martinez Canillas
1 sibling, 1 reply; 5+ messages in thread
From: Javier Martinez Canillas @ 2025-06-11 12:47 UTC (permalink / raw)
To: John Keeping
Cc: John Keeping, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, dri-devel,
linux-kernel
John Keeping <jkeeping@inmusicbrands.com> writes:
Hello John,
> The number of columns relates to the width, not the height. Use the
> correct variable.
>
> Signed-off-by: John Keeping <jkeeping@inmusicbrands.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 dd2006d51c7a2..eec43d1a55951 100644
> --- a/drivers/gpu/drm/solomon/ssd130x.c
> +++ b/drivers/gpu/drm/solomon/ssd130x.c
> @@ -974,7 +974,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
>
> static void ssd132x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
> {
> - unsigned int columns = DIV_ROUND_UP(ssd130x->height, SSD132X_SEGMENT_WIDTH);
> + unsigned int columns = DIV_ROUND_UP(ssd130x->width, SSD132X_SEGMENT_WIDTH);
> unsigned int height = ssd130x->height;
>
Ups, indeed. Thanks for fixing it!
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/ssd130x: fix ssd132x_clear_screen() columns
2025-06-11 12:47 ` Javier Martinez Canillas
@ 2025-06-11 15:38 ` Thomas Zimmermann
2025-06-12 11:49 ` Javier Martinez Canillas
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Zimmermann @ 2025-06-11 15:38 UTC (permalink / raw)
To: Javier Martinez Canillas, John Keeping
Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Simona Vetter,
dri-devel, linux-kernel
Hi
Am 11.06.25 um 14:47 schrieb Javier Martinez Canillas:
> John Keeping <jkeeping@inmusicbrands.com> writes:
>
> Hello John,
>
>> The number of columns relates to the width, not the height. Use the
>> correct variable.
>>
>> Signed-off-by: John Keeping <jkeeping@inmusicbrands.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 dd2006d51c7a2..eec43d1a55951 100644
>> --- a/drivers/gpu/drm/solomon/ssd130x.c
>> +++ b/drivers/gpu/drm/solomon/ssd130x.c
>> @@ -974,7 +974,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
>>
>> static void ssd132x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
>> {
>> - unsigned int columns = DIV_ROUND_UP(ssd130x->height, SSD132X_SEGMENT_WIDTH);
>> + unsigned int columns = DIV_ROUND_UP(ssd130x->width, SSD132X_SEGMENT_WIDTH);
>> unsigned int height = ssd130x->height;
>>
> Ups, indeed. Thanks for fixing it!
>
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Could you please add a Fixes tag before merging the patch? Thanks!
Best regards
Thomas
>
--
--
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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/ssd130x: fix ssd132x_clear_screen() columns
2025-06-11 15:38 ` Thomas Zimmermann
@ 2025-06-12 11:49 ` Javier Martinez Canillas
0 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2025-06-12 11:49 UTC (permalink / raw)
To: Thomas Zimmermann, John Keeping
Cc: Maarten Lankhorst, Maxime Ripard, David Airlie, Simona Vetter,
dri-devel, linux-kernel
Thomas Zimmermann <tzimmermann@suse.de> writes:
Hello Thomas,
> Hi
>
> Am 11.06.25 um 14:47 schrieb Javier Martinez Canillas:
>> John Keeping <jkeeping@inmusicbrands.com> writes:
>>
>> Hello John,
>>
>>> The number of columns relates to the width, not the height. Use the
>>> correct variable.
>>>
>>> Signed-off-by: John Keeping <jkeeping@inmusicbrands.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 dd2006d51c7a2..eec43d1a55951 100644
>>> --- a/drivers/gpu/drm/solomon/ssd130x.c
>>> +++ b/drivers/gpu/drm/solomon/ssd130x.c
>>> @@ -974,7 +974,7 @@ static void ssd130x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
>>>
>>> static void ssd132x_clear_screen(struct ssd130x_device *ssd130x, u8 *data_array)
>>> {
>>> - unsigned int columns = DIV_ROUND_UP(ssd130x->height, SSD132X_SEGMENT_WIDTH);
>>> + unsigned int columns = DIV_ROUND_UP(ssd130x->width, SSD132X_SEGMENT_WIDTH);
>>> unsigned int height = ssd130x->height;
>>>
>> Ups, indeed. Thanks for fixing it!
>>
>> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
>
> Could you please add a Fixes tag before merging the patch? Thanks!
>
Sure, I'll add the following tag:
Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family")
before merging the patch.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/ssd130x: fix ssd132x_clear_screen() columns
2025-06-11 11:13 [PATCH] drm/ssd130x: fix ssd132x_clear_screen() columns John Keeping
2025-06-11 12:47 ` Javier Martinez Canillas
@ 2025-06-12 12:06 ` Javier Martinez Canillas
1 sibling, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2025-06-12 12:06 UTC (permalink / raw)
To: John Keeping
Cc: John Keeping, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, dri-devel,
linux-kernel
John Keeping <jkeeping@inmusicbrands.com> writes:
Hello John,
> The number of columns relates to the width, not the height. Use the
> correct variable.
>
> Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
> ---
Pushed to drm-misc (drm-misc-fixes). Thanks!
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-12 12:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-11 11:13 [PATCH] drm/ssd130x: fix ssd132x_clear_screen() columns John Keeping
2025-06-11 12:47 ` Javier Martinez Canillas
2025-06-11 15:38 ` Thomas Zimmermann
2025-06-12 11:49 ` Javier Martinez Canillas
2025-06-12 12:06 ` 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®