Commit aa8e286a authored by Samuel Li's avatar Samuel Li Committed by Alex Deucher

drm/amdgpu: rename amdgpu_get_crtc_scanoutpos

Add display to the name for consistency.
Signed-off-by: default avatarSamuel Li <Samuel.Li@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0c16443a
...@@ -90,7 +90,7 @@ static void amdgpu_display_flip_work_func(struct work_struct *__work) ...@@ -90,7 +90,7 @@ static void amdgpu_display_flip_work_func(struct work_struct *__work)
* targeted by the flip * targeted by the flip
*/ */
if (amdgpu_crtc->enabled && if (amdgpu_crtc->enabled &&
(amdgpu_get_crtc_scanoutpos(adev->ddev, work->crtc_id, 0, (amdgpu_display_get_crtc_scanoutpos(adev->ddev, work->crtc_id, 0,
&vpos, &hpos, NULL, NULL, &vpos, &hpos, NULL, NULL,
&crtc->hwmode) &crtc->hwmode)
& (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK)) == & (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK)) ==
...@@ -781,9 +781,9 @@ bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc, ...@@ -781,9 +781,9 @@ bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
* unknown small number of scanlines wrt. real scanout position. * unknown small number of scanlines wrt. real scanout position.
* *
*/ */
int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe, int amdgpu_display_get_crtc_scanoutpos(struct drm_device *dev,
unsigned int flags, int *vpos, int *hpos, unsigned int pipe, unsigned int flags, int *vpos,
ktime_t *stime, ktime_t *etime, int *hpos, ktime_t *stime, ktime_t *etime,
const struct drm_display_mode *mode) const struct drm_display_mode *mode)
{ {
u32 vbl = 0, position = 0; u32 vbl = 0, position = 0;
......
...@@ -837,7 +837,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe, ...@@ -837,7 +837,7 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
ktime_t *stime, ktime_t *etime, ktime_t *stime, ktime_t *etime,
const struct drm_display_mode *mode) const struct drm_display_mode *mode)
{ {
return amdgpu_get_crtc_scanoutpos(dev, pipe, 0, vpos, hpos, return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, hpos,
stime, etime, mode); stime, etime, mode);
} }
......
...@@ -980,11 +980,11 @@ u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe) ...@@ -980,11 +980,11 @@ u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
*/ */
do { do {
count = amdgpu_display_vblank_get_counter(adev, pipe); count = amdgpu_display_vblank_get_counter(adev, pipe);
/* Ask amdgpu_get_crtc_scanoutpos to return vpos as /* Ask amdgpu_display_get_crtc_scanoutpos to return
* distance to start of vblank, instead of regular * vpos as distance to start of vblank, instead of
* vertical scanout pos. * regular vertical scanout pos.
*/ */
stat = amdgpu_get_crtc_scanoutpos( stat = amdgpu_display_get_crtc_scanoutpos(
dev, pipe, GET_DISTANCE_TO_VBLANKSTART, dev, pipe, GET_DISTANCE_TO_VBLANKSTART,
&vpos, &hpos, NULL, NULL, &vpos, &hpos, NULL, NULL,
&adev->mode_info.crtcs[pipe]->base.hwmode); &adev->mode_info.crtcs[pipe]->base.hwmode);
......
...@@ -608,7 +608,7 @@ struct amdgpu_mst_connector { ...@@ -608,7 +608,7 @@ struct amdgpu_mst_connector {
#define ENCODER_MODE_IS_DP(em) (((em) == ATOM_ENCODER_MODE_DP) || \ #define ENCODER_MODE_IS_DP(em) (((em) == ATOM_ENCODER_MODE_DP) || \
((em) == ATOM_ENCODER_MODE_DP_MST)) ((em) == ATOM_ENCODER_MODE_DP_MST))
/* Driver internal use only flags of amdgpu_get_crtc_scanoutpos() */ /* Driver internal use only flags of amdgpu_display_get_crtc_scanoutpos() */
#define DRM_SCANOUTPOS_VALID (1 << 0) #define DRM_SCANOUTPOS_VALID (1 << 0)
#define DRM_SCANOUTPOS_IN_VBLANK (1 << 1) #define DRM_SCANOUTPOS_IN_VBLANK (1 << 1)
#define DRM_SCANOUTPOS_ACCURATE (1 << 2) #define DRM_SCANOUTPOS_ACCURATE (1 << 2)
...@@ -632,9 +632,9 @@ bool amdgpu_display_ddc_probe(struct amdgpu_connector *amdgpu_connector, ...@@ -632,9 +632,9 @@ bool amdgpu_display_ddc_probe(struct amdgpu_connector *amdgpu_connector,
void amdgpu_encoder_set_active_device(struct drm_encoder *encoder); void amdgpu_encoder_set_active_device(struct drm_encoder *encoder);
int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe, int amdgpu_display_get_crtc_scanoutpos(struct drm_device *dev,
unsigned int flags, int *vpos, int *hpos, unsigned int pipe, unsigned int flags, int *vpos,
ktime_t *stime, ktime_t *etime, int *hpos, ktime_t *stime, ktime_t *etime,
const struct drm_display_mode *mode); const struct drm_display_mode *mode);
int amdgpu_display_framebuffer_init(struct drm_device *dev, int amdgpu_display_framebuffer_init(struct drm_device *dev,
......
...@@ -3906,9 +3906,9 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc, ...@@ -3906,9 +3906,9 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc,
* targeted by the flip * targeted by the flip
*/ */
while ((acrtc->enabled && while ((acrtc->enabled &&
(amdgpu_get_crtc_scanoutpos(adev->ddev, acrtc->crtc_id, 0, (amdgpu_display_get_crtc_scanoutpos(adev->ddev, acrtc->crtc_id,
&vpos, &hpos, NULL, NULL, 0, &vpos, &hpos, NULL,
&crtc->hwmode) NULL, &crtc->hwmode)
& (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK)) == & (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK)) ==
(DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK) && (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK) &&
(int)(target_vblank - (int)(target_vblank -
......
...@@ -152,7 +152,7 @@ struct dc_stream_state *dc_get_stream_at_index(struct dc *dc, uint8_t i); ...@@ -152,7 +152,7 @@ struct dc_stream_state *dc_get_stream_at_index(struct dc *dc, uint8_t i);
uint32_t dc_stream_get_vblank_counter(const struct dc_stream_state *stream); uint32_t dc_stream_get_vblank_counter(const struct dc_stream_state *stream);
/* TODO: Return parsed values rather than direct register read /* TODO: Return parsed values rather than direct register read
* This has a dependency on the caller (amdgpu_get_crtc_scanoutpos) * This has a dependency on the caller (amdgpu_display_get_crtc_scanoutpos)
* being refactored properly to be dce-specific * being refactored properly to be dce-specific
*/ */
bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream, bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment