summaryrefslogtreecommitdiff
path: root/drivers/video/tegra124/display.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-01-22 02:45:00 (GMT)
committerSimon Glass <sjg@chromium.org>2016-01-22 03:42:36 (GMT)
commit2dcf143398ad89ac960e02c7149521ae420db43b (patch)
tree7ab1e2601c2d3322fc2ba19700ba0a0d5c32e6fd /drivers/video/tegra124/display.c
parentcd9c2070ea0712bd69e18236e8b52232fd27b02e (diff)
downloadu-boot-2dcf143398ad89ac960e02c7149521ae420db43b.tar.xz
dm: video: Repurpose the 'displayport' uclass to 'display'
The current DisplayPort uclass is too specific. The operations it provides are shared with other types of output devices, such as HDMI and LVDS LCD displays. Generalise the uclass so that it can be used with these devices as well. Adjust the uclass to handle the EDID reading and conversion to display_timing internally. Also update nyan-big which is affected by this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/video/tegra124/display.c')
-rw-r--r--drivers/video/tegra124/display.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index 7179dbf..610ffa9 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -10,7 +10,7 @@
#include <dm.h>
#include <edid.h>
#include <errno.h>
-#include <displayport.h>
+#include <display.h>
#include <edid.h>
#include <fdtdec.h>
#include <lcd.h>
@@ -324,20 +324,12 @@ static int display_update_config_from_edid(struct udevice *dp_dev,
int *panel_bppp,
struct display_timing *timing)
{
- u8 buf[EDID_SIZE];
- int bpc, ret;
+ int ret;
- ret = display_port_read_edid(dp_dev, buf, sizeof(buf));
- if (ret < 0)
- return ret;
- ret = edid_get_timing(buf, ret, timing, &bpc);
+ ret = display_read_timing(dp_dev, timing);
if (ret)
return ret;
- /* Use this information if valid */
- if (bpc != -1)
- *panel_bppp = bpc * 3;
-
return 0;
}
@@ -398,7 +390,7 @@ int display_init(void *lcdbase, int fb_bits_per_pixel,
int node;
int ret;
- ret = uclass_get_device(UCLASS_DISPLAY_PORT, 0, &dp_dev);
+ ret = uclass_get_device(UCLASS_DISPLAY, 0, &dp_dev);
if (ret)
return ret;
@@ -450,7 +442,7 @@ int display_init(void *lcdbase, int fb_bits_per_pixel,
}
/* Enable dp */
- ret = display_port_enable(dp_dev, panel_bpp, timing);
+ ret = display_enable(dp_dev, panel_bpp, timing);
if (ret)
return ret;