memset(&pkt_info, 0, sizeof(pkt_info));
srcbuff = &pkt_info;
size = sizeof(struct pd_infoframe_s);
- rx_get_pd_fifo_param(param, &pkt_info, size);
+ rx_get_pd_fifo_param(param, &pkt_info);
/*return pkt info*/
if ((size > 0) && (srcbuff != NULL) && (argp != NULL)) {
else
break;
- strcpy(buf + 5, fmt + pos);
+ strncpy(buf + 5, fmt + pos, (sizeof(buf) - 5));
} else
strcpy(buf, fmt);
/* if (fmt[strlen(fmt) - 1] == '\n') */
}
}
-static int hdmirx_switch_pinmux(struct device dev)
+static int hdmirx_switch_pinmux(struct device *dev)
{
struct pinctrl *pin;
const char *pin_name;
int ret = 0;
/* pinmux set */
- if (dev.of_node) {
- ret = of_property_read_string_index(dev.of_node,
+ if (dev->of_node) {
+ ret = of_property_read_string_index(dev->of_node,
"pinctrl-names",
0, &pin_name);
if (!ret)
- pin = devm_pinctrl_get_select(&dev, pin_name);
+ pin = devm_pinctrl_get_select(dev, pin_name);
/* rx_pr("hdmirx: pinmux:%p, name:%s\n", */
/* pin, pin_name); */
}
log_init(DEF_LOG_BUF_SIZE);
pEdid_buffer = (unsigned char *) pdev->dev.platform_data;
hdmirx_dev = &pdev->dev;
+ /*get compatible matched device, to get chip related data*/
+ of_id = of_match_device(hdmirx_dt_match, &pdev->dev);
+ if (!of_id) {
+ rx_pr("unable to get matched device\n");
+ return -1;
+ }
/* allocate memory for the per-device structure */
hdevp = kmalloc(sizeof(struct hdmirx_dev_s), GFP_KERNEL);
if (!hdevp) {
goto fail_kmalloc_hdev;
}
memset(hdevp, 0, sizeof(struct hdmirx_dev_s));
- /*get compatible matched device, to get chip related data*/
- of_id = of_match_device(hdmirx_dt_match, &pdev->dev);
- if (!of_id)
- rx_pr("unable to get matched device\n");
hdevp->data = of_id->data;
if (hdevp->data)
rx.chip_id = hdevp->data->chip_id;
en_4k_timing = 1;
hdmirx_hw_probe();
- hdmirx_switch_pinmux(pdev->dev);
+ hdmirx_switch_pinmux(&(pdev->dev));
#ifdef CONFIG_HAS_EARLYSUSPEND
register_early_suspend(&hdmirx_early_suspend_handler);
#endif
enum eq_sts_e eq_sts = E_EQ_START;
/* variable define*/
int long_cable_best_setting = 6;
-int delay_ms_cnt = 10; /* 5 */
+int delay_ms_cnt = 5; /* 5 */
+MODULE_PARM_DESC(delay_ms_cnt, "\n delay_ms_cnt\n");
+module_param(delay_ms_cnt, int, 0664);
+
int eq_max_setting = 7;
int eq_dbg_ch0;
int eq_dbg_ch1;
uint8_t aquireEarlyCnt(uint16_t setting)
{
uint16_t lockVector = 0x0001;
- int timeout_cnt = 20;
+ int timeout_cnt = 10;
lockVector = lockVector << setting;
hdmi_rx_phy_ConfEqualSetting(lockVector);
void rx_get_pd_fifo_param(enum pkt_type_e pkt_type,
- struct pd_infoframe_s *pkt_info,
- unsigned int size)
+ struct pd_infoframe_s *pkt_info)
{
switch (pkt_type) {
case PKT_TYPE_INFOFRAME_VSI:
rx_pkt_get_amp_ex(&pkt_info);
break;
default:
- size = PFIFO_SIZE * sizeof(uint32_t);
if (pd_fifo_buf != NULL)
/* srcbuff = pd_fifo_buf; */
memcpy(&pkt_info, &pd_fifo_buf,
sizeof(struct pd_infoframe_s));
- else {
- size = 0;
+ else
pr_err("err:pd_fifo_buf is empty\n");
- }
break;
}
}
/*3d VSI*/
if (pkt->sbpkt.vsi_3Dext.vdfmt == VSI_FORMAT_3D_FORMAT) {
rx.vs_info_details._3d_structure =
- rx.vs_info_details._3d_structure;
+ pkt->sbpkt.vsi_3Dext.threeD_st;
rx.vs_info_details._3d_ext_data =
pkt->sbpkt.vsi_3Dext.threeD_ex;
if (log_level & VSI_LOG)