Lines Matching refs:radeon_crtc
35 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_lock_cursor() local
39 cur_lock = RREG32(EVERGREEN_CUR_UPDATE + radeon_crtc->crtc_offset); in radeon_lock_cursor()
44 WREG32(EVERGREEN_CUR_UPDATE + radeon_crtc->crtc_offset, cur_lock); in radeon_lock_cursor()
46 cur_lock = RREG32(AVIVO_D1CUR_UPDATE + radeon_crtc->crtc_offset); in radeon_lock_cursor()
51 WREG32(AVIVO_D1CUR_UPDATE + radeon_crtc->crtc_offset, cur_lock); in radeon_lock_cursor()
53 cur_lock = RREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset); in radeon_lock_cursor()
58 WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, cur_lock); in radeon_lock_cursor()
64 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_hide_cursor() local
68 WREG32_IDX(EVERGREEN_CUR_CONTROL + radeon_crtc->crtc_offset, in radeon_hide_cursor()
72 WREG32_IDX(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset, in radeon_hide_cursor()
76 switch (radeon_crtc->crtc_id) { in radeon_hide_cursor()
92 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_show_cursor() local
95 if (radeon_crtc->cursor_out_of_bounds) in radeon_show_cursor()
99 WREG32(EVERGREEN_CUR_SURFACE_ADDRESS_HIGH + radeon_crtc->crtc_offset, in radeon_show_cursor()
100 upper_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
101 WREG32(EVERGREEN_CUR_SURFACE_ADDRESS + radeon_crtc->crtc_offset, in radeon_show_cursor()
102 lower_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
103 WREG32(RADEON_MM_INDEX, EVERGREEN_CUR_CONTROL + radeon_crtc->crtc_offset); in radeon_show_cursor()
109 if (radeon_crtc->crtc_id) in radeon_show_cursor()
111 upper_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
114 upper_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
117 WREG32(AVIVO_D1CUR_SURFACE_ADDRESS + radeon_crtc->crtc_offset, in radeon_show_cursor()
118 lower_32_bits(radeon_crtc->cursor_addr)); in radeon_show_cursor()
119 WREG32(RADEON_MM_INDEX, AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset); in radeon_show_cursor()
124 WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, in radeon_show_cursor()
125 radeon_crtc->cursor_addr - radeon_crtc->legacy_display_base_addr); in radeon_show_cursor()
127 switch (radeon_crtc->crtc_id) { in radeon_show_cursor()
146 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_cursor_move_locked() local
149 int w = radeon_crtc->cursor_width; in radeon_cursor_move_locked()
151 radeon_crtc->cursor_x = x; in radeon_cursor_move_locked()
152 radeon_crtc->cursor_y = y; in radeon_cursor_move_locked()
161 xorigin = min(-x, radeon_crtc->max_cursor_width - 1); in radeon_cursor_move_locked()
163 yorigin = min(-y, radeon_crtc->max_cursor_height - 1); in radeon_cursor_move_locked()
209 if (x <= (crtc->x - w) || y <= (crtc->y - radeon_crtc->cursor_height) || in radeon_cursor_move_locked()
218 WREG32(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, (x << 16) | y); in radeon_cursor_move_locked()
219 WREG32(EVERGREEN_CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin); in radeon_cursor_move_locked()
220 WREG32(EVERGREEN_CUR_SIZE + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
221 ((w - 1) << 16) | (radeon_crtc->cursor_height - 1)); in radeon_cursor_move_locked()
223 WREG32(AVIVO_D1CUR_POSITION + radeon_crtc->crtc_offset, (x << 16) | y); in radeon_cursor_move_locked()
224 WREG32(AVIVO_D1CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin); in radeon_cursor_move_locked()
225 WREG32(AVIVO_D1CUR_SIZE + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
226 ((w - 1) << 16) | (radeon_crtc->cursor_height - 1)); in radeon_cursor_move_locked()
234 WREG32(RADEON_CUR_HORZ_VERT_OFF + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
238 WREG32(RADEON_CUR_HORZ_VERT_POSN + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
243 WREG32(RADEON_CUR_OFFSET + radeon_crtc->crtc_offset, in radeon_cursor_move_locked()
244 radeon_crtc->cursor_addr - radeon_crtc->legacy_display_base_addr + in radeon_cursor_move_locked()
248 if (radeon_crtc->cursor_out_of_bounds) { in radeon_cursor_move_locked()
249 radeon_crtc->cursor_out_of_bounds = false; in radeon_cursor_move_locked()
250 if (radeon_crtc->cursor_bo) in radeon_cursor_move_locked()
257 if (!radeon_crtc->cursor_out_of_bounds) { in radeon_cursor_move_locked()
259 radeon_crtc->cursor_out_of_bounds = true; in radeon_cursor_move_locked()
284 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_crtc_cursor_set2() local
297 if ((width > radeon_crtc->max_cursor_width) || in radeon_crtc_cursor_set2()
298 (height > radeon_crtc->max_cursor_height)) { in radeon_crtc_cursor_set2()
305 DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, radeon_crtc->crtc_id); in radeon_crtc_cursor_set2()
318 &radeon_crtc->cursor_addr); in radeon_crtc_cursor_set2()
328 if (width != radeon_crtc->cursor_width || in radeon_crtc_cursor_set2()
329 height != radeon_crtc->cursor_height || in radeon_crtc_cursor_set2()
330 hot_x != radeon_crtc->cursor_hot_x || in radeon_crtc_cursor_set2()
331 hot_y != radeon_crtc->cursor_hot_y) { in radeon_crtc_cursor_set2()
334 x = radeon_crtc->cursor_x + radeon_crtc->cursor_hot_x - hot_x; in radeon_crtc_cursor_set2()
335 y = radeon_crtc->cursor_y + radeon_crtc->cursor_hot_y - hot_y; in radeon_crtc_cursor_set2()
337 radeon_crtc->cursor_width = width; in radeon_crtc_cursor_set2()
338 radeon_crtc->cursor_height = height; in radeon_crtc_cursor_set2()
339 radeon_crtc->cursor_hot_x = hot_x; in radeon_crtc_cursor_set2()
340 radeon_crtc->cursor_hot_y = hot_y; in radeon_crtc_cursor_set2()
350 if (radeon_crtc->cursor_bo) { in radeon_crtc_cursor_set2()
351 struct radeon_bo *robj = gem_to_radeon_bo(radeon_crtc->cursor_bo); in radeon_crtc_cursor_set2()
357 drm_gem_object_put(radeon_crtc->cursor_bo); in radeon_crtc_cursor_set2()
360 radeon_crtc->cursor_bo = obj; in radeon_crtc_cursor_set2()
374 struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); in radeon_cursor_reset() local
376 if (radeon_crtc->cursor_bo) { in radeon_cursor_reset()
379 radeon_cursor_move_locked(crtc, radeon_crtc->cursor_x, in radeon_cursor_reset()
380 radeon_crtc->cursor_y); in radeon_cursor_reset()