From: Vasily Khoruzhick <anarsoul@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] dm: video: bridge: add operation to read EDID
Date: Sun, 17 Sep 2017 20:21:41 -0700 [thread overview]
Message-ID: <20170918032145.25349-1-anarsoul@gmail.com> (raw)
Bridge may have ability to read EDID from panel that is connected to it,
so add an operation to read EDID.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
drivers/video/bridge/video-bridge-uclass.c | 10 ++++++++++
include/video_bridge.h | 20 ++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c
index 07270bac9e..79facd02a6 100644
--- a/drivers/video/bridge/video-bridge-uclass.c
+++ b/drivers/video/bridge/video-bridge-uclass.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <edid.h>
#include <video_bridge.h>
int video_bridge_set_backlight(struct udevice *dev, int percent)
@@ -45,6 +46,15 @@ int video_bridge_check_attached(struct udevice *dev)
return ops->check_attached(dev);
}
+int video_bridge_read_edid(struct udevice *dev, u8 *buf, int buf_size)
+{
+ struct video_bridge_ops *ops = video_bridge_get_ops(dev);
+
+ if (!ops || !ops->read_edid)
+ return -ENOSYS;
+ return ops->read_edid(dev, buf, buf_size);
+}
+
static int video_bridge_pre_probe(struct udevice *dev)
{
struct video_bridge_priv *uc_priv = dev_get_uclass_priv(dev);
diff --git a/include/video_bridge.h b/include/video_bridge.h
index c7b8681849..0699a8dda8 100644
--- a/include/video_bridge.h
+++ b/include/video_bridge.h
@@ -53,6 +53,16 @@ struct video_bridge_ops {
* @return 0 if OK, -ve on error
*/
int (*set_backlight)(struct udevice *dev, int percent);
+
+ /**
+ * read_edid() - Read information from EDID
+ *
+ * @dev: Device to read from
+ * @buf: Buffer to read into
+ * @buf_size: Buffer size
+ * @return number of bytes read, <=0 for error
+ */
+ int (*read_edid)(struct udevice *dev, u8 *buf, int buf_size);
};
#define video_bridge_get_ops(dev) \
@@ -89,4 +99,14 @@ int video_bridge_set_active(struct udevice *dev, bool active);
*/
int video_bridge_check_attached(struct udevice *dev);
+/**
+ * video_bridge_read_edid() - Read information from EDID
+ *
+ * @dev: Device to read from
+ * @buf: Buffer to read into
+ * @buf_size: Buffer size
+ * @return number of bytes read, <=0 for error
+ */
+int video_bridge_read_edid(struct udevice *dev, u8 *buf, int buf_size);
+
#endif
--
2.14.1
next reply other threads:[~2017-09-18 3:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 3:21 Vasily Khoruzhick [this message]
2017-09-18 3:21 ` [U-Boot] [PATCH 2/5] video: anx9804: split out registers definitions into a separate header Vasily Khoruzhick
2017-09-18 3:21 ` [U-Boot] [PATCH 3/5] video: add anx6345 DM driver Vasily Khoruzhick
2017-09-18 3:21 ` [U-Boot] [PATCH 4/5] sunxi: video: split out PLL code Vasily Khoruzhick
2017-09-18 3:21 ` [U-Boot] [PATCH 5/5] sunxi: video: add LCD support to DE2 driver Vasily Khoruzhick
2017-09-19 4:59 ` [U-Boot] [PATCH 1/5] dm: video: bridge: add operation to read EDID Vasily Khoruzhick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170918032145.25349-1-anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox