From 065822467baec8622015a63d28a2cac6156e188e Mon Sep 17 00:00:00 2001 From: Yi Zhou Date: Thu, 3 May 2018 15:22:27 +0800 Subject: [PATCH] hdmitx: fix frac_rate flag changed when setting mode PD#165548: hdmitx: fix frac_rate flag changed when setting mode Change-Id: Ie6d96ec6c7f58d17f02e241aa0aa122c7db1c0a2 Signed-off-by: Yi Zhou --- drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_clk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_clk.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_clk.c index e27ecb51ebac..445ce55e1b94 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_clk.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hw_clk.c @@ -27,6 +27,9 @@ #include #endif +/* local frac_rate flag */ +static uint32_t frac_rate; + /* * HDMITX Clock configuration */ @@ -419,11 +422,8 @@ static void set_gxtvbb_hpll_clk_out(unsigned int frac_rate, unsigned int clk) static void set_hpll_clk_out(unsigned int clk) { - uint32_t frac_rate; struct hdmitx_dev *hdev = get_hdmitx_device(); - frac_rate = hdev->frac_rate_policy; - pr_info("config HPLL = %d frac_rate = %d\n", clk, frac_rate); switch (hdev->chip_type) { @@ -997,12 +997,13 @@ static void hdmitx_check_frac_rate(struct hdmitx_dev *hdev) enum hdmi_vic vic = hdev->cur_VIC; struct hdmi_format_para *para = NULL; + frac_rate = hdev->frac_rate_policy; para = hdmi_get_fmt_paras(vic); if (para && (para->name) && likely_frac_rate_mode(para->name)) ; else { pr_info("%s doesn't have frac_rate\n", para->name); - hdev->frac_rate_policy = 0; + frac_rate = 0; } pr_info("frac_rate = %d\n", hdev->frac_rate_policy);