Skip to content

Commit b6a36e5

Browse files
committed
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: f4bd542 ("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
1 parent 8c2ffd9 commit b6a36e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
19631963
best_depth = fmt->depth;
19641964
}
19651965
}
1966-
if (sizes.surface_depth != best_depth) {
1966+
if (sizes.surface_depth != best_depth && best_depth) {
19671967
DRM_INFO("requested bpp %d, scaled depth down to %d",
19681968
sizes.surface_bpp, best_depth);
19691969
sizes.surface_depth = best_depth;

0 commit comments

Comments
 (0)