mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
drm: atmel-hlcdc: use double rate for pixel clock only if supported
commit 07acf4bafe81dd37eff3fbcfbbdbc48084bc202b upstream.
Doubled system clock should be used as pixel cock source only if this
is supported. This is emphasized by the value of
atmel_hlcdc_crtc::dc::desc::fixed_clksrc.
Fixes: a6eca2abdd ("drm: atmel-hlcdc: add config option for clock selection")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Boris Brezillon <bbrezillon@kernel.org>
Cc: <stable@vger.kernel.org> # v5.3+
Link: https://patchwork.freedesktop.org/patch/msgid/1576672109-22707-2-git-send-email-claudiu.beznea@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ae35ac3c4b
commit
6421785d17
1 changed files with 3 additions and 3 deletions
|
|
@ -95,14 +95,14 @@ static void atmel_hlcdc_crtc_mode_set_nofb(struct drm_crtc *c)
|
|||
(adj->crtc_hdisplay - 1) |
|
||||
((adj->crtc_vdisplay - 1) << 16));
|
||||
|
||||
prate = clk_get_rate(crtc->dc->hlcdc->sys_clk);
|
||||
mode_rate = adj->crtc_clock * 1000;
|
||||
if (!crtc->dc->desc->fixed_clksrc) {
|
||||
prate *= 2;
|
||||
cfg |= ATMEL_HLCDC_CLKSEL;
|
||||
mask |= ATMEL_HLCDC_CLKSEL;
|
||||
}
|
||||
|
||||
prate = 2 * clk_get_rate(crtc->dc->hlcdc->sys_clk);
|
||||
mode_rate = adj->crtc_clock * 1000;
|
||||
|
||||
div = DIV_ROUND_UP(prate, mode_rate);
|
||||
if (div < 2) {
|
||||
div = 2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue