drm/amd/pm: Remove wm_low and wm_high fields from amdgpu_crtc (v2)
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 28 Aug 2025 15:11:11 +0000 (17:11 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Sep 2025 19:57:01 +0000 (15:57 -0400)
These fields were only used by si_dpm and are not necessary
anymore. They also may have been incorrect because:
- wm_high was set to the LOW_WATERMARK field of watermark A.
- wm_low was not set on DCE 6 and was always zero.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c

index 6da4f94..20460cf 100644 (file)
@@ -496,8 +496,6 @@ struct amdgpu_crtc {
        struct drm_connector *connector;
        /* for dpm */
        u32 line_time;
-       u32 wm_low;
-       u32 wm_high;
        u32 lb_vblank_lead_lines;
        struct drm_display_mode hw_mode;
        /* for virtual dce */
index ba73518..72ca653 100644 (file)
@@ -1141,8 +1141,7 @@ static void dce_v10_0_program_watermarks(struct amdgpu_device *adev,
 
        /* save values for DPM */
        amdgpu_crtc->line_time = line_time;
-       amdgpu_crtc->wm_high = latency_watermark_a;
-       amdgpu_crtc->wm_low = latency_watermark_b;
+
        /* Save number of lines the linebuffer leads before the scanout */
        amdgpu_crtc->lb_vblank_lead_lines = lb_vblank_lead_lines;
 }
index b01d88d..e846088 100644 (file)
@@ -1173,8 +1173,7 @@ static void dce_v11_0_program_watermarks(struct amdgpu_device *adev,
 
        /* save values for DPM */
        amdgpu_crtc->line_time = line_time;
-       amdgpu_crtc->wm_high = latency_watermark_a;
-       amdgpu_crtc->wm_low = latency_watermark_b;
+
        /* Save number of lines the linebuffer leads before the scanout */
        amdgpu_crtc->lb_vblank_lead_lines = lb_vblank_lead_lines;
 }
index 81760a2..acc887a 100644 (file)
@@ -1034,7 +1034,6 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev,
 
        /* save values for DPM */
        amdgpu_crtc->line_time = line_time;
-       amdgpu_crtc->wm_high = latency_watermark_a;
 
        /* Save number of lines the linebuffer leads before the scanout */
        amdgpu_crtc->lb_vblank_lead_lines = lb_vblank_lead_lines;
index 19a265b..2ccd6aa 100644 (file)
@@ -1096,8 +1096,7 @@ static void dce_v8_0_program_watermarks(struct amdgpu_device *adev,
 
        /* save values for DPM */
        amdgpu_crtc->line_time = line_time;
-       amdgpu_crtc->wm_high = latency_watermark_a;
-       amdgpu_crtc->wm_low = latency_watermark_b;
+
        /* Save number of lines the linebuffer leads before the scanout */
        amdgpu_crtc->lb_vblank_lead_lines = lb_vblank_lead_lines;
 }