diff options
author | 2019-08-17 08:17:34 +0000 | |
---|---|---|
committer | 2019-08-17 08:17:34 +0000 | |
commit | 67dad36eec184656754de0f8fc470afff2280baa (patch) | |
tree | ef8c8a0c928d76194af3a3232c2cea1d85a56e9a | |
parent | drm/amd/display: use encoder's engine id to find matched free audio device (diff) | |
download | wireguard-openbsd-67dad36eec184656754de0f8fc470afff2280baa.tar.xz wireguard-openbsd-67dad36eec184656754de0f8fc470afff2280baa.zip |
drm/amd/display: Fix dc_create failure handling and 666 color depths
From Julian Parkin
3998e684463a7fa1721c171172ca085978d03a00 in linux 4.19.y/4.19.67
0905f32977268149f06e3ce6ea4bd6d374dd891f in mainline linux
-rw-r--r-- | sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/amd/display/dc/core/dc_resource.c | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c index e3f5e5d6f0c..f4b89d1ea6f 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c +++ b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c @@ -462,8 +462,10 @@ void dc_link_set_test_pattern(struct dc_link *link, static void destruct(struct dc *dc) { - dc_release_state(dc->current_state); - dc->current_state = NULL; + if (dc->current_state) { + dc_release_state(dc->current_state); + dc->current_state = NULL; + } destroy_links(dc); diff --git a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c b/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c index 69a4f52aa38..60ccfa833ab 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c +++ b/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c @@ -1872,6 +1872,7 @@ static int get_norm_pix_clk(const struct dc_crtc_timing *timing) pix_clk /= 2; if (timing->pixel_encoding != PIXEL_ENCODING_YCBCR422) { switch (timing->display_color_depth) { + case COLOR_DEPTH_666: case COLOR_DEPTH_888: normalized_pix_clk = pix_clk; break; |