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 <yi.zhou@amlogic.com>
This commit is contained in:
Yi Zhou
2018-05-03 15:22:27 +08:00
committed by Yixun Lan
parent c36c75aacb
commit 065822467b

View File

@@ -27,6 +27,9 @@
#include <linux/amlogic/media/vpu/vpu.h>
#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);