Displaying 5 results from an estimated 5 matches for "bochs_get_edid_block".
2018 Dec 20
1
[PATCH v3] drm/bochs: add edid present check
...ers/gpu/drm/bochs/bochs_hw.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index c90a0d492f..d0b4e1cee8 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -86,9 +86,16 @@ static int bochs_get_edid_block(void *data, u8 *buf,
int bochs_hw_load_edid(struct bochs_device *bochs)
{
+ u8 header[8];
+
if (!bochs->mmio)
return -1;
+ /* check header to detect whenever edid support is enabled in qemu */
+ bochs_get_edid_block(bochs, header, 0, ARRAY_SIZE(header));
+ if (drm_edid_header_is_valid...
2018 Dec 20
2
[PATCH v2] drm/bochs: add edid present check
...Check first two EDID blob header bytes to figure whenever
+ * edid support is enabled in qemu.
+ */
+ if (readb(bochs->mmio + 0) != 0x00 ||
+ readb(bochs->mmio + 1) != 0xff)
+ return -1;
+
kfree(bochs->edid);
bochs->edid = drm_do_get_edid(&bochs->connector,
bochs_get_edid_block, bochs);
--
2.9.3
2018 Dec 20
2
[PATCH v2] drm/bochs: add edid present check
...Check first two EDID blob header bytes to figure whenever
+ * edid support is enabled in qemu.
+ */
+ if (readb(bochs->mmio + 0) != 0x00 ||
+ readb(bochs->mmio + 1) != 0xff)
+ return -1;
+
kfree(bochs->edid);
bochs->edid = drm_do_get_edid(&bochs->connector,
bochs_get_edid_block, bochs);
--
2.9.3
2018 Dec 18
0
[PATCH] drm/bochs: add edid present check
...,6 +89,10 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
if (!bochs->mmio)
return -1;
+ if (readb(bochs->mmio + 0) != 0x00 ||
+ readb(bochs->mmio + 1) != 0xff)
+ return -1;
+
kfree(bochs->edid);
bochs->edid = drm_do_get_edid(&bochs->connector,
bochs_get_edid_block, bochs);
--
2.9.3
2018 Dec 20
0
[PATCH v2] drm/bochs: add edid present check
...gure whenever
> + * edid support is enabled in qemu.
> + */
> + if (readb(bochs->mmio + 0) != 0x00 ||
> + readb(bochs->mmio + 1) != 0xff)
> + return -1;
> +
> kfree(bochs->edid);
> bochs->edid = drm_do_get_edid(&bochs->connector,
> bochs_get_edid_block, bochs);
> --
> 2.9.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch