Lines Matching refs:radeon_crtc

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