Skip to contentSkip to conversation

drm/amd/display: Remove duplicated code

PATCH In review Ray Wu 3 participants 3 messages Sep 8, 2025

Subsystems (3)
lore
Share & tools
lore

Ray Wu

author
#0 lore raw

PATCH 1/1 drm/amd/display: Remove duplicated code

[Why&How]
Remove duplicated code

---
 drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 3 ---
 .../gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c   | 3 ---
 drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c | 3 ---
 3 files changed, 9 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +0 -3
index 8475c6eec547..1d1a002f6d54 100644
@@ -1900,9 +1900,6 @@ static bool dcn35_resource_construct(
 	dc->caps.num_of_host_routers = 2;
 	dc->caps.num_of_dpias_per_host_router = 2;
 
-	dc->caps.num_of_host_routers = 2;
-	dc->caps.num_of_dpias_per_host_router = 2;
-
 	/* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
 	 * to provide some margin.
 	 * It's expected for furture ASIC to have equal or higher value, in order to
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +0 -3
index 0971c0f74186..47912e0861a2 100644
@@ -1872,9 +1872,6 @@ static bool dcn351_resource_construct(
 	dc->caps.num_of_host_routers = 2;
 	dc->caps.num_of_dpias_per_host_router = 2;
 
-	dc->caps.num_of_host_routers = 2;
-	dc->caps.num_of_dpias_per_host_router = 2;
-
 	/* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
 	 * to provide some margin.
 	 * It's expected for furture ASIC to have equal or higher value, in order to
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +0 -3
index 8bae7fcedc22..9ba91e214dda 100644
@@ -1873,9 +1873,6 @@ static bool dcn36_resource_construct(
 	dc->caps.num_of_host_routers = 2;
 	dc->caps.num_of_dpias_per_host_router = 2;
 
-	dc->caps.num_of_host_routers = 2;
-	dc->caps.num_of_dpias_per_host_router = 2;
-
 	/* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
 	 * to provide some margin.
 	 * It's expected for furture ASIC to have equal or higher value, in order to
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Patch looks good to me.
Thanks.

Quoted 52 lines · Ray Wu

[Why&How]
Remove duplicated code

---
  drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 3 ---
  .../gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c   | 3 ---
  drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c | 3 ---
  3 files changed, 9 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +0 -3
index 8475c6eec547..1d1a002f6d54 100644
@@ -1900,9 +1900,6 @@ static bool dcn35_resource_construct(
  	dc->caps.num_of_host_routers = 2;
  	dc->caps.num_of_dpias_per_host_router = 2;
 
-	dc->caps.num_of_host_routers = 2;
-	dc->caps.num_of_dpias_per_host_router = 2;
-
  	/* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
  	 * to provide some margin.
  	 * It's expected for furture ASIC to have equal or higher value, in order to
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +0 -3
index 0971c0f74186..47912e0861a2 100644
@@ -1872,9 +1872,6 @@ static bool dcn351_resource_construct(
  	dc->caps.num_of_host_routers = 2;
  	dc->caps.num_of_dpias_per_host_router = 2;
 
-	dc->caps.num_of_host_routers = 2;
-	dc->caps.num_of_dpias_per_host_router = 2;
-
  	/* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
  	 * to provide some margin.
  	 * It's expected for furture ASIC to have equal or higher value, in order to
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +0 -3
index 8bae7fcedc22..9ba91e214dda 100644
@@ -1873,9 +1873,6 @@ static bool dcn36_resource_construct(
  	dc->caps.num_of_host_routers = 2;
  	dc->caps.num_of_dpias_per_host_router = 2;
 
-	dc->caps.num_of_host_routers = 2;
-	dc->caps.num_of_dpias_per_host_router = 2;
-
  	/* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
  	 * to provide some margin.
  	 * It's expected for furture ASIC to have equal or higher value, in order to
Reviewed-by on v1 1/1
#2 lore raw
In reply to Ray Wu
Quoted 5 lines · Ray Wu

[Why&How]
Remove duplicated code

Quoted 51 lines
---
 drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 3 ---
 .../gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c   | 3 ---
 drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c | 3 ---
 3 files changed, 9 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +0 -3
index 8475c6eec547..1d1a002f6d54 100644
@@ -1900,9 +1900,6 @@ static bool dcn35_resource_construct(
        dc->caps.num_of_host_routers = 2;
        dc->caps.num_of_dpias_per_host_router = 2;
 
-       dc->caps.num_of_host_routers = 2;
-       dc->caps.num_of_dpias_per_host_router = 2;
-
        /* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
         * to provide some margin.
         * It's expected for furture ASIC to have equal or higher value, in order to
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +0 -3
index 0971c0f74186..47912e0861a2 100644
@@ -1872,9 +1872,6 @@ static bool dcn351_resource_construct(
        dc->caps.num_of_host_routers = 2;
        dc->caps.num_of_dpias_per_host_router = 2;
 
-       dc->caps.num_of_host_routers = 2;
-       dc->caps.num_of_dpias_per_host_router = 2;
-
        /* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
         * to provide some margin.
         * It's expected for furture ASIC to have equal or higher value, in order to
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +0 -4
index 8bae7fcedc22..9ba91e214dda 100644
@@ -1873,9 +1873,6 @@ static bool dcn36_resource_construct(
        dc->caps.num_of_host_routers = 2;
        dc->caps.num_of_dpias_per_host_router = 2;
 
-       dc->caps.num_of_host_routers = 2;
-       dc->caps.num_of_dpias_per_host_router = 2;
-
        /* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
         * to provide some margin.
         * It's expected for furture ASIC to have equal or higher value, in order to
--

2.43.0