|
|
6cc380 |
diff -up plymouth-0.8.8/src/plugins/renderers/drm/ply-renderer-generic-driver.c.flush plymouth-0.8.8/src/plugins/renderers/drm/ply-renderer-generic-driver.c
|
|
|
6cc380 |
--- plymouth-0.8.8/src/plugins/renderers/drm/ply-renderer-generic-driver.c.flush 2012-09-27 02:50:53.000000000 +1000
|
|
|
6cc380 |
+++ plymouth-0.8.8/src/plugins/renderers/drm/ply-renderer-generic-driver.c 2013-03-15 10:57:33.000000000 +1000
|
|
|
6cc380 |
@@ -70,6 +70,7 @@ struct _ply_renderer_buffer
|
|
|
6cc380 |
struct _ply_renderer_driver
|
|
|
6cc380 |
{
|
|
|
6cc380 |
int device_fd;
|
|
|
6cc380 |
+ int need_flushes;
|
|
|
6cc380 |
ply_hashtable_t *buffers;
|
|
|
6cc380 |
};
|
|
|
6cc380 |
|
|
|
6cc380 |
@@ -123,7 +124,7 @@ create_driver (int device_fd)
|
|
|
6cc380 |
|
|
|
6cc380 |
driver = calloc (1, sizeof (ply_renderer_driver_t));
|
|
|
6cc380 |
driver->device_fd = device_fd;
|
|
|
6cc380 |
-
|
|
|
6cc380 |
+ driver->need_flushes = 1;
|
|
|
6cc380 |
driver->buffers = ply_hashtable_new (ply_hashtable_direct_hash,
|
|
|
6cc380 |
ply_hashtable_direct_compare);
|
|
|
6cc380 |
|
|
|
6cc380 |
@@ -326,10 +327,23 @@ end_flush (ply_renderer_driver_t *driver
|
|
|
6cc380 |
uint32_t buffer_id)
|
|
|
6cc380 |
{
|
|
|
6cc380 |
ply_renderer_buffer_t *buffer;
|
|
|
6cc380 |
+ struct drm_clip_rect clip;
|
|
|
6cc380 |
|
|
|
6cc380 |
buffer = get_buffer_from_id (driver, buffer_id);
|
|
|
6cc380 |
-
|
|
|
6cc380 |
assert (buffer != NULL);
|
|
|
6cc380 |
+
|
|
|
6cc380 |
+ if (driver->need_flushes) {
|
|
|
6cc380 |
+ int ret;
|
|
|
6cc380 |
+ clip.x1 = 0;
|
|
|
6cc380 |
+ clip.y1 = 0;
|
|
|
6cc380 |
+ clip.x2 = buffer->width;
|
|
|
6cc380 |
+ clip.y2 = buffer->height;
|
|
|
6cc380 |
+
|
|
|
6cc380 |
+ ret = drmModeDirtyFB(driver->device_fd, buffer->id,
|
|
|
6cc380 |
+ &clip, 1);
|
|
|
6cc380 |
+ if (ret == -ENOSYS)
|
|
|
6cc380 |
+ driver->need_flushes = 0;
|
|
|
6cc380 |
+ }
|
|
|
6cc380 |
}
|
|
|
6cc380 |
|
|
|
6cc380 |
static void
|