]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
drm: use queried minimum size, not 1x1 for dummy buffer
authorRay Strode <rstrode@redhat.com>
Tue, 1 May 2012 16:42:33 +0000 (12:42 -0400)
committerRay Strode <rstrode@redhat.com>
Tue, 1 May 2012 16:42:33 +0000 (12:42 -0400)
The previous commit tries to create a 32bpp 1x1 dummy buffer
to know whether or not the modesetting driver can handle
our needs.  It's concievable (though not realized in practice) that
the driver could support our needs fine, but not support buffers
as small as 1x1.

This commit uses the queried minimum buffer dimensions for the dummy
buffer instead of assuming 1x1.

src/plugins/renderers/drm/plugin.c

index 7cb706307cff815f84a37557dffe6f282d87ab62..ab42d0b66945d61f40ca5185185f35eb56a05b47 100644 (file)
@@ -867,12 +867,15 @@ has_32bpp_support (ply_renderer_backend_t *backend)
     unsigned long row_stride;
 
     buffer_id = backend->driver_interface->create_buffer (backend->driver,
-                                                          1, 1,
+                                                          backend->resources->min_width,
+                                                          backend->resources->min_height,
                                                           &row_stride);
 
     if (buffer_id == 0)
       {
-        ply_trace ("Could not create 1x1 32bpp dummy buffer");
+        ply_trace ("Could not create minimal (%ux%u) 32bpp dummy buffer",
+                    backend->resources->min_width,
+                    backend->resources->min_height);
         return false;
       }