forked from Minki/linux
drm/i915: don't use uninitialized EDID bpc values when picking pipe bpp
The EDID parser will zero out the bpc value, and the driver needs to handle that case. In our picker, we'll just ignore 0 values as far as bpp picking goes. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39323. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
9b546e571b
commit
62ac41a6e4
@ -4600,7 +4600,9 @@ static bool intel_choose_pipe_bpp_dither(struct drm_crtc *crtc,
|
|||||||
if (connector->encoder != encoder)
|
if (connector->encoder != encoder)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (connector->display_info.bpc < display_bpc) {
|
/* Don't use an invalid EDID bpc value */
|
||||||
|
if (connector->display_info.bpc &&
|
||||||
|
connector->display_info.bpc < display_bpc) {
|
||||||
DRM_DEBUG_DRIVER("clamping display bpc (was %d) to EDID reported max of %d\n", display_bpc, connector->display_info.bpc);
|
DRM_DEBUG_DRIVER("clamping display bpc (was %d) to EDID reported max of %d\n", display_bpc, connector->display_info.bpc);
|
||||||
display_bpc = connector->display_info.bpc;
|
display_bpc = connector->display_info.bpc;
|
||||||
}
|
}
|
||||||
@ -5215,7 +5217,8 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
|
|||||||
temp |= PIPE_12BPC;
|
temp |= PIPE_12BPC;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WARN(1, "intel_choose_pipe_bpp returned invalid value\n");
|
WARN(1, "intel_choose_pipe_bpp returned invalid value %d\n",
|
||||||
|
pipe_bpp);
|
||||||
temp |= PIPE_8BPC;
|
temp |= PIPE_8BPC;
|
||||||
pipe_bpp = 24;
|
pipe_bpp = 24;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user