drm/amdgpu/display: fix build when CONFIG_DRM_AMD_DC_DSC_SUPPORT=n
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 16 Oct 2019 16:12:24 +0000 (12:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Oct 2019 20:30:46 +0000 (16:30 -0400)
Add proper config check.

Reviewed-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

index 555759dabf2722b990a882cf72807d79d6d21720..ee9157b673aba520e6ae6d85540d9d85d8f5b69d 100644 (file)
@@ -1922,8 +1922,10 @@ int dcn20_populate_dml_pipes_from_context(
                        pipes[pipe_cnt].dout.output_bpp = output_bpc * 3;
                }
 
+#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
                if (res_ctx->pipe_ctx[i].stream->timing.flags.DSC)
                        pipes[pipe_cnt].dout.output_bpp = res_ctx->pipe_ctx[i].stream->timing.dsc_cfg.bits_per_pixel / 16.0;
+#endif
 
                /* todo: default max for now, until there is logic reflecting this in dc*/
                pipes[pipe_cnt].dout.output_bpc = 12;