search for: bochs_dispi_write

Displaying 15 results from an estimated 15 matches for "bochs_dispi_write".

2019 Jun 27
0
[PATCH v3 4/5] drm/bochs: drop stride and bpp from struct bochs_device
...chs->stride = mode->hdisplay * (bochs->bpp / 8); - DRM_DEBUG_DRIVER("%dx%d @ %d bpp\n", - bochs->xres, bochs->yres, bochs->bpp); + DRM_DEBUG_DRIVER("%dx%d\n", + bochs->xres, bochs->yres); bochs_vga_writeb(bochs, 0x3c0, 0x20); /* unblank */ bochs_dispi_write(bochs, VBE_DISPI_INDEX_ENABLE, 0); - bochs_dispi_write(bochs, VBE_DISPI_INDEX_BPP, bochs->bpp); + bochs_dispi_write(bochs, VBE_DISPI_INDEX_BPP, 32); bochs_dispi_write(bochs, VBE_DISPI_INDEX_XRES, bochs->xres); bochs_dispi_write(bochs, VBE_DISPI_INDEX_YRES,...
2019 Jun 27
0
[PATCH v3 3/5] drm/bochs: drop yres_virtual from struct bochs_device
...;xres, bochs->yres, bochs->bpp, - bochs->yres_virtual); + DRM_DEBUG_DRIVER("%dx%d @ %d bpp\n", + bochs->xres, bochs->yres, bochs->bpp); bochs_vga_writeb(bochs, 0x3c0, 0x20); /* unblank */ @@ -221,8 +219,6 @@ void bochs_hw_setmode(struct bochs_device *bochs, bochs_dispi_write(bochs, VBE_DISPI_INDEX_YRES, bochs->yres); bochs_dispi_write(bochs, VBE_DISPI_INDEX_BANK, 0); bochs_dispi_write(bochs, VBE_DISPI_INDEX_VIRT_WIDTH, bochs->xres); - bochs_dispi_write(bochs, VBE_DISPI_INDEX_VIRT_HEIGHT, - bochs->yres_virtual); bochs_dispi_write(bochs,...
2020 Feb 11
1
[PATCH v3] drm/bochs: add drm_driver.release callback.
...e *bochs, struct drm_display_mode *mode) { + int idx; + + if (!drm_dev_enter(bochs->dev, &idx)) + return; + bochs->xres = mode->hdisplay; bochs->yres = mode->vdisplay; bochs->bpp = 32; @@ -232,11 +240,18 @@ void bochs_hw_setmode(struct bochs_device *bochs, bochs_dispi_write(bochs, VBE_DISPI_INDEX_ENABLE, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED); + + drm_dev_exit(idx); } void bochs_hw_setformat(struct bochs_device *bochs, const struct drm_format_info *format) { + int idx; + + if (!drm_dev_enter(bochs->dev, &idx)) + return; + DRM_DEBUG_DRIVER(...
2019 Jun 27
2
[PATCH v2] drm/bochs: fix framebuffer setup.
...fset % bochs->stride) * 8 / bochs->bpp; + vy = offset / bochs->stride; + vx = (offset % bochs->stride) * 8 / bochs->bpp; + vwidth = stride * 8 / bochs->bpp; DRM_DEBUG_DRIVER("x %d, y %d, addr %llx -> offset %lx, vx %d, vy %d\n", x, y, addr, offset, vx, vy); + bochs_dispi_write(bochs, VBE_DISPI_INDEX_VIRT_WIDTH, vwidth); bochs_dispi_write(bochs, VBE_DISPI_INDEX_X_OFFSET, vx); bochs_dispi_write(bochs, VBE_DISPI_INDEX_Y_OFFSET, vy); } diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 5904eddc83a5..bc19dbd531ef 100644 --- a/drivers...
2020 Feb 11
2
[PATCH v4] drm/bochs: add drm_driver.release callback.
...e *bochs, struct drm_display_mode *mode) { + int idx; + + if (!drm_dev_enter(bochs->dev, &idx)) + return; + bochs->xres = mode->hdisplay; bochs->yres = mode->vdisplay; bochs->bpp = 32; @@ -232,11 +240,18 @@ void bochs_hw_setmode(struct bochs_device *bochs, bochs_dispi_write(bochs, VBE_DISPI_INDEX_ENABLE, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED); + + drm_dev_exit(idx); } void bochs_hw_setformat(struct bochs_device *bochs, const struct drm_format_info *format) { + int idx; + + if (!drm_dev_enter(bochs->dev, &idx)) + return; + DRM_DEBUG_DRIVER(...
2020 Feb 11
2
[PATCH v4] drm/bochs: add drm_driver.release callback.
...e *bochs, struct drm_display_mode *mode) { + int idx; + + if (!drm_dev_enter(bochs->dev, &idx)) + return; + bochs->xres = mode->hdisplay; bochs->yres = mode->vdisplay; bochs->bpp = 32; @@ -232,11 +240,18 @@ void bochs_hw_setmode(struct bochs_device *bochs, bochs_dispi_write(bochs, VBE_DISPI_INDEX_ENABLE, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED); + + drm_dev_exit(idx); } void bochs_hw_setformat(struct bochs_device *bochs, const struct drm_format_info *format) { + int idx; + + if (!drm_dev_enter(bochs->dev, &idx)) + return; + DRM_DEBUG_DRIVER(...
2019 Jun 26
1
[PATCH 2/2] drm/bochs: fix framebuffer setup.
...fset / bochs->stride; - int vx = (offset % bochs->stride) * 8 / bochs->bpp; + vy = offset / bochs->stride; + vx = (offset % bochs->stride) * 8 / bochs->bpp; DRM_DEBUG_DRIVER("x %d, y %d, addr %llx -> offset %lx, vx %d, vy %d\n", x, y, addr, offset, vx, vy); + bochs_dispi_write(bochs, VBE_DISPI_INDEX_VIRT_WIDTH, fbwidth); bochs_dispi_write(bochs, VBE_DISPI_INDEX_X_OFFSET, vx); bochs_dispi_write(bochs, VBE_DISPI_INDEX_Y_OFFSET, vy); } diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 5904eddc83a5..1f6aa11a1dc9 100644 --- a/driver...
2020 Feb 11
0
[PATCH v4] drm/bochs: add drm_driver.release callback.
...t; + int idx; > + > + if (!drm_dev_enter(bochs->dev, &idx)) > + return; > + > bochs->xres = mode->hdisplay; > bochs->yres = mode->vdisplay; > bochs->bpp = 32; > @@ -232,11 +240,18 @@ void bochs_hw_setmode(struct bochs_device *bochs, > > bochs_dispi_write(bochs, VBE_DISPI_INDEX_ENABLE, > VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED); > + > + drm_dev_exit(idx); > } > > void bochs_hw_setformat(struct bochs_device *bochs, > const struct drm_format_info *format) > { > + int idx; > + > + if (!drm_dev_enter(boc...
2019 Jun 27
0
[PATCH v3 5/5] drm/bochs: move bochs_hw_setformat() call
...rmat_info *format) +static void bochs_hw_setformat(struct bochs_device *bochs, + const struct drm_format_info *format) { DRM_DEBUG_DRIVER("format %c%c%c%c\n", (format->format >> 0) & 0xff, @@ -263,4 +263,5 @@ void bochs_hw_setfb(struct bochs_device *bochs, bochs_dispi_write(bochs, VBE_DISPI_INDEX_VIRT_WIDTH, vw); bochs_dispi_write(bochs, VBE_DISPI_INDEX_X_OFFSET, vx); bochs_dispi_write(bochs, VBE_DISPI_INDEX_Y_OFFSET, vy); + bochs_hw_setformat(bochs, fb->format); } diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 28edfb2...
2019 Jun 27
0
[PATCH v3 2/5] drm/bochs: pass framebuffer to bochs_hw_setbase
...t = bo->bo.offset + y * bochs->stride + x * (bochs->bpp / 8); int vy = offset / bochs->stride; int vx = (offset % bochs->stride) * 8 / bochs->bpp; - DRM_DEBUG_DRIVER("x %d, y %d, addr %llx -> offset %lx, vx %d, vy %d\n", - x, y, addr, offset, vx, vy); bochs_dispi_write(bochs, VBE_DISPI_INDEX_X_OFFSET, vx); bochs_dispi_write(bochs, VBE_DISPI_INDEX_Y_OFFSET, vy); } diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 5904eddc83a5..ddbf0802138d 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms...
2018 Sep 19
0
[PATCH v3 4/5] drm/bochs: support changing byteorder at mode set time
...urn ERR_PTR(-EINVAL); return drm_gem_fb_create(dev, file, mode_cmd); diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c index 16e4f1cacc..cacff73a64 100644 --- a/drivers/gpu/drm/bochs/bochs_hw.c +++ b/drivers/gpu/drm/bochs/bochs_hw.c @@ -47,11 +47,33 @@ static void bochs_dispi_write(struct bochs_device *bochs, u16 reg, u16 val) } } +static void bochs_hw_set_big_endian(struct bochs_device *bochs) +{ + if (bochs->qext_size < 8) + return; + + writel(0xbebebebe, bochs->mmio + 0x604); +} + +static void bochs_hw_set_little_endian(struct bochs_device *bochs) +{ + if (b...
2018 Dec 19
0
[PATCH 02/14] drm/bochs: split bochs_hw_setmode
...rmat->format >> 8) & 0xff, - (format->format >> 16) & 0xff, - (format->format >> 24) & 0xff, bochs->yres_virtual); bochs_vga_writeb(bochs, 0x3c0, 0x20); /* unblank */ @@ -229,6 +224,16 @@ void bochs_hw_setmode(struct bochs_device *bochs, bochs_dispi_write(bochs, VBE_DISPI_INDEX_ENABLE, VBE_DISPI_ENABLED | VBE_DISPI_LFB_ENABLED); +} + +void bochs_hw_setformat(struct bochs_device *bochs, + const struct drm_format_info *format) +{ + DRM_DEBUG_DRIVER("format %c%c%c%c\n", + (format->format >> 0) & 0xff, + (format-&gt...
2018 Oct 02
0
[PATCH v2 2/2] drm/bochs: add edid support.
...u32 bpp; + struct edid *edid; /* drm */ struct drm_device *dev; diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c index a39b0343c1..21a769e48c 100644 --- a/drivers/gpu/drm/bochs/bochs_hw.c +++ b/drivers/gpu/drm/bochs/bochs_hw.c @@ -47,6 +47,41 @@ static void bochs_dispi_write(struct bochs_device *bochs, u16 reg, u16 val) } } +static int bochs_load_edid(struct bochs_device *bochs) +{ + uint8_t *blob; + size_t i, len; + uint8_t num_exts; + + if (!bochs->mmio) + return -1; + + if ((readb(bochs->mmio+0) != 0x00 || + readb(bochs->mmio+1) != 0xff)) + retu...
2018 Oct 02
0
[PATCH v3 2/2] drm/bochs: add edid support.
...u32 bpp; + struct edid *edid; /* drm */ struct drm_device *dev; diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c index a39b0343c1..21a769e48c 100644 --- a/drivers/gpu/drm/bochs/bochs_hw.c +++ b/drivers/gpu/drm/bochs/bochs_hw.c @@ -47,6 +47,41 @@ static void bochs_dispi_write(struct bochs_device *bochs, u16 reg, u16 val) } } +static int bochs_load_edid(struct bochs_device *bochs) +{ + uint8_t *blob; + size_t i, len; + uint8_t num_exts; + + if (!bochs->mmio) + return -1; + + if ((readb(bochs->mmio+0) != 0x00 || + readb(bochs->mmio+1) != 0xff)) + retu...
2023 Mar 15
0
[PATCH v3 07/38] drm: handle HAS_IOPORT dependencies
...+#ifdef HAS_IOPORT > outw(reg, VBE_DISPI_IOPORT_INDEX); > ret = inw(VBE_DISPI_IOPORT_DATA); > +#else > + WARN_ONCE(1, "Non-MMIO bochs device needs HAS_IOPORT"); > + ret = 0xffff; > +#endif > } > return ret; > } > @@ -145,8 +160,12 @@ static void bochs_dispi_write(struct bochs_device *bochs, u16 reg, u16 val) > > writew(val, bochs->mmio + offset); > } else { > +#ifdef HAS_IOPORT > outw(reg, VBE_DISPI_IOPORT_INDEX); > outw(val, VBE_DISPI_IOPORT_DATA); > +#else > + WARN_ONCE(1, "Non-MMIO bochs device needs HAS_IOPO...