[plymouth/f19] drm: use dirty fb ioctl to allow plymouth work on qxl
Dave Airlie
airlied at fedoraproject.org
Fri Mar 15 01:02:25 UTC 2013
commit 40a3c03c336fa239acac642497e6eea64fd565e7
Author: Dave Airlie <airlied at gmail.com>
Date: Fri Mar 15 11:01:42 2013 +1000
drm: use dirty fb ioctl to allow plymouth work on qxl
drm-dirty-fb.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
plymouth.spec | 7 ++++++-
2 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/drm-dirty-fb.patch b/drm-dirty-fb.patch
new file mode 100644
index 0000000..88b43c2
--- /dev/null
+++ b/drm-dirty-fb.patch
@@ -0,0 +1,45 @@
+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
+--- plymouth-0.8.8/src/plugins/renderers/drm/ply-renderer-generic-driver.c.flush 2012-09-27 02:50:53.000000000 +1000
++++ plymouth-0.8.8/src/plugins/renderers/drm/ply-renderer-generic-driver.c 2013-03-15 10:57:33.000000000 +1000
+@@ -70,6 +70,7 @@ struct _ply_renderer_buffer
+ struct _ply_renderer_driver
+ {
+ int device_fd;
++ int need_flushes;
+ ply_hashtable_t *buffers;
+ };
+
+@@ -123,7 +124,7 @@ create_driver (int device_fd)
+
+ driver = calloc (1, sizeof (ply_renderer_driver_t));
+ driver->device_fd = device_fd;
+-
++ driver->need_flushes = 1;
+ driver->buffers = ply_hashtable_new (ply_hashtable_direct_hash,
+ ply_hashtable_direct_compare);
+
+@@ -326,10 +327,23 @@ end_flush (ply_renderer_driver_t *driver
+ uint32_t buffer_id)
+ {
+ ply_renderer_buffer_t *buffer;
++ struct drm_clip_rect clip;
+
+ buffer = get_buffer_from_id (driver, buffer_id);
+-
+ assert (buffer != NULL);
++
++ if (driver->need_flushes) {
++ int ret;
++ clip.x1 = 0;
++ clip.y1 = 0;
++ clip.x2 = buffer->width;
++ clip.y2 = buffer->height;
++
++ ret = drmModeDirtyFB(driver->device_fd, buffer->id,
++ &clip, 1);
++ if (ret == -ENOSYS)
++ driver->need_flushes = 0;
++ }
+ }
+
+ static void
diff --git a/plymouth.spec b/plymouth.spec
index ba2211d..7a1561b 100644
--- a/plymouth.spec
+++ b/plymouth.spec
@@ -6,7 +6,7 @@
Summary: Graphical Boot Animation and Logger
Name: plymouth
Version: 0.8.8
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2
@@ -33,6 +33,7 @@ Obsoletes: plymouth-utils < 0.8.4-0.20101119.4
Patch0: fix-crash.patch
Patch1: fix-fed-up.patch
+Patch2: drm-dirty-fb.patch
%description
Plymouth provides an attractive graphical boot animation in
@@ -243,6 +244,7 @@ Plymouth. It features a small spinner on a dark background.
%setup -q
%patch0 -p1 -b .fix-crash
%patch1 -p1 -b .fix-fed-up
+%patch2 -p1 -b .drm-dirty
# Change the default theme
sed -i -e 's/fade-in/charge/g' src/plymouthd.defaults
@@ -499,6 +501,9 @@ fi
%defattr(-, root, root)
%changelog
+* Fri Mar 15 2013 Dave Airlie <airlied at redhat.com> 0.8.8-7
+- drm: use dirty fb ioctl to allow plymouth work on qxl
+
* Thu Feb 21 2013 Peter Robinson <pbrobinson at fedoraproject.org> 0.8.8-6
- Merge newer F18 release into rawhide
More information about the scm-commits
mailing list