drm/amdgpu/display: fix the build when CONFIG_DRM_AMD_DC_DCN is not set
Subsystems (3)
PATCH 1/1 drm/amdgpu/display: fix the build when CONFIG_DRM_AMD_DC_DCN is not set
Need to protect some DSC functions.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +6 -0
@@ -3891,7 +3891,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,bool scale = dm_state ? (dm_state->scaling !=RMX_OFF ) : false;int mode_refresh;int preferred_refresh =0 ; +#if defined(CONFIG_DRM_AMD_DC_DCN )struct dsc_dec_dpcd_caps dsc_caps; +#endif uint32_t link_bandwidth_kbps;struct dc_sink *sink =NULL ;
@@ -3970,12 +3972,15 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, stream->timing.flags.DSC =0 ;if (aconnector->dc_link && sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT ) { +#if defined(CONFIG_DRM_AMD_DC_DCN )dc_dsc_parse_dsc_dpcd (aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.raw, aconnector->dc_link->dpcd_caps.dsc_caps.dsc_ext_caps.raw, &dsc_caps); +#endif link_bandwidth_kbps =dc_link_bandwidth_kbps (aconnector->dc_link,dc_link_get_link_cap (aconnector->dc_link)); +#if defined(CONFIG_DRM_AMD_DC_DCN )if (dsc_caps.is_dsc_supported) if (dc_dsc_compute_config(aconnector->dc_link->ctx->dc->res_pool->dscs[0], &dsc_caps,
@@ -3984,6 +3989,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, &stream->timing, &stream->timing.dsc_cfg)) stream->timing.flags.DSC =1 ; +#endif }update_stream_scaling_settings (&mode, dm_state, stream);
Signature · 6 lines
2.23.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191107015258.807545-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Harry Wentland
Reviewed-byQuoted 3 lines · Alex Deucher
Need to protect some DSC functions.
Signed-off-by Alex Deucher <[email protected]>
Reviewed-by Harry Wentland <[email protected]>
Harry
Quoted 36 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5
-0@@ -3891,7 +3891,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,bool scale = dm_state ? (dm_state->scaling !=RMX_OFF ) : false;int mode_refresh;int preferred_refresh =0 ; +#if defined(CONFIG_DRM_AMD_DC_DCN )struct dsc_dec_dpcd_caps dsc_caps; +#endif uint32_t link_bandwidth_kbps;struct dc_sink *sink =NULL ;@@ -3970,12 +3972,15 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, stream->timing.flags.DSC =0 ;if (aconnector->dc_link && sink->sink_signal ==SIGNAL_TYPE_DISPLAY_PORT ) { +#if defined(CONFIG_DRM_AMD_DC_DCN )dc_dsc_parse_dsc_dpcd (aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.raw, aconnector->dc_link->dpcd_caps.dsc_caps.dsc_ext_caps.raw, &dsc_caps); +#endif link_bandwidth_kbps =dc_link_bandwidth_kbps (aconnector->dc_link,dc_link_get_link_cap (aconnector->dc_link)); +#if defined(CONFIG_DRM_AMD_DC_DCN )if (dsc_caps.is_dsc_supported) if (dc_dsc_compute_config(aconnector->dc_link->ctx->dc->res_pool->dscs[0], &dsc_caps,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c create_stream_for_sink(struct amdgpu_dm_connector *aconnector, · line 3995
Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1
-0@@ -3984,6 +3989,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector, &stream->timing, &stream->timing.dsc_cfg)) stream->timing.flags.DSC =1 ; +#endif }update_stream_scaling_settings (&mode, dm_state, stream);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx