Displaying 15 results from an estimated 15 matches for "cirrus_fb_blit_fullscreen".
2020 Apr 03
4
[PATCH 40/44] drm/cirrus: Don't use drm_device->dev_private
...struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
- struct cirrus_device *cirrus = pipe->crtc.dev->dev_private;
+ struct cirrus_device *cirrus = to_cirrus(pipe->crtc.dev);
cirrus_mode_set(cirrus, &crtc_state->mode, plane_state->fb);
cirrus_fb_blit_fullscreen(plane_state->fb);
@@ -445,7 +447,7 @@ static void cirrus_pipe_enable(struct drm_simple_display_pipe *pipe,
static void cirrus_pipe_update(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *old_state)
{
- struct cirrus_device *cirrus = pipe->crtc.dev->dev_private;
+...
2020 Apr 03
4
[PATCH 40/44] drm/cirrus: Don't use drm_device->dev_private
...struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
- struct cirrus_device *cirrus = pipe->crtc.dev->dev_private;
+ struct cirrus_device *cirrus = to_cirrus(pipe->crtc.dev);
cirrus_mode_set(cirrus, &crtc_state->mode, plane_state->fb);
cirrus_fb_blit_fullscreen(plane_state->fb);
@@ -445,7 +447,7 @@ static void cirrus_pipe_enable(struct drm_simple_display_pipe *pipe,
static void cirrus_pipe_update(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *old_state)
{
- struct cirrus_device *cirrus = pipe->crtc.dev->dev_private;
+...
2019 Apr 03
2
[PATCH] drm/cirrus: rewrite and modernize driver.
...gt;dev->dev_private;
> > +
> > + if (cirrus->pipe.plane.state->fb != fb)
> > + return 0;
> > +
> > + if (num_clips)
> > + cirrus_fb_blit_clips(fb, clips, num_clips);
> > + else
> > + cirrus_fb_blit_fullscreen(fb);
> > + return 0;
> > +}
>
> Why not use the dirty helpers and implement dirty rect support in your
> main plane update function?
Dirty rect support is already there, see above.
So I can just remove cirrus_fb_dirty() and hook up
drm_atomic_helper_dirtyfb() instead....
2019 Apr 03
2
[PATCH] drm/cirrus: rewrite and modernize driver.
...gt;dev->dev_private;
> > +
> > + if (cirrus->pipe.plane.state->fb != fb)
> > + return 0;
> > +
> > + if (num_clips)
> > + cirrus_fb_blit_clips(fb, clips, num_clips);
> > + else
> > + cirrus_fb_blit_fullscreen(fb);
> > + return 0;
> > +}
>
> Why not use the dirty helpers and implement dirty rect support in your
> main plane update function?
Dirty rect support is already there, see above.
So I can just remove cirrus_fb_dirty() and hook up
drm_atomic_helper_dirtyfb() instead....
2020 Feb 11
1
[PATCH v4] drm/cirrus: add drm_driver.release callback.
...memcpy_dstclip(cirrus->vram,
@@ -323,7 +341,12 @@ static int cirrus_fb_blit_rect(struct drm_framebuffer *fb,
WARN_ON_ONCE("cpp mismatch");
drm_gem_shmem_vunmap(fb->obj[0], vmap);
- return 0;
+ ret = 0;
+
+out_dev_exit:
+ drm_dev_exit(idx);
+out:
+ return ret;
}
static int cirrus_fb_blit_fullscreen(struct drm_framebuffer *fb)
@@ -502,6 +525,14 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus)
/* ------------------------------------------------------------------ */
+static void cirrus_release(struct drm_device *dev)
+{
+ struct cirrus_device *cirrus = dev->dev_privat...
2019 Apr 03
0
[PATCH] drm/cirrus: rewrite and modernize driver.
...>>> +
>>> + if (cirrus->pipe.plane.state->fb != fb)
>>> + return 0;
>>> +
>>> + if (num_clips)
>>> + cirrus_fb_blit_clips(fb, clips, num_clips);
>>> + else
>>> + cirrus_fb_blit_fullscreen(fb);
>>> + return 0;
>>> +}
>>
>> Why not use the dirty helpers and implement dirty rect support in your
>> main plane update function?
>
> Dirty rect support is already there, see above.
>
> So I can just remove cirrus_fb_dirty() and hook up...
2020 Apr 15
0
[PATCH 36/59] drm/cirrus: Don't use drm_device->dev_private
...struct drm_crtc_state *crtc_state,
struct drm_plane_state *plane_state)
{
- struct cirrus_device *cirrus = pipe->crtc.dev->dev_private;
+ struct cirrus_device *cirrus = to_cirrus(pipe->crtc.dev);
cirrus_mode_set(cirrus, &crtc_state->mode, plane_state->fb);
cirrus_fb_blit_fullscreen(plane_state->fb);
@@ -445,7 +447,7 @@ static void cirrus_pipe_enable(struct drm_simple_display_pipe *pipe,
static void cirrus_pipe_update(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *old_state)
{
- struct cirrus_device *cirrus = pipe->crtc.dev->dev_private;
+...
2020 Apr 06
0
[PATCH 40/44] drm/cirrus: Don't use drm_device->dev_private
...tate,
> struct drm_plane_state *plane_state)
> {
> - struct cirrus_device *cirrus = pipe->crtc.dev->dev_private;
> + struct cirrus_device *cirrus = to_cirrus(pipe->crtc.dev);
>
> cirrus_mode_set(cirrus, &crtc_state->mode, plane_state->fb);
> cirrus_fb_blit_fullscreen(plane_state->fb);
> @@ -445,7 +447,7 @@ static void cirrus_pipe_enable(struct drm_simple_display_pipe *pipe,
> static void cirrus_pipe_update(struct drm_simple_display_pipe *pipe,
> struct drm_plane_state *old_state)
> {
> - struct cirrus_device *cirrus = pipe->crt...
2020 Feb 11
0
[PATCH v3] drm/cirrus: add drm_driver.release callback.
...memcpy_dstclip(cirrus->vram,
@@ -323,7 +341,12 @@ static int cirrus_fb_blit_rect(struct drm_framebuffer *fb,
WARN_ON_ONCE("cpp mismatch");
drm_gem_shmem_vunmap(fb->obj[0], vmap);
- return 0;
+ ret = 0;
+
+out_dev_exit:
+ drm_dev_exit(idx);
+out:
+ return ret;
}
static int cirrus_fb_blit_fullscreen(struct drm_framebuffer *fb)
@@ -502,6 +525,14 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus)
/* ------------------------------------------------------------------ */
+static void cirrus_release(struct drm_device *dev)
+{
+ struct cirrus_device *cirrus = dev->dev_privat...
2023 Feb 15
17
[PATCH 00/17] cirrus: Modernize the cirrus driver
Update the cirrus driver to follow current best practices. While the
driver's hardware is obsolete, the cirrus driver is still one of the
go-to modules to learn about writing a DRM driver. So keep it in good
shape.
Patches 1 to 3 simplify blitting and convert it to the DRM's current
helpers.
Patches 4 to 8 replace simple-KMS helpers with DRM's regular atomic
helpers. The former are
2019 Apr 03
5
[PATCH] drm/cirrus: rewrite and modernize driver.
...+
+static int cirrus_fb_blit_rect(struct drm_framebuffer *fb,
+ struct drm_rect *rect)
+{
+ struct drm_clip_rect clip_rect = {
+ .x1 = rect->x1,
+ .x2 = rect->x2,
+ .y1 = rect->y1,
+ .y2 = rect->y2,
+ };
+ return cirrus_fb_blit_clips(fb, &clip_rect, 1);
+}
+
+static int cirrus_fb_blit_fullscreen(struct drm_framebuffer *fb)
+{
+ struct drm_clip_rect fullscreen = {
+ .x1 = 0,
+ .x2 = fb->width,
+ .y1 = 0,
+ .y2 = fb->height,
+ };
+ return cirrus_fb_blit_clips(fb, &fullscreen, 1);
+}
+
+static int cirrus_check_size(int width, int height)
+{
+ static const int max_pitch = 0x1FF &...
2019 Apr 03
5
[PATCH] drm/cirrus: rewrite and modernize driver.
...+
+static int cirrus_fb_blit_rect(struct drm_framebuffer *fb,
+ struct drm_rect *rect)
+{
+ struct drm_clip_rect clip_rect = {
+ .x1 = rect->x1,
+ .x2 = rect->x2,
+ .y1 = rect->y1,
+ .y2 = rect->y2,
+ };
+ return cirrus_fb_blit_clips(fb, &clip_rect, 1);
+}
+
+static int cirrus_fb_blit_fullscreen(struct drm_framebuffer *fb)
+{
+ struct drm_clip_rect fullscreen = {
+ .x1 = 0,
+ .x2 = fb->width,
+ .y1 = 0,
+ .y2 = fb->height,
+ };
+ return cirrus_fb_blit_clips(fb, &fullscreen, 1);
+}
+
+static int cirrus_check_size(int width, int height)
+{
+ static const int max_pitch = 0x1FF &...
2019 Apr 03
0
[PATCH] drm/cirrus: rewrite and modernize driver.
...rm_clip_rect clip_rect = {
> + .x1 = rect->x1,
> + .x2 = rect->x2,
> + .y1 = rect->y1,
> + .y2 = rect->y2,
> + };
> + return cirrus_fb_blit_clips(fb, &clip_rect, 1);
> +}
> +
> +static int cirrus_fb_blit_fullscreen(struct drm_framebuffer *fb)
> +{
> + struct drm_clip_rect fullscreen = {
> + .x1 = 0,
> + .x2 = fb->width,
> + .y1 = 0,
> + .y2 = fb->height,
> + };
> + return cirrus_fb_blit_clips(fb, &fulls...
2019 Apr 05
1
[PATCH v3 5/5] drm/cirrus: rewrite and modernize driver.
...ormat->cpp[0] == 4 && cirrus->cpp == 3)
+ drm_fb_xrgb8888_to_rgb888_dstclip(__io_virt(cirrus->vram),
+ cirrus->pitch,
+ vmap, fb, rect);
+
+ else
+ WARN_ON_ONCE("cpp mismatch");
+
+ drm_gem_shmem_vunmap(fb->obj[0], vmap);
+ return 0;
+}
+
+static int cirrus_fb_blit_fullscreen(struct drm_framebuffer *fb)
+{
+ struct drm_rect fullscreen = {
+ .x1 = 0,
+ .x2 = fb->width,
+ .y1 = 0,
+ .y2 = fb->height,
+ };
+ return cirrus_fb_blit_rect(fb, &fullscreen);
+}
+
+static int cirrus_check_size(int width, int height,
+ struct drm_framebuffer *fb)
+{
+ int pitc...
2019 Apr 04
1
[PATCH v2 6/6] drm/cirrus: rewrite and modernize driver.
..., true);
+
+ else if (fb->format->cpp[0] == 4 && cirrus->cpp == 3)
+ drm_fb_xrgb8888_to_rgb888(__io_virt(cirrus->vram),
+ vmap, fb, rect, true);
+
+ else
+ WARN_ON_ONCE("cpp mismatch");
+
+ drm_gem_shmem_vunmap(fb->obj[0], vmap);
+ return 0;
+}
+
+static int cirrus_fb_blit_fullscreen(struct drm_framebuffer *fb)
+{
+ struct drm_rect fullscreen = {
+ .x1 = 0,
+ .x2 = fb->width,
+ .y1 = 0,
+ .y2 = fb->height,
+ };
+ return cirrus_fb_blit_rect(fb, &fullscreen);
+}
+
+static int cirrus_check_size(int width, int height,
+ struct drm_framebuffer *fb)
+{
+ int pitc...