]> git.baikalelectronics.ru Git - kernel.git/commit
drm/fb: avoid setting 0 depth.
authorDave Airlie <airlied@redhat.com>
Fri, 15 Mar 2019 01:46:21 +0000 (11:46 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 24 Mar 2019 23:25:20 +0000 (09:25 +1000)
commit383354f94ab000f23c9b6fec169b1307be9698a9
treeb51310074502049f404a286bb8071001ca8783c7
parent525165e49b28a4616473e397876dd5320cbeb3e0
drm/fb: avoid setting 0 depth.

If the downscaling fails and we end up with a best_depth of 0,
then ignore it.

This actually works around a cascade of failure, but it the
simplest fix for now.

The scaling patch broke the udl driver, as the udl driver doesn't
expose planes at all, so gets the two default 32-bit formats, but
the udl driver then ask for 16bpp fbdev, and the scaling code falls
over.

This fixes the udl driver since the scaled depth support was added.

Fixes: e7c56e33caa4 ("drm/fb-helper: Scale back depth to supported maximum")
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190315014621.21816-2-airlied@gmail.com
drivers/gpu/drm/drm_fb_helper.c