summaryrefslogtreecommitdiff
path: root/include/media/cec.h
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-06-07 11:46:08 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-06-20 06:51:21 -0300
commit23111ec304166750479e17318b7175ff7db0d6ac (patch)
treeba0549ef87d364e73d3ca98c3d2df348a9b6f329 /include/media/cec.h
parentacec3630155763c170c7ae6508cf973355464508 (diff)
[media] cec: add cec_s_phys_addr_from_edid helper function
This function simplifies the integration of CEC in DRM drivers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media/cec.h')
-rw-r--r--include/media/cec.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/media/cec.h b/include/media/cec.h
index bfa88d4d67e1..a548b292eeb1 100644
--- a/include/media/cec.h
+++ b/include/media/cec.h
@@ -206,6 +206,8 @@ static inline bool cec_is_sink(const struct cec_adapter *adap)
#define cec_phys_addr_exp(pa) \
((pa) >> 12), ((pa) >> 8) & 0xf, ((pa) >> 4) & 0xf, (pa) & 0xf
+struct edid;
+
#if IS_ENABLED(CONFIG_CEC_CORE)
struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
void *priv, const char *name, u32 caps, u8 available_las);
@@ -217,6 +219,8 @@ int cec_s_log_addrs(struct cec_adapter *adap, struct cec_log_addrs *log_addrs,
bool block);
void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr,
bool block);
+void cec_s_phys_addr_from_edid(struct cec_adapter *adap,
+ const struct edid *edid);
int cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg,
bool block);
@@ -326,6 +330,11 @@ static inline void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr,
{
}
+static inline void cec_s_phys_addr_from_edid(struct cec_adapter *adap,
+ const struct edid *edid)
+{
+}
+
static inline u16 cec_get_edid_phys_addr(const u8 *edid, unsigned int size,
unsigned int *offset)
{