mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] video: edid: make accessible without i2c
@ 2021-01-01 22:52 Ahmad Fatoum
  2021-01-01 22:52 ` [PATCH 2/4] video: edid: make edid_check_header externally visible Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2021-01-01 22:52 UTC (permalink / raw)
  To: barebox

Users can already populate fb_info::edid_data for cases where the EDID
doesn't come via an i2c controller managed by barebox.

Only thing missing is to be able to compile without i2c, thus drop
the dependency.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 drivers/video/Kconfig | 1 -
 drivers/video/edid.c  | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index a26bace176a1..56d009529ea4 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -106,7 +106,6 @@ config DRIVER_VIDEO_SIMPLEFB
 	  based on the active barebox framebuffer.
 
 config DRIVER_VIDEO_EDID
-	depends on I2C
 	bool "Add EDID support"
 	help
 	  This enabled support for reading and parsing EDID data from an attached
diff --git a/drivers/video/edid.c b/drivers/video/edid.c
index bee4594118bb..41d40d0297b6 100644
--- a/drivers/video/edid.c
+++ b/drivers/video/edid.c
@@ -858,6 +858,9 @@ void *edid_read_i2c(struct i2c_adapter *adapter)
 {
 	u8 *block;
 
+	if (!IS_ENABLED(CONFIG_I2C))
+		return NULL;
+
 	block = xmalloc(EDID_LENGTH);
 
 	if (edid_do_read_i2c(adapter, block, 0, EDID_LENGTH))
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-05 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-01 22:52 [PATCH 1/4] video: edid: make accessible without i2c Ahmad Fatoum
2021-01-01 22:52 ` [PATCH 2/4] video: edid: make edid_check_header externally visible Ahmad Fatoum
2021-01-01 22:52 ` [PATCH 3/4] video: implement bochs dispi / QEMU VGA driver for PCI and ISA Ahmad Fatoum
2021-01-02 11:10   ` [PATCH] fixup! " Ahmad Fatoum
2021-01-05 12:19   ` [PATCH 3/4] " Sascha Hauer
2021-01-01 22:52 ` [PATCH 4/4] MIPS: qemu-malta_defconfig: enable VGA output Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox