Skip to contentSkip to conversation

drm/amdgpu/display: move link_bandwidth_kbps under CONFIG_DRM_AMD_DC_DCN

PATCH In review Alex Deucher 2 participants 3 messages Nov 30, 2020 – Dec 9, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/display: move link_bandwidth_kbps under CONFIG_DRM_AMD_DC_DCN

It's only used when CONFIG_DRM_AMD_DC_DCN is set. Fixes and set but not used warning.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -4
index 08539f431586..c0e61c13b3fc 100644
@@ -5076,9 +5076,8 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
 	int preferred_refresh = 0;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 	struct dsc_dec_dpcd_caps dsc_caps;
-#endif
 	uint32_t link_bandwidth_kbps;
-
+#endif
 	struct dc_sink *sink = NULL;
 	if (aconnector == NULL) {
 		DRM_ERROR("aconnector is NULL!\n");
@@ -5160,11 +5159,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
 				      aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.raw,
 				      aconnector->dc_link->dpcd_caps.dsc_caps.dsc_branch_decoder_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 (aconnector->dsc_settings.dsc_force_enable != DSC_CLK_FORCE_DISABLE && dsc_caps.is_dsc_supported) {
 			/* Set DSC policy according to dsc_clock_en */
 			dc_dsc_policy_set_enable_dsc_when_not_needed(
Signature · 6 lines
2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

Ping?

Quoted 37 lines · Alex Deucher

It's only used when CONFIG_DRM_AMD_DC_DCN is set. Fixes and set but not used warning.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -5
index 08539f431586..c0e61c13b3fc 100644
@@ -5076,9 +5076,8 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
        int preferred_refresh = 0;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
        struct dsc_dec_dpcd_caps dsc_caps;
-#endif
        uint32_t link_bandwidth_kbps;
-
+#endif
        struct dc_sink *sink = NULL;
        if (aconnector == NULL) {
                DRM_ERROR("aconnector is NULL!\n");
@@ -5160,11 +5159,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
                                      aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.raw,
                                      aconnector->dc_link->dpcd_caps.dsc_caps.dsc_branch_decoder_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 (aconnector->dsc_settings.dsc_force_enable != DSC_CLK_FORCE_DISABLE && dsc_caps.is_dsc_supported) {
                        /* Set DSC policy according to dsc_clock_en */
                        dc_dsc_policy_set_enable_dsc_when_not_needed(
--
Quoted 2 lines

2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Acked-by on v1 1/1
#2 lore raw
In reply to Alex Deucher

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, December 1, 2020 7:59 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/display: move link_bandwidth_kbps under CONFIG_DRM_AMD_DC_DCN

It's only used when CONFIG_DRM_AMD_DC_DCN is set. Fixes and set but not used warning.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -4
index 08539f431586..c0e61c13b3fc 100644
@@ -5076,9 +5076,8 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
 int preferred_refresh = 0;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 struct dsc_dec_dpcd_caps dsc_caps;
-#endif
 uint32_t link_bandwidth_kbps;
-
+#endif
 struct dc_sink *sink = NULL;
 if (aconnector == NULL) {
 DRM_ERROR("aconnector is NULL!\n");
@@ -5160,11 +5159,9 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,
       aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.raw,
       aconnector->dc_link->dpcd_caps.dsc_caps.dsc_branch_decoder_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 (aconnector->dsc_settings.dsc_force_enable != DSC_CLK_FORCE_DISABLE && dsc_caps.is_dsc_supported) {
 /* Set DSC policy according to dsc_clock_en */
 dc_dsc_policy_set_enable_dsc_when_not_needed(

--
2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Cevan.quan%40amd.com%7C3850b95e81794f28290e08d8958beafa%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637423775460610453%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3%2BsZsWzVcX9QT%2Fs%2B%2BEX4VmBQd5bpBkl58uqFawl%2B6f8%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx