From 3fd39937b1aeef3a4937b82f1efd6c101e156fd4 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Fri, 4 Jan 2019 09:11:05 +0000 Subject: [PATCH 1/3] imx: video: Fix return value issue When framebuffer driver init is failed, we should return the err value not 0. So the video init can exit immediately. Signed-off-by: Ye Li Reviewed-by: Peng Fan --- arch/arm/mach-imx/video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/video.c b/arch/arm/mach-imx/video.c index b40ce53405..953fe53cb4 100644 --- a/arch/arm/mach-imx/video.c +++ b/arch/arm/mach-imx/video.c @@ -7,7 +7,7 @@ int board_video_skip(void) { int i; - int ret; + int ret = 0; char const *panel = env_get("panel"); if (!panel) { @@ -50,7 +50,7 @@ int board_video_skip(void) return -EINVAL; } - return 0; + return ret; } #ifdef CONFIG_IMX_HDMI From 0307d95d52526381425e4ce86b230cc61ca6b94b Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Fri, 18 Jan 2019 15:56:51 +0200 Subject: [PATCH 2/3] videomodes: Relax EDID validation checks for hsync/vsync pulse width Current EDID detailed timing parser errors out when either horizontal or vertical pulse sync width is 0, thus not allowing a display with EDID listed below work properly. EDID below works ok within Linux although it warns about these two fields being 0. Therefore relax the checks a bit so we can actually use this the screen out of the box. Of-course, this display itself is somewhat quirky display with following anti-features: - HPD pin is not usable - although resolution is 640x480, only top 240 pixels are visible $ xxd -p display.edid 00ffffffffffff0005a1e00301000000150f0103800f05780a0f6ea05748 9a2610474f200000010101010101010101010101010101012a08804520e0 0b1020004000953600000018000000fd0034441a2403000a202020202020 0000001000310a20202020202020202020200000001000002a4030701300 782d1100001e006b $ edid-decode display.edid EDID version: 1.3 Manufacturer: AMA Model 3e0 Serial Number 1 Digital display Maximum image size: 15 cm x 5 cm Gamma: 2.20 RGB color display First detailed timing is preferred timing Display x,y Chromaticity: Red: 0.6250, 0.3398 Green: 0.2841, 0.6044 Blue: 0.1494, 0.0644 White: 0.2802, 0.3105 Established timings supported: 640x480@60Hz 4:3 HorFreq: 31469 Hz Clock: 25.175 MHz Standard timings supported: Detailed mode: Clock 20.900 MHz, 149 mm x 54 mm 640 672 672 709 hborder 0 480 484 484 491 vborder 0 -hsync -vsync VertFreq: 60 Hz, HorFreq: 29478 Hz Monitor ranges (GTF): 52-68Hz V, 26-36kHz H, max dotclock 30MHz Dummy block Dummy block Checksum: 0x6b (valid) Signed-off-by: Priit Laes Signed-off-by: Priit Laes --- drivers/video/videomodes.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c index 74bafff011..1cfeaa980f 100644 --- a/drivers/video/videomodes.c +++ b/drivers/video/videomodes.c @@ -396,9 +396,7 @@ int video_edid_dtd_to_ctfb_res_modes(struct edid_detailed_timing *t, EDID_DETAILED_TIMING_VERTICAL_ACTIVE(*t) == 0 || EDID_DETAILED_TIMING_VERTICAL_BLANKING(*t) == 0 || EDID_DETAILED_TIMING_HSYNC_OFFSET(*t) == 0 || - EDID_DETAILED_TIMING_HSYNC_PULSE_WIDTH(*t) == 0 || EDID_DETAILED_TIMING_VSYNC_OFFSET(*t) == 0 || - EDID_DETAILED_TIMING_VSYNC_PULSE_WIDTH(*t) == 0 || /* 3d formats are not supported*/ EDID_DETAILED_TIMING_FLAG_STEREO(*t) != 0) return -EINVAL; From 6df07d854b9ee81d31fafcd83724bed7fb1fd6d7 Mon Sep 17 00:00:00 2001 From: Mario Six Date: Mon, 28 Jan 2019 09:50:58 +0100 Subject: [PATCH 3/3] ihs_video_out: Fix error handling The ihs_video_out driver's error handling is incorrect in two places (one is a missing negation, and in one place a error should be ignored). Fix these two instances. Signed-off-by: Mario Six --- drivers/video/ihs_video_out.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/ihs_video_out.c b/drivers/video/ihs_video_out.c index 5cdf17aec1..0af7c2bf44 100644 --- a/drivers/video/ihs_video_out.c +++ b/drivers/video/ihs_video_out.c @@ -238,8 +238,8 @@ int ihs_video_out_probe(struct udevice *dev) int res; res = regmap_init_mem(dev_ofnode(dev), &priv->map); - if (!res) { - debug("%s: Could initialize regmap (err = %d)\n", dev->name, + if (res) { + debug("%s: Could not initialize regmap (err = %d)\n", dev->name, res); return res; } @@ -322,7 +322,7 @@ int ihs_video_out_probe(struct udevice *dev) } res = display_enable(priv->video_tx, 8, &timing); - if (res) { + if (res && res != -EIO) { /* Ignore missing DP sink error */ debug("%s: Could not enable the display (err = %d)\n", dev->name, res); return res;