Skip to contentSkip to conversation

drm/amd/display: avoid variable reinitialization

PATCH Applied Bragatheswaran Manickavel 2 participants 4 messages Oct 24, 2023 – Nov 6, 2023

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

PATCH 1/1 drm/amd/display: avoid variable reinitialization

The member variable enable_hpo_pg_support is already initialized and hence the reinitialization instruction can be removed. Issue identified using the doubleinit.cocci Coccinelle semantic patch script.

---
 drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +0 -1
index 99d55b958977..1fd9df8da09c 100644
@@ -739,7 +739,6 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.disable_boot_optimizations = false,
 	.disable_unbounded_requesting = false,
 	.disable_mem_low_power = false,
-	.enable_hpo_pg_support = false,
 	//must match enable_single_display_2to1_odm_policy to support dynamic ODM transitions
 	.enable_double_buffered_dsc_pg_support = true,
 	.enable_dp_dig_pixel_rate_div_policy = 1,
Signature · 1 line
2.34.1
#1 lore raw
Quoted 14 lines · Bragatheswaran Manickavel

The member variable enable_hpo_pg_support is already initialized and hence the reinitialization instruction can be removed. Issue identified using the doubleinit.cocci Coccinelle semantic patch script.

---
  drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +0 -0
index 99d55b958977..1fd9df8da09c 100644

drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c static const struct dc_debug_options debug_defaults_drv = { · line 744

Quoted 7 lines
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +0 -1
@@ -739,7 +739,6 @@ static const struct dc_debug_options debug_defaults_drv = {
  	.disable_boot_optimizations = false,
  	.disable_unbounded_requesting = false,
  	.disable_mem_low_power = false,
-	.enable_hpo_pg_support = false,
  	//must match enable_single_display_2to1_odm_policy to support dynamic ODM transitions
  	.enable_double_buffered_dsc_pg_support = true,
  	.enable_dp_dig_pixel_rate_div_policy = 1,

just a friendly ping

Thanks,
Bragathe

#2 lore raw
Quoted 28 lines · Bragatheswaran Manickavel
Quoted 21 lines · Bragatheswaran Manickavel

The member variable enable_hpo_pg_support is already initialized and hence the reinitialization instruction can be removed. Issue identified using the doubleinit.cocci Coccinelle semantic patch script.

---
  drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 1 -

  1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +0 -1
index 99d55b958977..1fd9df8da09c 100644
@@ -739,7 +739,6 @@ static const struct dc_debug_options 
 debug_defaults_drv = {
       .disable_boot_optimizations = false,
       .disable_unbounded_requesting = false,
       .disable_mem_low_power = false,
-    .enable_hpo_pg_support = false,
       //must match enable_single_display_2to1_odm_policy to support dynamic ODM transitions
       .enable_double_buffered_dsc_pg_support = true,
Quoted 1 line

      .enable_dp_dig_pixel_rate_div_policy = 1,

just a friendly ping

Quoted 3 lines

Thanks,
Bragathe

Could someone help me in reviewing this changes ?

Thanks,
Bragathe

Applied
#3 lore raw
In reply to Bragatheswaran Manickavel

Applied. Thanks!

Quoted 25 lines · Bragatheswaran Manickavel

The member variable enable_hpo_pg_support is already initialized and hence the reinitialization instruction can be removed. Issue identified using the doubleinit.cocci Coccinelle semantic patch script.

---
 drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +0 -2
index 99d55b958977..1fd9df8da09c 100644
@@ -739,7 +739,6 @@ static const struct dc_debug_options debug_defaults_drv = {
        .disable_boot_optimizations = false,
        .disable_unbounded_requesting = false,
        .disable_mem_low_power = false,
-       .enable_hpo_pg_support = false,
        //must match enable_single_display_2to1_odm_policy to support dynamic ODM transitions
        .enable_double_buffered_dsc_pg_support = true,
        .enable_dp_dig_pixel_rate_div_policy = 1,
--

2.34.1