summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-06-05 14:41:18 +0100
committerDave Airlie <airlied@redhat.com>2012-06-05 14:41:18 +0100
commit12c15dd838e9663ffd2f71460feea7b343a7b423 (patch)
tree9c991dc04bde599ec2ee84d2aa4cc71f8a9e8077
parente59b40a88b7e9ec11ec6e87106ef0bbc66238d69 (diff)
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@redhat.com>
-rw-r--r--src/drmmode_display.c4
1 files changed, 4 insertions, 0 deletions
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) {