mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
Merge pull request #230 from lrusak/cec-fix
WeTek_Core/WeTek_Play: fix new cec driver patch
This commit is contained in:
commit
fdeaceb16a
@ -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)
|
||||||
+{
|
+{
|
||||||
|
+
|
||||||
|
+ if (atomic_read(&cec_rx_struct.state) != STATE_DONE)
|
||||||
|
+ {
|
||||||
+ poll_wait(file, &cec_rx_struct.waitq, wait);
|
+ 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)
|
||||||
+ {
|
+ {
|
||||||
|
@ -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)
|
||||||
+{
|
+{
|
||||||
|
+
|
||||||
|
+ if (atomic_read(&cec_rx_struct.state) != STATE_DONE)
|
||||||
|
+ {
|
||||||
+ poll_wait(file, &cec_rx_struct.waitq, wait);
|
+ 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)
|
||||||
+ {
|
+ {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user