mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-05 19:40:15 +01:00
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>
This commit is contained in:
parent
e07c945ab9
commit
ec79187d9a
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue