xf86-video-modesetting: src/drmmode_display.c

Dave Airlie airlied at kemper.freedesktop.org
Tue Jun 5 06:43:16 PDT 2012


 src/drmmode_display.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 12c15dd838e9663ffd2f71460feea7b343a7b423
Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Jun 5 14:41:18 2012 +0100

    modesetting: workaround kernel bug reporting 0x0 as valid mins
    
    It reports these but then you can't create a 0 sized bo.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index c0cc06b..185bfe9 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1379,6 +1379,10 @@ void drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int *depth,
 	if (!mode_res)
 		return;
 
+	if (mode_res->min_width == 0)
+		mode_res->min_width = 1;
+	if (mode_res->min_height == 0)
+		mode_res->min_height = 1;
 	/*create a bo */
 	bo = dumb_bo_create(drmmode->fd, mode_res->min_width, mode_res->min_height, 32);
 	if (!bo) {


More information about the xorg-commit mailing list