]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jun 2019 09:54:52 +0000 (11:54 +0200)
commitaf692bc1af39423ac3b8d7a83837e701bb33b8df
tree8c20c5e02c5a136cbaa2ba0fc5aee2c3c7e50870
parent8340e783e7859ccda4d3af551e92b335f3d4c127
drm/bridge: adv7511: Fix low refresh rate selection

[ Upstream commit 67793bd3b3948dc8c8384b6430e036a30a0ecb43 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c