diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-10-07 23:20:45 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-10-14 16:16:31 -0400 |
commit | ec9353dca9a02b429f31ac58ec7b55ee61757441 (patch) | |
tree | 02101e220b4ca40a14146684ba03e54e2b2d1a81 /drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | |
parent | 232cc6520a6c84a3e5acd075605ddc1bca6bd157 (diff) |
drm/amdgpu/dce11: Fold set_cursor() into show_cursor()
Port of radeon commit:
8991668ab4e26f985a8485719bce5d6d0623a644
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_v11_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index 5a1ee25380b0..378932a2c2a8 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | |||
@@ -2476,6 +2476,11 @@ static void dce_v11_0_show_cursor(struct drm_crtc *crtc) | |||
2476 | struct amdgpu_device *adev = crtc->dev->dev_private; | 2476 | struct amdgpu_device *adev = crtc->dev->dev_private; |
2477 | u32 tmp; | 2477 | u32 tmp; |
2478 | 2478 | ||
2479 | WREG32(mmCUR_SURFACE_ADDRESS_HIGH + amdgpu_crtc->crtc_offset, | ||
2480 | upper_32_bits(amdgpu_crtc->cursor_addr)); | ||
2481 | WREG32(mmCUR_SURFACE_ADDRESS + amdgpu_crtc->crtc_offset, | ||
2482 | lower_32_bits(amdgpu_crtc->cursor_addr)); | ||
2483 | |||
2479 | tmp = RREG32_IDX(mmCUR_CONTROL + amdgpu_crtc->crtc_offset); | 2484 | tmp = RREG32_IDX(mmCUR_CONTROL + amdgpu_crtc->crtc_offset); |
2480 | tmp = REG_SET_FIELD(tmp, CUR_CONTROL, CURSOR_EN, 1); | 2485 | tmp = REG_SET_FIELD(tmp, CUR_CONTROL, CURSOR_EN, 1); |
2481 | tmp = REG_SET_FIELD(tmp, CUR_CONTROL, CURSOR_MODE, 2); | 2486 | tmp = REG_SET_FIELD(tmp, CUR_CONTROL, CURSOR_MODE, 2); |
@@ -2514,17 +2519,6 @@ static int dce_v11_0_cursor_move_locked(struct drm_crtc *crtc, | |||
2514 | return 0; | 2519 | return 0; |
2515 | } | 2520 | } |
2516 | 2521 | ||
2517 | static void dce_v11_0_set_cursor(struct drm_crtc *crtc) | ||
2518 | { | ||
2519 | struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); | ||
2520 | struct amdgpu_device *adev = crtc->dev->dev_private; | ||
2521 | |||
2522 | WREG32(mmCUR_SURFACE_ADDRESS_HIGH + amdgpu_crtc->crtc_offset, | ||
2523 | upper_32_bits(amdgpu_crtc->cursor_addr)); | ||
2524 | WREG32(mmCUR_SURFACE_ADDRESS + amdgpu_crtc->crtc_offset, | ||
2525 | lower_32_bits(amdgpu_crtc->cursor_addr)); | ||
2526 | } | ||
2527 | |||
2528 | static int dce_v11_0_crtc_cursor_move(struct drm_crtc *crtc, | 2522 | static int dce_v11_0_crtc_cursor_move(struct drm_crtc *crtc, |
2529 | int x, int y) | 2523 | int x, int y) |
2530 | { | 2524 | { |
@@ -2602,7 +2596,6 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc, | |||
2602 | amdgpu_crtc->cursor_hot_y = hot_y; | 2596 | amdgpu_crtc->cursor_hot_y = hot_y; |
2603 | } | 2597 | } |
2604 | 2598 | ||
2605 | dce_v11_0_set_cursor(crtc); | ||
2606 | dce_v11_0_show_cursor(crtc); | 2599 | dce_v11_0_show_cursor(crtc); |
2607 | dce_v11_0_lock_cursor(crtc, false); | 2600 | dce_v11_0_lock_cursor(crtc, false); |
2608 | 2601 | ||
@@ -2631,7 +2624,6 @@ static void dce_v11_0_cursor_reset(struct drm_crtc *crtc) | |||
2631 | dce_v11_0_cursor_move_locked(crtc, amdgpu_crtc->cursor_x, | 2624 | dce_v11_0_cursor_move_locked(crtc, amdgpu_crtc->cursor_x, |
2632 | amdgpu_crtc->cursor_y); | 2625 | amdgpu_crtc->cursor_y); |
2633 | 2626 | ||
2634 | dce_v11_0_set_cursor(crtc); | ||
2635 | dce_v11_0_show_cursor(crtc); | 2627 | dce_v11_0_show_cursor(crtc); |
2636 | 2628 | ||
2637 | dce_v11_0_lock_cursor(crtc, false); | 2629 | dce_v11_0_lock_cursor(crtc, false); |