[PATCH] drm/amd/display: avoid variable reinitialization

Bragatheswaran Manickavel posted 1 patch 1 year, 10 months ago
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] drm/amd/display: avoid variable reinitialization
Posted by Bragatheswaran Manickavel 1 year, 10 months ago
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.

Signed-off-by: Bragatheswaran Manickavel <bragathemanick0908@gmail.com>
---
 drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
index 99d55b958977..1fd9df8da09c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
@@ -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
Re: [PATCH] drm/amd/display: avoid variable reinitialization
Posted by Alex Deucher 1 year, 10 months ago
Applied.  Thanks!

On Tue, Oct 24, 2023 at 2:11 PM Bragatheswaran Manickavel
<bragathemanick0908@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Bragatheswaran Manickavel <bragathemanick0908@gmail.com>
> ---
>  drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
> index 99d55b958977..1fd9df8da09c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
> @@ -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
>
Re: [PATCH] drm/amd/display: avoid variable reinitialization
Posted by Bragatheswaran Manickavel 1 year, 10 months ago
On 24/10/23 23:41, Bragatheswaran Manickavel wrote:
> 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.
>
> Signed-off-by: Bragatheswaran Manickavel <bragathemanick0908@gmail.com>
> ---
>   drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
> index 99d55b958977..1fd9df8da09c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
> @@ -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
Re: [PATCH] drm/amd/display: avoid variable reinitialization
Posted by Bragatheswaran Manickavel 1 year, 10 months ago
On 30/10/23 20:17, Bragatheswaran Manickavel wrote:
>
> On 24/10/23 23:41, Bragatheswaran Manickavel wrote:
>> 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.
>>
>> Signed-off-by: Bragatheswaran Manickavel <bragathemanick0908@gmail.com>
>> ---
>>   drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c 
>> b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
>> index 99d55b958977..1fd9df8da09c 100644
>> --- a/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
>> +++ b/drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
>> @@ -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
>
Could someone help me in reviewing this changes ?

Thanks,
Bragathe