mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
drm/virtio: drop framebuffer dirty tracking code
No need to have our own implementation, atomic helpers can do it for us. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190611125408.29421-1-kraxel@redhat.com
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_damage_helper.h>
|
||||
|
||||
#define XRES_MIN 32
|
||||
#define YRES_MIN 32
|
||||
@@ -49,23 +50,10 @@ static const struct drm_crtc_funcs virtio_gpu_crtc_funcs = {
|
||||
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
|
||||
};
|
||||
|
||||
static int
|
||||
virtio_gpu_framebuffer_surface_dirty(struct drm_framebuffer *fb,
|
||||
struct drm_file *file_priv,
|
||||
unsigned int flags, unsigned int color,
|
||||
struct drm_clip_rect *clips,
|
||||
unsigned int num_clips)
|
||||
{
|
||||
struct virtio_gpu_framebuffer *virtio_gpu_fb
|
||||
= to_virtio_gpu_framebuffer(fb);
|
||||
|
||||
return virtio_gpu_surface_dirty(virtio_gpu_fb, clips, num_clips);
|
||||
}
|
||||
|
||||
static const struct drm_framebuffer_funcs virtio_gpu_fb_funcs = {
|
||||
.create_handle = drm_gem_fb_create_handle,
|
||||
.destroy = drm_gem_fb_destroy,
|
||||
.dirty = virtio_gpu_framebuffer_surface_dirty,
|
||||
.dirty = drm_atomic_helper_dirtyfb,
|
||||
};
|
||||
|
||||
int
|
||||
@@ -85,10 +73,6 @@ virtio_gpu_framebuffer_init(struct drm_device *dev,
|
||||
vgfb->base.obj[0] = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
spin_lock_init(&vgfb->dirty_lock);
|
||||
vgfb->x1 = vgfb->y1 = INT_MAX;
|
||||
vgfb->x2 = vgfb->y2 = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user