drm/amdgpu: delete duplicated code.
Subsystems (2)
PATCH 1/2 drm/amdgpu: delete duplicated code.
the variable ref_clock was assigned same
value twice in same function.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +0 -2
@@ -948,7 +948,6 @@ static int amdgpu_cgs_get_active_displays_info(struct cgs_device *cgs_device, (amdgpu_crtc->v_border *2 ); mode_info->vblank_time_us = vblank_lines * line_time_us; mode_info->refresh_rate =drm_mode_vrefresh (&amdgpu_crtc->hw_mode); - mode_info->ref_clock = adev->clock.spll.reference_freq; mode_info =NULL ; } }
@@ -958,7 +957,6 @@ static int amdgpu_cgs_get_active_displays_info(struct cgs_device *cgs_device,if (mode_info !=NULL ) { mode_info->vblank_time_us = adev->pm.pm_display_cfg.min_vblank_time; mode_info->refresh_rate = adev->pm.pm_display_cfg.vrefresh; - mode_info->ref_clock = adev->clock.spll.reference_freq; } }return 0 ;
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/2 drm/amd/powerplay: fix uninitialized variable
In reply to a message not in the archiverefresh_rate was not initialized when program
display gap.
this patch can fix vce ring test failed
when do S3 on Polaris10.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +3 -3
@@ -815,7 +815,7 @@ uint32_t smu7_get_xclk(struct pp_hwmgr *hwmgr) {uint32_t reference_clock, tmp;struct cgs_display_info info = {0 }; -struct cgs_mode_info mode_info; +struct cgs_mode_info mode_info = {0 }; info.mode_info = &mode_info;
@@ -3948,10 +3948,9 @@ static int smu7_program_display_gap(struct pp_hwmgr *hwmgr)uint32_t ref_clock;uint32_t refresh_rate =0 ;struct cgs_display_info info = {0 }; -struct cgs_mode_info mode_info; +struct cgs_mode_info mode_info = {0 }; info.mode_info = &mode_info; -cgs_get_active_displays_info (hwmgr->device, &info); num_active_displays = info.display_count;
@@ -3967,6 +3966,7 @@ static int smu7_program_display_gap(struct pp_hwmgr *hwmgr) frame_time_in_us =1000000 / refresh_rate; pre_vbi_time_in_us = frame_time_in_us -200 - mode_info.vblank_time_us; + data->frame_time_x2 = frame_time_in_us *2 /100 ; display_gap2 = pre_vbi_time_in_us * (ref_clock /100 );
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
Reviewed-byQuoted 5 lines · Rex Zhu
the variable
ref_clockwas assigned same
value twice in same function.Change-Id Id26ec6c8265ba53e0cb84511c825c9a446cb18f9Signed-off-by Rex Zhu <[email protected]>
Quoted 27 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +0
-3@@ -948,7 +948,6 @@ static int amdgpu_cgs_get_active_displays_info(struct cgs_device *cgs_device, (amdgpu_crtc->v_border *2 ); mode_info->vblank_time_us = vblank_lines * line_time_us; mode_info->refresh_rate =drm_mode_vrefresh (&amdgpu_crtc->hw_mode); - mode_info->ref_clock = adev->clock.spll.reference_freq; mode_info =NULL ; } }@@ -958,7 +957,6 @@ static int amdgpu_cgs_get_active_displays_info(struct cgs_device *cgs_device,if (mode_info !=NULL ) { mode_info->vblank_time_us = adev->pm.pm_display_cfg.min_vblank_time; mode_info->refresh_rate = adev->pm.pm_display_cfg.vrefresh; - mode_info->ref_clock = adev->clock.spll.reference_freq; } }return 0 ; --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
Reviewed-byRe: [PATCH 2/2] drm/amd/powerplay: fix uninitialized variable
In reply to a message not in the archiveQuoted 7 lines · Rex Zhu
refresh_ratewas not initialized when program
display gap.
this patch can fix vce ring test failed
when do S3 on Polaris10.Change-Id Ie7bb363a44df0ea5dca3c03b8d884ac42a5db0a7Signed-off-by Rex Zhu <[email protected]>
Quoted 40 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +3
-4@@ -815,7 +815,7 @@ uint32_t smu7_get_xclk(struct pp_hwmgr *hwmgr) {uint32_t reference_clock, tmp;struct cgs_display_info info = {0 }; -struct cgs_mode_info mode_info; +struct cgs_mode_info mode_info = {0 }; info.mode_info = &mode_info;@@ -3948,10 +3948,9 @@ static int smu7_program_display_gap(struct pp_hwmgr *hwmgr)uint32_t ref_clock;uint32_t refresh_rate =0 ;struct cgs_display_info info = {0 }; -struct cgs_mode_info mode_info; +struct cgs_mode_info mode_info = {0 }; info.mode_info = &mode_info; -cgs_get_active_displays_info (hwmgr->device, &info); num_active_displays = info.display_count;@@ -3967,6 +3966,7 @@ static int smu7_program_display_gap(struct pp_hwmgr *hwmgr) frame_time_in_us =1000000 / refresh_rate; pre_vbi_time_in_us = frame_time_in_us -200 - mode_info.vblank_time_us; + data->frame_time_x2 = frame_time_in_us *2 /100 ; display_gap2 = pre_vbi_time_in_us * (ref_clock /100 ); --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx