Skip to content

Odroidc2 3.14.y #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
5 changes: 5 additions & 0 deletions drivers/amlogic/cec/hdmi_ao_cec.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,9 @@ int cec_node_init(struct hdmitx_dev *hdmitx_device)
if ((cec_dev->hal_flag & (1 << HDMI_OPTION_SYSTEM_CEC_CONTROL)))
return -1;

if (!(hdmitx_device->cec_func_config & (1 << CEC_FUNC_MSAK)))
return -1;

CEC_INFO("cec_node_init started\n");

cec_phy_addr = ((a << 12) | (b << 8) | (c << 4) | (d << 0));
Expand Down Expand Up @@ -1449,6 +1452,8 @@ static struct class_attribute aocec_class_attr[] = {
/******************** cec hal interface ***************************/
static int hdmitx_cec_open(struct inode *inode, struct file *file)
{
wait_event_interruptible(cec_dev->tx_dev->hdmi_info.vsdb_phy_addr.waitq,
cec_dev->tx_dev->hdmi_info.vsdb_phy_addr.valid == 1);
cec_dev->cec_info.open_count++;
if (cec_dev->cec_info.open_count) {
cec_dev->cec_info.hal_ctl = 1;
Expand Down
3 changes: 3 additions & 0 deletions drivers/amlogic/hdmi/hdmi_tx_20/hdmi_tx_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ void set_vsdb_phy_addr(struct vsdb_phyaddr *vsdb,
vsdb->d = (edid_offset[5] >> 0) & 0xf;
vsdb_local = *vsdb;
vsdb->valid = 1;
#ifdef CONFIG_AML_AO_CEC
wake_up_interruptible(&vsdb->waitq);
#endif
}

int Edid_Parse_check_HDMI_VSDB(struct hdmitx_info *info,
Expand Down
5 changes: 5 additions & 0 deletions drivers/amlogic/hdmi/hdmi_tx_20/hdmi_tx_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,9 @@ void hdmitx_hpd_plugin_handler(struct work_struct *work)
set_disp_mode_auto();
hdmitx_set_audio(hdev, &(hdev->cur_audio_param), hdmi_ch);
switch_set_state(&sdev, 1);
#ifndef CONFIG_AML_AO_CEC
cec_node_init(hdev);
#endif
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGIN;
mutex_unlock(&setclk_mutex);
}
Expand Down Expand Up @@ -2188,6 +2190,9 @@ static int amhdmitx_probe(struct platform_device *pdev)
HDMITX_Meson_Init(&hdmitx_device);
hdmitx_device.task = kthread_run(hdmi_task_handle,
&hdmitx_device, "kthread_hdmi");
#ifdef CONFIG_AML_AO_CEC
init_waitqueue_head(&hdmitx_device.hdmi_info.vsdb_phy_addr.waitq);
#endif

if (r < 0) {
hdmi_print(INF, SYS "register switch dev failed\n");
Expand Down
4 changes: 4 additions & 0 deletions include/linux/amlogic/hdmi_tx/hdmi_info_global.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define _HDMI_INFO_GLOBAL_H

#include "hdmi_common.h"
#include <linux/wait.h>

/* old definitions move to hdmi_common.h */

Expand Down Expand Up @@ -269,6 +270,9 @@ struct vsdb_phyaddr {
unsigned char c:4;
unsigned char d:4;
unsigned char valid;
#ifdef CONFIG_AML_AO_CEC
wait_queue_head_t waitq;
#endif
};

struct hdmitx_clk {
Expand Down