]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
drm/bridge: adv7511: Fix low refresh rate selection
authorMatt Redfearn <matt.redfearn@thinci.com>
Wed, 24 Apr 2019 13:22:27 +0000 (13:22 +0000)
committerSean Paul <seanpaul@chromium.org>
Mon, 13 May 2019 19:02:18 +0000 (15:02 -0400)
commit67793bd3b3948dc8c8384b6430e036a30a0ecb43
tree7968b6323f02db888194dc729e48bd108b5d66e2
parent197b23e9aeea04fce29b6753233fd07050bf6911
drm/bridge: adv7511: Fix low refresh rate selection

The driver currently sets register 0xfb (Low Refresh Rate) based on the
value of mode->vrefresh. Firstly, this field is specified to be in Hz,
but the magic numbers used by the code are Hz * 1000. This essentially
leads to the low refresh rate always being set to 0x01, since the
vrefresh value will always be less than 24000. Fix the magic numbers to
be in Hz.
Secondly, according to the comment in drm_modes.h, the field is not
supposed to be used in a functional way anyway. Instead, use the helper
function drm_mode_vrefresh().

Fixes: 9c8af882bf12 ("drm: Add adv7511 encoder driver")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Matt Redfearn <matt.redfearn@thinci.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190424132210.26338-1-matt.redfearn@thinci.com
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c