mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
hdmitx: clean up deadcode
PD#168723: hdmitx: clean up deadcode Change-Id: I9e9267d748ee002f76e70c0634d43cfaba333988 Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
This commit is contained in:
@@ -404,8 +404,7 @@ static int set_disp_mode_auto(void)
|
||||
if ((info == NULL) || (info->name == NULL))
|
||||
return -1;
|
||||
|
||||
pr_info(SYS "get current mode: %s\n",
|
||||
info ? info->name : "null");
|
||||
pr_info(SYS "get current mode: %s\n", info->name);
|
||||
|
||||
if (!((strncmp(info->name, "480cvbs", 7) == 0) ||
|
||||
(strncmp(info->name, "576cvbs", 7) == 0) ||
|
||||
@@ -440,7 +439,7 @@ static int set_disp_mode_auto(void)
|
||||
hdev->para = hdmi_get_fmt_name("invalid", hdev->fmt_attr);
|
||||
return -1;
|
||||
}
|
||||
memcpy(mode, info->name, strlen(info->name));
|
||||
memcpy(mode, info->name, sizeof(mode));
|
||||
if (strstr(mode, "fp")) {
|
||||
int i = 0;
|
||||
|
||||
@@ -1325,10 +1324,8 @@ static void hdmitx_set_vsif_pkt(enum eotf_type type,
|
||||
VEN_DB1[4] = 0x2;
|
||||
else if (vic == HDMI_3840x2160p24_16x9)
|
||||
VEN_DB1[4] = 0x3;
|
||||
else if (vic == HDMI_4096x2160p24_256x135)
|
||||
else/*vic == HDMI_4096x2160p24_256x135*/
|
||||
VEN_DB1[4] = 0x4;
|
||||
else
|
||||
VEN_DB1[4] = 0x0;
|
||||
}
|
||||
if (type == EOTF_T_DOLBYVISION) {
|
||||
hdev->HWOp.SetPacket(HDMI_PACKET_VEND, VEN_DB1, VEN_HB);
|
||||
@@ -1772,7 +1769,7 @@ static ssize_t show_disp_cap(struct device *dev,
|
||||
} else {
|
||||
for (i = 0; disp_mode_t[i]; i++) {
|
||||
memset(mode_tmp, 0, sizeof(mode_tmp));
|
||||
strncpy(mode_tmp, disp_mode_t[i], sizeof(mode_tmp));
|
||||
strncpy(mode_tmp, disp_mode_t[i], 31);
|
||||
vic = hdmitx_edid_get_VIC(&hdmitx_device, mode_tmp, 0);
|
||||
/* Handling only 4k420 mode */
|
||||
if (vic == HDMI_Unknown) {
|
||||
@@ -2655,11 +2652,9 @@ static ssize_t show_hdcp_ver(struct device *dev,
|
||||
}
|
||||
next: /* Detect RX support HDCP14 */
|
||||
/* Here, must assume RX support HDCP14, otherwise affect 1A-03 */
|
||||
if (ver == 0U) {
|
||||
pos += snprintf(buf+pos, PAGE_SIZE, "14\n\r");
|
||||
return pos;
|
||||
}
|
||||
pos += snprintf(buf+pos, PAGE_SIZE, "14\n\r");
|
||||
return pos;
|
||||
|
||||
}
|
||||
|
||||
static ssize_t show_hpd_state(struct device *dev,
|
||||
@@ -3626,7 +3621,7 @@ static int amhdmitx_get_dt_info(struct platform_device *pdev)
|
||||
hdmitx_device.config_data.vend_data = kzalloc(
|
||||
sizeof(struct vendor_info_data), GFP_KERNEL);
|
||||
if (!hdmitx_device.config_data.vend_data)
|
||||
ret = -ENOMEM;
|
||||
pr_info(SYS "not allocate memory\n");
|
||||
ret = get_dt_vend_init_data(init_data,
|
||||
hdmitx_device.config_data.vend_data);
|
||||
if (ret)
|
||||
|
||||
@@ -437,9 +437,6 @@ static void hdmi_hwp_init(struct hdmitx_dev *hdev)
|
||||
hdev->ready = 1;
|
||||
/* Get uboot output color space from AVI */
|
||||
switch (hdmitx_rd_reg(HDMITX_DWC_FC_AVICONF0) & 0x3) {
|
||||
case 0:
|
||||
hdev->para->cs = COLORSPACE_RGB444;
|
||||
break;
|
||||
case 1:
|
||||
hdev->para->cs = COLORSPACE_YUV422;
|
||||
break;
|
||||
@@ -450,6 +447,7 @@ static void hdmi_hwp_init(struct hdmitx_dev *hdev)
|
||||
hdev->para->cs = COLORSPACE_YUV420;
|
||||
break;
|
||||
default:
|
||||
hdev->para->cs = COLORSPACE_RGB444;
|
||||
break;
|
||||
}
|
||||
/* If color space is not 422, then get depth from VP_PR_CD */
|
||||
@@ -3616,12 +3614,14 @@ static int hdmitx_cntl_config(struct hdmitx_dev *hdev, unsigned int cmd,
|
||||
break;
|
||||
case CONF_EMP_NUMBER:
|
||||
hdmitx_set_reg_bits(HDMITX_TOP_EMP_CNTL0, argv, 16, 16);
|
||||
break;
|
||||
case CONF_EMP_PHY_ADDR:
|
||||
hdmitx_rd_check_reg(HDMITX_TOP_EMP_STAT0, 0, 0x3fffffff);
|
||||
hdmitx_wr_reg(HDMITX_TOP_EMP_MEMADDR_START, argv);/*phys_ptr*/
|
||||
hdmitx_set_reg_bits(HDMITX_TOP_EMP_CNTL1, 1, 17, 1); /*little*/
|
||||
hdmitx_set_reg_bits(HDMITX_TOP_EMP_CNTL1, 120, 0, 16);
|
||||
hdmitx_set_reg_bits(HDMITX_TOP_EMP_CNTL0, 1, 0, 1);/*emp_tx_en*/
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1002,7 +1002,7 @@ static void hdmitx_check_frac_rate(struct hdmitx_dev *hdev)
|
||||
if (para && (para->name) && likely_frac_rate_mode(para->name))
|
||||
;
|
||||
else {
|
||||
pr_info("%s doesn't have frac_rate\n", para->name);
|
||||
pr_info("this mode doesn't have frac_rate\n");
|
||||
frac_rate = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user