Displaying 20 results from an estimated 20 matches for "bochs_hw_load_edid".
2018 Dec 20
2
[PATCH v2] drm/bochs: add edid present check
...drivers/gpu/drm/bochs/bochs_hw.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index c90a0d492f..e1f8ffce00 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -89,6 +89,14 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
if (!bochs->mmio)
return -1;
+ /*
+ * 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->ed...
2018 Dec 20
2
[PATCH v2] drm/bochs: add edid present check
...drivers/gpu/drm/bochs/bochs_hw.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index c90a0d492f..e1f8ffce00 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -89,6 +89,14 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
if (!bochs->mmio)
return -1;
+ /*
+ * 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->ed...
2018 Dec 20
1
[PATCH v3] drm/bochs: add edid present check
...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(header) != 8)
+ return -1;
+
kfree(bochs-&g...
2020 Apr 15
2
[PATCH 59/59] drm/bochs: Remove explicit drm_connector_register
...chs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -104,7 +104,6 @@ static void bochs_connector_init(struct drm_device *dev)
DRM_MODE_CONNECTOR_VIRTUAL);
drm_connector_helper_add(connector,
&bochs_connector_connector_helper_funcs);
- drm_connector_register(connector);
bochs_hw_load_edid(bochs);
if (bochs->edid) {
--
2.25.1
2020 Dec 01
1
[PATCH v2 04/20] drm/bochs: Remove references to struct drm_device.pdev
...ev->pdev = pdev;
pci_set_drvdata(pdev, dev);
ret = bochs_load(dev);
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index dce4672e3fc8..2d7380a9890e 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -110,7 +110,7 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
int bochs_hw_init(struct drm_device *dev)
{
struct bochs_device *bochs = dev->dev_private;
- struct pci_dev *pdev = dev->pdev;
+ struct pci_dev *pdev = to_pci_dev(dev->dev);
unsigned long addr, size, mem, ioaddr, iosize;
u16 id;
@@ -201,7 +201,7 @@ voi...
2019 Jun 27
2
[PATCH v2] drm/bochs: fix framebuffer setup.
...@@ -86,7 +86,7 @@ void bochs_hw_setmode(struct bochs_device *bochs,
void bochs_hw_setformat(struct bochs_device *bochs,
const struct drm_format_info *format);
void bochs_hw_setbase(struct bochs_device *bochs,
- int x, int y, u64 addr);
+ int x, int y, int stride, u64 addr);
int bochs_hw_load_edid(struct bochs_device *bochs);
/* bochs_mm.c */
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index 791ab2f79947..ebfea8744fe6 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -255,16 +255,22 @@ void bochs_hw_setformat(struc...
2019 Jun 26
1
[PATCH 2/2] drm/bochs: fix framebuffer setup.
...@ -86,7 +86,7 @@ void bochs_hw_setmode(struct bochs_device *bochs,
void bochs_hw_setformat(struct bochs_device *bochs,
const struct drm_format_info *format);
void bochs_hw_setbase(struct bochs_device *bochs,
- int x, int y, u64 addr);
+ int x, int y, int fbwidth, u64 addr);
int bochs_hw_load_edid(struct bochs_device *bochs);
/* bochs_mm.c */
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index 791ab2f79947..141aa02962d3 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -255,16 +255,21 @@ void bochs_hw_setformat(struc...
2020 Feb 11
2
[PATCH v4] drm/bochs: add drm_driver.release callback.
Call bochs_unload via drm_driver.release to make sure we release stuff
when it is safe to do so. Use drm_dev_{enter,exit,unplug} to avoid
touching hardware after device removal. Tidy up here and there.
v4: add changelog.
v3: use drm_dev_*().
v2: move hardware deinit to pci_remove().
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
drivers/gpu/drm/bochs/bochs_drv.c | 6 +++---
2020 Feb 11
2
[PATCH v4] drm/bochs: add drm_driver.release callback.
Call bochs_unload via drm_driver.release to make sure we release stuff
when it is safe to do so. Use drm_dev_{enter,exit,unplug} to avoid
touching hardware after device removal. Tidy up here and there.
v4: add changelog.
v3: use drm_dev_*().
v2: move hardware deinit to pci_remove().
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
drivers/gpu/drm/bochs/bochs_drv.c | 6 +++---
2018 Dec 18
0
[PATCH] drm/bochs: add edid present check
...---
drivers/gpu/drm/bochs/bochs_hw.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index c90a0d492f..f91e049625 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -89,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...
2018 Dec 20
0
[PATCH v2] drm/bochs: add edid present check
...| 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
> index c90a0d492f..e1f8ffce00 100644
> --- a/drivers/gpu/drm/bochs/bochs_hw.c
> +++ b/drivers/gpu/drm/bochs/bochs_hw.c
> @@ -89,6 +89,14 @@ int bochs_hw_load_edid(struct bochs_device *bochs)
> if (!bochs->mmio)
> return -1;
>
> + /*
> + * 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)...
2019 Jun 27
0
[PATCH v3 2/5] drm/bochs: pass framebuffer to bochs_hw_setbase
...*mode);
void bochs_hw_setformat(struct bochs_device *bochs,
const struct drm_format_info *format);
-void bochs_hw_setbase(struct bochs_device *bochs,
- int x, int y, u64 addr);
+void bochs_hw_setfb(struct bochs_device *bochs,
+ struct drm_framebuffer *fb,
+ int x, int y);
int bochs_hw_load_edid(struct bochs_device *bochs);
/* bochs_mm.c */
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index 791ab2f79947..67101c85029c 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -254,17 +254,17 @@ void bochs_hw_setformat(struc...
2018 Dec 19
0
[PATCH 02/14] drm/bochs: split bochs_hw_setmode
...drm_display_mode *mode,
- const struct drm_format_info *format);
+ struct drm_display_mode *mode);
+void bochs_hw_setformat(struct bochs_device *bochs,
+ const struct drm_format_info *format);
void bochs_hw_setbase(struct bochs_device *bochs,
int x, int y, u64 addr);
int bochs_hw_load_edid(struct bochs_device *bochs);
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index c90a0d492f..bbb251fc78 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -197,8 +197,7 @@ void bochs_hw_fini(struct drm_device *dev)
}
void b...
2020 Feb 11
0
[PATCH v4] drm/bochs: add drm_driver.release callback.
...re deinit to pci_remove().
>
> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Btw I checked around whether there's anything else that obviously needs a
drm_dev_enter/exit, and I spotted the !bochs->mmio check in
bochs_hw_load_edid. That one looks like cargo-cult, there's a single
caller in the init path, so either mmio works at that point or this is
dead code ... slightly confusing.
-Daniel
> ---
> drivers/gpu/drm/bochs/bochs_drv.c | 6 +++---
> drivers/gpu/drm/bochs/bochs_hw.c | 24 +++++++++++++++++++++++-...
2019 May 06
0
[PATCH v4 12/19] drm/bochs: Convert bochs driver to VRAM MM
...device {
struct drm_device *dev;
struct drm_simple_display_pipe pipe;
struct drm_connector connector;
-
- /* ttm */
- struct {
- struct ttm_bo_device bdev;
- bool initialized;
- } ttm;
};
/* ---------------------------------------------------------------------- */
@@ -99,10 +92,6 @@ int bochs_hw_load_edid(struct bochs_device *bochs);
/* bochs_mm.c */
int bochs_mm_init(struct bochs_device *bochs);
void bochs_mm_fini(struct bochs_device *bochs);
-int bochs_mmap(struct file *filp, struct vm_area_struct *vma);
-
-int bochs_dumb_create(struct drm_file *file, struct drm_device *dev,
- struct drm...
2019 May 06
25
[PATCH v4 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each
other. The implementation is always the same; except for the name of
some data structures.
As recently discussed, this patch set provides generic memory-management
code for simple framebuffers with dedicated video memory. It further
converts the respective drivers to the generic code. The shared code
is basically the same
2019 May 06
25
[PATCH v4 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each
other. The implementation is always the same; except for the name of
some data structures.
As recently discussed, this patch set provides generic memory-management
code for simple framebuffers with dedicated video memory. It further
converts the respective drivers to the generic code. The shared code
is basically the same
2019 May 08
22
[PATCH v5 00/20] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each
other. The implementation is always the same; except for the name of
some data structures.
As recently discussed, this patch set provides generic memory-management
code for simple framebuffers with dedicated video memory. It further
converts the respective drivers to the generic code. The shared code
is basically the same
2019 May 08
22
[PATCH v5 00/20] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each
other. The implementation is always the same; except for the name of
some data structures.
As recently discussed, this patch set provides generic memory-management
code for simple framebuffers with dedicated video memory. It further
converts the respective drivers to the generic code. The shared code
is basically the same
2019 Apr 29
21
[PATCH v3 00/19] Share TTM code among DRM framebuffer drivers
Several simple framebuffer drivers copy most of the TTM code from each
other. The implementation is always the same; except for the name of
some data structures.
As recently discussed, this patch set provides generic memory-management
code for simple framebuffers with dedicated video memory. It further
converts the respective drivers to the generic code. The shared code
is basically the same