WeTek_Core/WeTek_Play: fix new cec driver patch

This commit is contained in:
Gerald Dachs 2016-04-25 20:22:36 +02:00 committed by Lukas Rusak
parent 25866498db
commit 4eafb8d2d7
2 changed files with 24 additions and 8 deletions

View File

@ -55,10 +55,10 @@ index 7a944cd..f74ec1f 100755
#EXTRA_CFLAGS += -O2 #EXTRA_CFLAGS += -O2
diff --git a/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c diff --git a/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
new file mode 100644 new file mode 100644
index 0000000..a3556b3 index 0000000..1bfc29b
--- /dev/null --- /dev/null
+++ b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c +++ b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
@@ -0,0 +1,671 @@ @@ -0,0 +1,679 @@
+/* linux/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c +/* linux/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
+ * + *
+ * Copyright (c) 2016 Gerald Dachs + * Copyright (c) 2016 Gerald Dachs
@ -549,7 +549,6 @@ index 0000000..a3556b3
+ +
+ retval = entry->size; + retval = entry->size;
+ +
+ amlogic_cec_set_rx_state(STATE_RX);
+ +
+error_exit: +error_exit:
+ if (entry != NULL) + if (entry != NULL)
@ -558,6 +557,11 @@ index 0000000..a3556b3
+ kfree(entry); + kfree(entry);
+ } + }
+ +
+ if (list_empty(&cec_rx_struct.list))
+ {
+ amlogic_cec_set_rx_state(STATE_RX);
+ }
+
+ spin_unlock_irqrestore(&cec_rx_struct.lock, spin_flags); + spin_unlock_irqrestore(&cec_rx_struct.lock, spin_flags);
+ +
+ return retval; + return retval;
@ -651,7 +655,11 @@ index 0000000..a3556b3
+ +
+static u32 amlogic_cec_poll(struct file *file, poll_table *wait) +static u32 amlogic_cec_poll(struct file *file, poll_table *wait)
+{ +{
+ poll_wait(file, &cec_rx_struct.waitq, wait); +
+ if (atomic_read(&cec_rx_struct.state) != STATE_DONE)
+ {
+ poll_wait(file, &cec_rx_struct.waitq, wait);
+ }
+ +
+ if (atomic_read(&cec_rx_struct.state) == STATE_DONE) + if (atomic_read(&cec_rx_struct.state) == STATE_DONE)
+ { + {

View File

@ -55,10 +55,10 @@ index 7a944cd..f74ec1f 100755
#EXTRA_CFLAGS += -O2 #EXTRA_CFLAGS += -O2
diff --git a/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c diff --git a/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
new file mode 100644 new file mode 100644
index 0000000..a3556b3 index 0000000..1bfc29b
--- /dev/null --- /dev/null
+++ b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c +++ b/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
@@ -0,0 +1,671 @@ @@ -0,0 +1,679 @@
+/* linux/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c +/* linux/drivers/amlogic/hdmi/hdmi_tx/amlogic_cec.c
+ * + *
+ * Copyright (c) 2016 Gerald Dachs + * Copyright (c) 2016 Gerald Dachs
@ -549,7 +549,6 @@ index 0000000..a3556b3
+ +
+ retval = entry->size; + retval = entry->size;
+ +
+ amlogic_cec_set_rx_state(STATE_RX);
+ +
+error_exit: +error_exit:
+ if (entry != NULL) + if (entry != NULL)
@ -558,6 +557,11 @@ index 0000000..a3556b3
+ kfree(entry); + kfree(entry);
+ } + }
+ +
+ if (list_empty(&cec_rx_struct.list))
+ {
+ amlogic_cec_set_rx_state(STATE_RX);
+ }
+
+ spin_unlock_irqrestore(&cec_rx_struct.lock, spin_flags); + spin_unlock_irqrestore(&cec_rx_struct.lock, spin_flags);
+ +
+ return retval; + return retval;
@ -651,7 +655,11 @@ index 0000000..a3556b3
+ +
+static u32 amlogic_cec_poll(struct file *file, poll_table *wait) +static u32 amlogic_cec_poll(struct file *file, poll_table *wait)
+{ +{
+ poll_wait(file, &cec_rx_struct.waitq, wait); +
+ if (atomic_read(&cec_rx_struct.state) != STATE_DONE)
+ {
+ poll_wait(file, &cec_rx_struct.waitq, wait);
+ }
+ +
+ if (atomic_read(&cec_rx_struct.state) == STATE_DONE) + if (atomic_read(&cec_rx_struct.state) == STATE_DONE)
+ { + {