search for: cirrus_mode_set

Displaying 20 results from an estimated 22 matches for "cirrus_mode_set".

2020 Feb 11
1
[PATCH v4] drm/cirrus: add drm_driver.release callback.
...> 8) & 0xff)); wreg_crt(cirrus, 0x0d, (u8)(addr & 0xff)); @@ -168,6 +172,8 @@ static void cirrus_set_start_address(struct cirrus_device *cirrus, u32 offset) tmp &= 0x7f; tmp |= (addr >> 12) & 0x80; wreg_crt(cirrus, 0x1d, tmp); + + drm_dev_exit(idx); } static int cirrus_mode_set(struct cirrus_device *cirrus, @@ -176,9 +182,12 @@ static int cirrus_mode_set(struct cirrus_device *cirrus, { int hsyncstart, hsyncend, htotal, hdispend; int vtotal, vdispend; - int tmp; + int tmp, idx; int sr07 = 0, hdr = 0; + if (!drm_dev_enter(&cirrus->dev, &idx)) + return -...
2023 Feb 15
17
[PATCH 00/17] cirrus: Modernize the cirrus driver
...qemu's cirrus emulation. Thomas Zimmermann (17): drm/cirrus: Compute blit destination offset in single location drm/cirrus: Replace cpp value with format drm/cirrus: Use drm_fb_blit() to update scanout buffer drm/cirrus: Move drm_dev_{enter,exit}() into DRM helpers drm/cirrus: Split cirrus_mode_set() into smaller functions drm/cirrus: Integrate connector into pipeline code drm/cirrus: Move primary-plane format arrays drm/cirrus: Convert to regular atomic helpers drm/cirrus: Enable damage clipping on primary plane drm/cirrus: Inline cirrus_fb_blit_rect() drm/cirrus: Remove format t...
2020 Apr 03
4
[PATCH 40/44] drm/cirrus: Don't use drm_device->dev_private
...e { void __iomem *mmio; }; +#define to_cirrus(_dev) container_of(_dev, struct cirrus_device, dev) + /* ------------------------------------------------------------------ */ /* * The meat of this driver. The core passes us a mode and we have to program @@ -311,7 +313,7 @@ static int cirrus_mode_set(struct cirrus_device *cirrus, static int cirrus_fb_blit_rect(struct drm_framebuffer *fb, struct drm_rect *rect) { - struct cirrus_device *cirrus = fb->dev->dev_private; + struct cirrus_device *cirrus = to_cirrus(fb->dev); void *vmap; int idx, ret; @@ -436,7 +438,7 @@ sta...
2020 Apr 03
4
[PATCH 40/44] drm/cirrus: Don't use drm_device->dev_private
...e { void __iomem *mmio; }; +#define to_cirrus(_dev) container_of(_dev, struct cirrus_device, dev) + /* ------------------------------------------------------------------ */ /* * The meat of this driver. The core passes us a mode and we have to program @@ -311,7 +313,7 @@ static int cirrus_mode_set(struct cirrus_device *cirrus, static int cirrus_fb_blit_rect(struct drm_framebuffer *fb, struct drm_rect *rect) { - struct cirrus_device *cirrus = fb->dev->dev_private; + struct cirrus_device *cirrus = to_cirrus(fb->dev); void *vmap; int idx, ret; @@ -436,7 +438,7 @@ sta...
2020 Feb 11
0
[PATCH v3] drm/cirrus: add drm_driver.release callback.
...> 8) & 0xff)); wreg_crt(cirrus, 0x0d, (u8)(addr & 0xff)); @@ -168,6 +172,8 @@ static void cirrus_set_start_address(struct cirrus_device *cirrus, u32 offset) tmp &= 0x7f; tmp |= (addr >> 12) & 0x80; wreg_crt(cirrus, 0x1d, tmp); + + drm_dev_exit(idx); } static int cirrus_mode_set(struct cirrus_device *cirrus, @@ -176,9 +182,12 @@ static int cirrus_mode_set(struct cirrus_device *cirrus, { int hsyncstart, hsyncend, htotal, hdispend; int vtotal, vdispend; - int tmp; + int tmp, idx; int sr07 = 0, hdr = 0; + if (!drm_dev_enter(&cirrus->dev, &idx)) + return -...
2020 Apr 15
0
[PATCH 36/59] drm/cirrus: Don't use drm_device->dev_private
...e { void __iomem *mmio; }; +#define to_cirrus(_dev) container_of(_dev, struct cirrus_device, dev) + /* ------------------------------------------------------------------ */ /* * The meat of this driver. The core passes us a mode and we have to program @@ -311,7 +313,7 @@ static int cirrus_mode_set(struct cirrus_device *cirrus, static int cirrus_fb_blit_rect(struct drm_framebuffer *fb, struct drm_rect *rect) { - struct cirrus_device *cirrus = fb->dev->dev_private; + struct cirrus_device *cirrus = to_cirrus(fb->dev); void *vmap; int idx, ret; @@ -436,7 +438,7 @@ sta...
2020 Apr 06
0
[PATCH 40/44] drm/cirrus: Don't use drm_device->dev_private
...I had the same comment for vbox and I think it applies to all patches. Best regards Thomas > /* ------------------------------------------------------------------ */ > /* > * The meat of this driver. The core passes us a mode and we have to program > @@ -311,7 +313,7 @@ static int cirrus_mode_set(struct cirrus_device *cirrus, > static int cirrus_fb_blit_rect(struct drm_framebuffer *fb, > struct drm_rect *rect) > { > - struct cirrus_device *cirrus = fb->dev->dev_private; > + struct cirrus_device *cirrus = to_cirrus(fb->dev); > void *vmap; > int...
2020 Feb 10
1
[PATCH v2] drm/cirrus: add drm_driver.release callback.
...d cirrus_set_start_address(struct cirrus_device *cirrus, u32 offset) u32 addr; u8 tmp; + if (!cirrus->mmio) + return; + addr = offset >> 2; wreg_crt(cirrus, 0x0c, (u8)((addr >> 8) & 0xff)); wreg_crt(cirrus, 0x0d, (u8)(addr & 0xff)); @@ -179,6 +182,9 @@ static int cirrus_mode_set(struct cirrus_device *cirrus, int tmp; int sr07 = 0, hdr = 0; + if (!cirrus->mmio) + return -1; + htotal = mode->htotal / 8; hsyncend = mode->hsync_end / 8; hsyncstart = mode->hsync_start / 8; @@ -301,6 +307,9 @@ static int cirrus_fb_blit_rect(struct drm_framebuffer *fb,...
2019 Apr 04
1
[PATCH] drm/cirrus: rewrite and modernize driver.
On Wed, Apr 3, 2019 at 5:23 PM Gerd Hoffmann <kraxel at redhat.com> wrote: > > Time to kill some bad sample code people are copying from ;) > > This is a complete rewrite of the cirrus driver. The cirrus_mode_set() > function is pretty much the only function which is carried over largely > unmodified. Everything else is upside down. > > It is a single monster patch. But given that it does some pretty > fundamental changes to the drivers workflow and also reduces the code > size by roughl...
2019 Apr 04
0
[PATCH] drm/cirrus: rewrite and modernize driver.
...Thu, Apr 04, 2019 at 12:58:09PM +1000, David Airlie wrote: > On Wed, Apr 3, 2019 at 5:23 PM Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > Time to kill some bad sample code people are copying from ;) > > > > This is a complete rewrite of the cirrus driver. The cirrus_mode_set() > > function is pretty much the only function which is carried over largely > > unmodified. Everything else is upside down. > > > > It is a single monster patch. But given that it does some pretty > > fundamental changes to the drivers workflow and also reduces the...
2023 Feb 15
1
[PATCH 17/17] drm/cirrus: Use VGA macro constants to unblank
...ion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c index ad67fb895213..594bc472862f 100644 --- a/drivers/gpu/drm/tiny/cirrus.c +++ b/drivers/gpu/drm/tiny/cirrus.c @@ -509,7 +509,7 @@ static void cirrus_crtc_helper_atomic_enable(struct drm_crtc *crtc, cirrus_mode_set(cirrus, &crtc_state->mode); /* Unblank (needed on S3 resume, vgabios doesn't do it then) */ - outb(0x20, 0x3c0); + outb(VGA_AR_ENABLE_DISPLAY, VGA_ATT_W); drm_dev_exit(idx); } -- 2.39.1
2023 Mar 20
0
[PATCH AUTOSEL 6.2 01/30] drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update()
...u/drm/tiny/cirrus.c index 678c2ef1cae70..ffa7e61dd1835 100644 --- a/drivers/gpu/drm/tiny/cirrus.c +++ b/drivers/gpu/drm/tiny/cirrus.c @@ -455,7 +455,7 @@ static void cirrus_pipe_update(struct drm_simple_display_pipe *pipe, if (state->fb && cirrus->cpp != cirrus_cpp(state->fb)) cirrus_mode_set(cirrus, &crtc->mode, state->fb); - if (drm_atomic_helper_damage_merged(old_state, state, &rect)) + if (state->fb && drm_atomic_helper_damage_merged(old_state, state, &rect)) cirrus_fb_blit_rect(state->fb, &shadow_plane_state->data[0], &rect); } --...
2023 Mar 20
0
[PATCH AUTOSEL 6.1 01/29] drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update()
...u/drm/tiny/cirrus.c index 354d5e854a6f0..b27e469e90217 100644 --- a/drivers/gpu/drm/tiny/cirrus.c +++ b/drivers/gpu/drm/tiny/cirrus.c @@ -455,7 +455,7 @@ static void cirrus_pipe_update(struct drm_simple_display_pipe *pipe, if (state->fb && cirrus->cpp != cirrus_cpp(state->fb)) cirrus_mode_set(cirrus, &crtc->mode, state->fb); - if (drm_atomic_helper_damage_merged(old_state, state, &rect)) + if (state->fb && drm_atomic_helper_damage_merged(old_state, state, &rect)) cirrus_fb_blit_rect(state->fb, &shadow_plane_state->data[0], &rect); } --...
2023 Mar 20
0
[PATCH AUTOSEL 5.15 01/17] drm/cirrus: NULL-check pipe->plane.state->fb in cirrus_pipe_update()
...u/drm/tiny/cirrus.c index 4611ec408506b..2a81311b22172 100644 --- a/drivers/gpu/drm/tiny/cirrus.c +++ b/drivers/gpu/drm/tiny/cirrus.c @@ -450,7 +450,7 @@ static void cirrus_pipe_update(struct drm_simple_display_pipe *pipe, if (state->fb && cirrus->cpp != cirrus_cpp(state->fb)) cirrus_mode_set(cirrus, &crtc->mode, state->fb); - if (drm_atomic_helper_damage_merged(old_state, state, &rect)) + if (state->fb && drm_atomic_helper_damage_merged(old_state, state, &rect)) cirrus_fb_blit_rect(state->fb, &shadow_plane_state->data[0], &rect); } --...
2023 Mar 15
0
[PATCH v3 07/38] drm: handle HAS_IOPORT dependencies
...HAS_IOPORT"); > +#endif > } > } > > diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm/tiny/cirrus.c > index accfa52e78c5..9da89732c5ac 100644 > --- a/drivers/gpu/drm/tiny/cirrus.c > +++ b/drivers/gpu/drm/tiny/cirrus.c > @@ -308,8 +308,10 @@ static int cirrus_mode_set(struct cirrus_device *cirrus, > > cirrus_set_start_address(cirrus, 0); > > +#ifdef CONFIG_HAS_IOPORT > /* Unblank (needed on S3 resume, vgabios doesn't do it then) */ > outb(0x20, 0x3c0); > +#endif > > drm_dev_exit(idx); > return 0; -- Jani Nikula...
2019 Apr 04
3
[PATCH] drm/cirrus: rewrite and modernize driver.
...8:09PM +1000, David Airlie wrote: > > On Wed, Apr 3, 2019 at 5:23 PM Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > > > Time to kill some bad sample code people are copying from ;) > > > > > > This is a complete rewrite of the cirrus driver. The cirrus_mode_set() > > > function is pretty much the only function which is carried over largely > > > unmodified. Everything else is upside down. > > > > > > It is a single monster patch. But given that it does some pretty > > > fundamental changes to the drivers work...
2019 Apr 04
3
[PATCH] drm/cirrus: rewrite and modernize driver.
...8:09PM +1000, David Airlie wrote: > > On Wed, Apr 3, 2019 at 5:23 PM Gerd Hoffmann <kraxel at redhat.com> wrote: > > > > > > Time to kill some bad sample code people are copying from ;) > > > > > > This is a complete rewrite of the cirrus driver. The cirrus_mode_set() > > > function is pretty much the only function which is carried over largely > > > unmodified. Everything else is upside down. > > > > > > It is a single monster patch. But given that it does some pretty > > > fundamental changes to the drivers work...
2019 Apr 04
1
[PATCH v2 6/6] drm/cirrus: rewrite and modernize driver.
Time to kill some bad sample code people are copying from ;) This is a complete rewrite of the cirrus driver. The cirrus_mode_set() function is pretty much the only function which is carried over largely unmodified. Everything else is upside down. It is a single monster patch. But given that it does some pretty fundamental changes to the drivers workflow and also reduces the code size by roughly 70% I think it'll still...
2019 Apr 05
1
[PATCH v3 5/5] drm/cirrus: rewrite and modernize driver.
Time to kill some bad sample code people are copying from ;) This is a complete rewrite of the cirrus driver. The cirrus_mode_set() function is pretty much the only function which is carried over largely unmodified. Everything else is upside down. It is a single monster patch. But given that it does some pretty fundamental changes to the drivers workflow and also reduces the code size by roughly 70% I think it'll still...
2019 Apr 03
5
[PATCH] drm/cirrus: rewrite and modernize driver.
Time to kill some bad sample code people are copying from ;) This is a complete rewrite of the cirrus driver. The cirrus_mode_set() function is pretty much the only function which is carried over largely unmodified. Everything else is upside down. It is a single monster patch. But given that it does some pretty fundamental changes to the drivers workflow and also reduces the code size by roughly 70% I think it'll still...