drm: simpledrm: fix wrong unit with pixel clock

Pixel clock has to be set in kHz.

Signed-off-by: Alejandro Concepcion-Rodriguez <asconcepcion@acoro.eu>
Fixes: 11e8f5fd22 ("drm: Add simpledrm driver")
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/6f8554ef-1305-0dda-821c-f7d2e5644a48@acoro.eu
This commit is contained in:
Alejandro Concepcion-Rodriguez 2021-12-12 16:06:02 +00:00 committed by Thomas Zimmermann
parent 842470c4e2
commit 5cf06065bd
1 changed files with 1 additions and 1 deletions

View File

@ -458,7 +458,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;