* [PATCH] drm: simpledrm: fix wrong unit with pixel clock
@ 2021-12-12 16:06 Alejandro Concepcion-Rodriguez
2021-12-13 10:30 ` Thomas Zimmermann
0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Concepcion-Rodriguez @ 2021-12-12 16:06 UTC (permalink / raw)
To: tzimmermann, airlied, daniel, maxime, dri-devel
Cc: linux-kernel, asconcepcion
Pixel clock has to be set in kHz.
Fixes: 11e8f5fd223b ("drm: Add simpledrm driver")
Signed-off-by: Alejandro Concepcion-Rodriguez <asconcepcion@acoro.eu>
---
drivers/gpu/drm/tiny/simpledrm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
index 2f999915b9aa..562bf09f9140 100644
--- a/drivers/gpu/drm/tiny/simpledrm.c
+++ b/drivers/gpu/drm/tiny/simpledrm.c
@@ -459,7 +459,7 @@ static struct drm_display_mode simpledrm_mode(unsigned int width,
{
struct drm_display_mode mode = { SIMPLEDRM_MODE(width, height) };
- mode.clock = 60 /* Hz */ * mode.hdisplay * mode.vdisplay;
+ mode.clock = mode.hdisplay * mode.vdisplay * 60 / 1000 /* kHz */;
drm_mode_set_name(&mode);
return mode;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: simpledrm: fix wrong unit with pixel clock
2021-12-12 16:06 [PATCH] drm: simpledrm: fix wrong unit with pixel clock Alejandro Concepcion-Rodriguez
@ 2021-12-13 10:30 ` Thomas Zimmermann
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Zimmermann @ 2021-12-13 10:30 UTC (permalink / raw)
To: Alejandro Concepcion-Rodriguez, airlied, daniel, maxime, dri-devel
Cc: linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1191 bytes --]
Hi
Am 12.12.21 um 17:06 schrieb Alejandro Concepcion-Rodriguez:
> Pixel clock has to be set in kHz.
>
> Fixes: 11e8f5fd223b ("drm: Add simpledrm driver")
>
> Signed-off-by: Alejandro Concepcion-Rodriguez <asconcepcion@acoro.eu>
Applied to drm-misc-fixes. Thanks.
Best regards
Thomas
> ---
> drivers/gpu/drm/tiny/simpledrm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
> index 2f999915b9aa..562bf09f9140 100644
> --- a/drivers/gpu/drm/tiny/simpledrm.c
> +++ b/drivers/gpu/drm/tiny/simpledrm.c
> @@ -459,7 +459,7 @@ static struct drm_display_mode simpledrm_mode(unsigned int width,
> {
> struct drm_display_mode mode = { SIMPLEDRM_MODE(width, height) };
>
> - mode.clock = 60 /* Hz */ * mode.hdisplay * mode.vdisplay;
> + mode.clock = mode.hdisplay * mode.vdisplay * 60 / 1000 /* kHz */;
> drm_mode_set_name(&mode);
>
> return mode;
> --
> 2.25.1
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] drm: simpledrm: fix wrong unit with pixel clock
@ 2021-12-12 12:05 Alejandro Concepcion-Rodriguez
0 siblings, 0 replies; 3+ messages in thread
From: Alejandro Concepcion-Rodriguez @ 2021-12-12 12:05 UTC (permalink / raw)
To: tzimmermann, airlied, daniel, maxime; +Cc: dri-devel, linux-kernel
Pixel clock has to be set in kHz.
Fixes: 11e8f5fd223b ("drm: Add simpledrm driver")
Signed-off-by: Alejandro Concepcion-Rodriguez <asconcepcion@acoro.eu>
---
drivers/gpu/drm/tiny/simpledrm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
index 2f999915b9aa..562bf09f9140 100644
--- a/drivers/gpu/drm/tiny/simpledrm.c
+++ b/drivers/gpu/drm/tiny/simpledrm.c
@@ -459,7 +459,7 @@ static struct drm_display_mode simpledrm_mode(unsigned int width,
{
struct drm_display_mode mode = { SIMPLEDRM_MODE(width, height) };
- mode.clock = 60 /* Hz */ * mode.hdisplay * mode.vdisplay;
+ mode.clock = mode.hdisplay * mode.vdisplay * 60 / 1000 /* kHz */;
drm_mode_set_name(&mode);
return mode;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-13 10:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-12 16:06 [PATCH] drm: simpledrm: fix wrong unit with pixel clock Alejandro Concepcion-Rodriguez
2021-12-13 10:30 ` Thomas Zimmermann
-- strict thread matches above, loose matches on Subject: below --
2021-12-12 12:05 Alejandro Concepcion-Rodriguez
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).