Skip to content

Commit 4139916

Browse files
committed
drm/amdgpu: add some comments in DCE6
Signed-off-by: Alexandre Demers <[email protected]>
1 parent a3a24b9 commit 4139916

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

drivers/gpu/drm/amd/amdgpu/dce_v6_0.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ static void dce_v6_0_page_flip(struct amdgpu_device *adev,
206206
/* update the scanout addresses */
207207
WREG32(mmGRPH_PRIMARY_SURFACE_ADDRESS_HIGH + amdgpu_crtc->crtc_offset,
208208
upper_32_bits(crtc_base));
209+
/* writing to the low address triggers the update */
209210
WREG32(mmGRPH_PRIMARY_SURFACE_ADDRESS + amdgpu_crtc->crtc_offset,
210211
(u32)crtc_base);
211-
212212
/* post the write */
213213
RREG32(mmGRPH_PRIMARY_SURFACE_ADDRESS + amdgpu_crtc->crtc_offset);
214214
}
@@ -218,11 +218,11 @@ static int dce_v6_0_crtc_get_scanoutpos(struct amdgpu_device *adev, int crtc,
218218
{
219219
if ((crtc < 0) || (crtc >= adev->mode_info.num_crtc))
220220
return -EINVAL;
221+
221222
*vbl = RREG32(mmCRTC_V_BLANK_START_END + crtc_offsets[crtc]);
222223
*position = RREG32(mmCRTC_STATUS_POSITION + crtc_offsets[crtc]);
223224

224225
return 0;
225-
226226
}
227227

228228
/**
@@ -1006,6 +1006,18 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev,
10061006
}
10071007

10081008
/* watermark setup */
1009+
/**
1010+
* dce_v6_0_line_buffer_adjust - Set up the line buffer
1011+
*
1012+
* @adev: amdgpu_device pointer
1013+
* @amdgpu_crtc: the selected display controller
1014+
* @mode: the current display mode on the selected display
1015+
* controller
1016+
*
1017+
* Setup up the line buffer allocation for
1018+
* the selected display controller (CIK).
1019+
* Returns the line buffer size in pixels.
1020+
*/
10091021
static u32 dce_v6_0_line_buffer_adjust(struct amdgpu_device *adev,
10101022
struct amdgpu_crtc *amdgpu_crtc,
10111023
struct drm_display_mode *mode,
@@ -1386,6 +1398,8 @@ static int dce_v6_0_audio_init(struct amdgpu_device *adev)
13861398
adev->mode_info.audio.pin[i].connected = false;
13871399
adev->mode_info.audio.pin[i].offset = pin_offsets[i];
13881400
adev->mode_info.audio.pin[i].id = i;
1401+
/* disable audio. it will be set up later */
1402+
/* XXX remove once we switch to ip funcs */
13891403
dce_v6_0_audio_enable(adev, &adev->mode_info.audio.pin[i], false);
13901404
}
13911405

0 commit comments

Comments
 (0)