Lines Matching refs:radeon_crtc
33 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_lock_cursor() local
37 cur_lock = RREG32(EVERGREEN_CUR_UPDATE + radeon_crtc->crtc_offset); in radeon_lock_cursor()
42 WREG32(EVERGREEN_CUR_UPDATE + radeon_crtc->crtc_offset, cur_lock); in radeon_lock_cursor()
44 cur_lock = RREG32(AVIVO_D1CUR_UPDATE + radeon_crtc->crtc_offset); in radeon_lock_cursor()
49 WREG32(AVIVO_D1CUR_UPDATE + radeon_crtc->crtc_offset, cur_lock); in radeon_lock_cursor()
51 cur_lock = RREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset); in radeon_lock_cursor()
56 WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, cur_lock); in radeon_lock_cursor()
62 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_hide_cursor() local
66 WREG32_IDX(EVERGREEN_CUR_CONTROL + radeon_crtc->crtc_offset, in radeon_hide_cursor()
70 WREG32_IDX(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset, in radeon_hide_cursor()
74 switch (radeon_crtc->crtc_id) { in radeon_hide_cursor()
90 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_show_cursor() local
94 WREG32(EVERGREEN_CUR_SURFACE_ADDRESS_HIGH + radeon_crtc->crtc_offset, in radeon_show_cursor()
95 upper_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
96 WREG32(EVERGREEN_CUR_SURFACE_ADDRESS + radeon_crtc->crtc_offset, in radeon_show_cursor()
97 lower_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
98 WREG32(RADEON_MM_INDEX, EVERGREEN_CUR_CONTROL + radeon_crtc->crtc_offset); in radeon_show_cursor()
104 if (radeon_crtc->crtc_id) in radeon_show_cursor()
106 upper_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
109 upper_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
112 WREG32(AVIVO_D1CUR_SURFACE_ADDRESS + radeon_crtc->crtc_offset, in radeon_show_cursor()
113 lower_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
114 WREG32(RADEON_MM_INDEX, AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset); in radeon_show_cursor()
119 WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, in radeon_show_cursor()
120 radeon_crtc->cursor_addr - radeon_crtc->legacy_display_base_addr); in radeon_show_cursor()
122 switch (radeon_crtc->crtc_id) { in radeon_show_cursor()
141 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_cursor_move_locked() local
144 int w = radeon_crtc->cursor_width; in radeon_cursor_move_locked()
154 xorigin = min(-x, radeon_crtc->max_cursor_width - 1); in radeon_cursor_move_locked()
158 yorigin = min(-y, radeon_crtc->max_cursor_height - 1); in radeon_cursor_move_locked()
205 WREG32(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, (x << 16) | y); in radeon_cursor_move_locked()
206 WREG32(EVERGREEN_CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin); in radeon_cursor_move_locked()
207 WREG32(EVERGREEN_CUR_SIZE + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
208 ((w - 1) << 16) | (radeon_crtc->cursor_height - 1)); in radeon_cursor_move_locked()
210 WREG32(AVIVO_D1CUR_POSITION + radeon_crtc->crtc_offset, (x << 16) | y); in radeon_cursor_move_locked()
211 WREG32(AVIVO_D1CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin); in radeon_cursor_move_locked()
212 WREG32(AVIVO_D1CUR_SIZE + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
213 ((w - 1) << 16) | (radeon_crtc->cursor_height - 1)); in radeon_cursor_move_locked()
218 WREG32(RADEON_CUR_HORZ_VERT_OFF + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
222 WREG32(RADEON_CUR_HORZ_VERT_POSN + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
227 WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
228 radeon_crtc->cursor_addr - radeon_crtc->legacy_display_base_addr + in radeon_cursor_move_locked()
232 radeon_crtc->cursor_x = x; in radeon_cursor_move_locked()
233 radeon_crtc->cursor_y = y; in radeon_cursor_move_locked()
258 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_crtc_cursor_set2() local
271 if ((width > radeon_crtc->max_cursor_width) || in radeon_crtc_cursor_set2()
272 (height > radeon_crtc->max_cursor_height)) { in radeon_crtc_cursor_set2()
279 DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, radeon_crtc->crtc_id); in radeon_crtc_cursor_set2()
292 &radeon_crtc->cursor_addr); in radeon_crtc_cursor_set2()
300 radeon_crtc->cursor_width = width; in radeon_crtc_cursor_set2()
301 radeon_crtc->cursor_height = height; in radeon_crtc_cursor_set2()
305 if (hot_x != radeon_crtc->cursor_hot_x || in radeon_crtc_cursor_set2()
306 hot_y != radeon_crtc->cursor_hot_y) { in radeon_crtc_cursor_set2()
309 x = radeon_crtc->cursor_x + radeon_crtc->cursor_hot_x - hot_x; in radeon_crtc_cursor_set2()
310 y = radeon_crtc->cursor_y + radeon_crtc->cursor_hot_y - hot_y; in radeon_crtc_cursor_set2()
314 radeon_crtc->cursor_hot_x = hot_x; in radeon_crtc_cursor_set2()
315 radeon_crtc->cursor_hot_y = hot_y; in radeon_crtc_cursor_set2()
323 if (radeon_crtc->cursor_bo) { in radeon_crtc_cursor_set2()
324 struct radeon_bo *robj = gem_to_radeon_bo(radeon_crtc->cursor_bo); in radeon_crtc_cursor_set2()
330 drm_gem_object_unreference_unlocked(radeon_crtc->cursor_bo); in radeon_crtc_cursor_set2()
333 radeon_crtc->cursor_bo = obj; in radeon_crtc_cursor_set2()
347 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_cursor_reset() local
349 if (radeon_crtc->cursor_bo) { in radeon_cursor_reset()
352 radeon_cursor_move_locked(crtc, radeon_crtc->cursor_x, in radeon_cursor_reset()
353 radeon_crtc->cursor_y); in radeon_cursor_reset()