public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jacob Chen <jacob-chen@iotwrt.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/6] dm: video: Add a operation to display uclass
Date: Mon, 14 Mar 2016 11:20:14 +0800	[thread overview]
Message-ID: <1457925619-8170-2-git-send-email-jacob-chen@iotwrt.com> (raw)
In-Reply-To: <1457925619-8170-1-git-send-email-jacob-chen@iotwrt.com>

The current display class only allow to get timing from edid.
So add a operation to get timing directly from driver.
In driver, I will use fdtdec_decode_display_timing to get timing.

Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
Acked-by: Simon Glass <sjg@chromium.org>
---

Changes in v3:
- None

Changes in v2:
- None

 drivers/video/display-uclass.c |  3 +++
 include/display.h              | 11 ++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/video/display-uclass.c b/drivers/video/display-uclass.c
index 31522ea..e4763de 100644
--- a/drivers/video/display-uclass.c
+++ b/drivers/video/display-uclass.c
@@ -36,6 +36,9 @@ int display_read_timing(struct udevice *dev, struct display_timing *timing)
 	u8 buf[EDID_EXT_SIZE];
 	int ret;
 
+	if (ops && ops->read_timing)
+		return ops->read_timing(dev, timing);
+
 	if (!ops || !ops->read_edid)
 		return -ENOSYS;
 	ret = ops->read_edid(dev, buf, sizeof(buf));
diff --git a/include/display.h b/include/display.h
index c180e76..b1c4766 100644
--- a/include/display.h
+++ b/include/display.h
@@ -23,7 +23,7 @@ struct display_plat {
 };
 
 /**
- * display_read_timing() - Read timing information from EDID
+ * display_read_timing() - Read timing information
  *
  * @dev:	Device to read from
  * @return 0 if OK, -ve on error
@@ -43,6 +43,15 @@ int display_enable(struct udevice *dev, int panel_bpp,
 
 struct dm_display_ops {
 	/**
+	 * read_timing() - Read information directly
+	 *
+	 * @dev:	Device to read from
+	 * @timing:	Display timings
+	 * @return 0 if OK, -ve on error
+	 */
+	int (*read_timing)(struct udevice *dev, struct display_timing *timing);
+
+	/**
 	 * read_edid() - Read information from EDID
 	 *
 	 * @dev:	Device to read from
-- 
1.9.1

  reply	other threads:[~2016-03-14  3:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14  3:20 [U-Boot] [PATCH v3 0/6] Add LVDS support for rk3288 Jacob Chen
2016-03-14  3:20 ` Jacob Chen [this message]
2016-03-14  3:20 ` [U-Boot] [PATCH v3 2/6] rockchip: Add a binding file for rk3288 video Jacob Chen
2016-03-14  3:20 ` [U-Boot] [PATCH v3 3/6] rockchip: video: Add a display driver for rockchip LVDS Jacob Chen
2016-03-14  3:23   ` Simon Glass
2016-03-14  3:20 ` [U-Boot] [PATCH v3 4/6] rockchip: dts: Add LVDS support Jacob Chen
2016-03-14  3:20 ` [U-Boot] [PATCH v3 5/6] rockchip: video: Add LVDS support in vop driver Jacob Chen
2016-03-14  3:20 ` [U-Boot] [PATCH v3 6/6] doc: dt-bindings: Describe rockchip LVDS interface Jacob Chen
2016-03-14 21:33 ` [U-Boot] [PATCH v3 0/6] Add LVDS support for rk3288 Anatolij Gustschin

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=1457925619-8170-2-git-send-email-jacob-chen@iotwrt.com \
    --to=jacob-chen@iotwrt.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