From 0400dfeb11c58cce9a9341931ae493a270654edb Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 1 May 2012 12:42:33 -0400 Subject: [PATCH] drm: use queried minimum size, not 1x1 for dummy buffer 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/renderers/drm/plugin.c b/src/plugins/renderers/drm/plugin.c index 7cb70630..ab42d0b6 100644 --- a/src/plugins/renderers/drm/plugin.c +++ b/src/plugins/renderers/drm/plugin.c @@ -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; } -- 2.47.3