Skip to content

Commit

Permalink
drm: simpledrm: fix wrong unit with pixel clock
Browse files Browse the repository at this point in the history
Pixel clock has to be set in kHz.

Signed-off-by: Alejandro Concepcion-Rodriguez <asconcepcion@acoro.eu>
Fixes: 11e8f5f ("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
  • Loading branch information
Alejandro Concepcion-Rodriguez authored and Thomas Zimmermann committed Dec 13, 2021
1 parent 842470c commit 5cf0606
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/tiny/simpledrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5cf0606

Please sign in to comment.