Lines Matching refs:crtc

51 xf86_crtc_cursor_rotation(xf86CrtcPtr crtc)  in xf86_crtc_cursor_rotation()  argument
53 if (crtc->driverIsPerformingTransform & XF86DriverTransformCursorImage) in xf86_crtc_cursor_rotation()
55 return crtc->rotation; in xf86_crtc_cursor_rotation()
212 xf86_driver_has_show_cursor(xf86CrtcPtr crtc) in xf86_driver_has_show_cursor() argument
214 return crtc->funcs->show_cursor_check || crtc->funcs->show_cursor; in xf86_driver_has_show_cursor()
218 xf86_driver_has_load_cursor_image(xf86CrtcPtr crtc) in xf86_driver_has_load_cursor_image() argument
220 return crtc->funcs->load_cursor_image_check || crtc->funcs->load_cursor_image; in xf86_driver_has_load_cursor_image()
224 xf86_driver_has_load_cursor_argb(xf86CrtcPtr crtc) in xf86_driver_has_load_cursor_argb() argument
226 return crtc->funcs->load_cursor_argb_check || crtc->funcs->load_cursor_argb; in xf86_driver_has_load_cursor_argb()
230 xf86_driver_show_cursor(xf86CrtcPtr crtc) in xf86_driver_show_cursor() argument
232 if (crtc->funcs->show_cursor_check) in xf86_driver_show_cursor()
233 return crtc->funcs->show_cursor_check(crtc); in xf86_driver_show_cursor()
234 crtc->funcs->show_cursor(crtc); in xf86_driver_show_cursor()
239 xf86_driver_load_cursor_image(xf86CrtcPtr crtc, CARD8 *cursor_image) in xf86_driver_load_cursor_image() argument
241 if (crtc->funcs->load_cursor_image_check) in xf86_driver_load_cursor_image()
242 return crtc->funcs->load_cursor_image_check(crtc, cursor_image); in xf86_driver_load_cursor_image()
243 crtc->funcs->load_cursor_image(crtc, cursor_image); in xf86_driver_load_cursor_image()
248 xf86_driver_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *cursor_argb) in xf86_driver_load_cursor_argb() argument
250 if (crtc->funcs->load_cursor_argb_check) in xf86_driver_load_cursor_argb()
251 return crtc->funcs->load_cursor_argb_check(crtc, cursor_argb); in xf86_driver_load_cursor_argb()
252 crtc->funcs->load_cursor_argb(crtc, cursor_argb); in xf86_driver_load_cursor_argb()
260 xf86_crtc_convert_cursor_to_argb(xf86CrtcPtr crtc, unsigned char *src) in xf86_crtc_convert_cursor_to_argb() argument
262 ScrnInfoPtr scrn = crtc->scrn; in xf86_crtc_convert_cursor_to_argb()
270 const Rotation rotation = xf86_crtc_cursor_rotation(crtc); in xf86_crtc_convert_cursor_to_argb()
272 crtc->cursor_argb = FALSE; in xf86_crtc_convert_cursor_to_argb()
290 return xf86_driver_load_cursor_argb(crtc, cursor_image); in xf86_crtc_convert_cursor_to_argb()
312 xf86CrtcPtr crtc = xf86_config->crtc[c]; in xf86_set_cursor_colors() local
314 if (crtc->enabled && !crtc->cursor_argb) { in xf86_set_cursor_colors()
315 if (xf86_driver_has_load_cursor_image(crtc)) in xf86_set_cursor_colors()
316 crtc->funcs->set_cursor_colors(crtc, bg, fg); in xf86_set_cursor_colors()
318 xf86_crtc_convert_cursor_to_argb(crtc, bits); in xf86_set_cursor_colors()
324 xf86_crtc_hide_cursor(xf86CrtcPtr crtc) in xf86_crtc_hide_cursor() argument
326 if (crtc->cursor_shown) { in xf86_crtc_hide_cursor()
327 crtc->funcs->hide_cursor(crtc); in xf86_crtc_hide_cursor()
328 crtc->cursor_shown = FALSE; in xf86_crtc_hide_cursor()
340 xf86CrtcPtr crtc = xf86_config->crtc[c]; in xf86_hide_cursors() local
342 if (crtc->enabled) in xf86_hide_cursors()
343 xf86_crtc_hide_cursor(crtc); in xf86_hide_cursors()
348 xf86_crtc_show_cursor(xf86CrtcPtr crtc) in xf86_crtc_show_cursor() argument
350 if (!crtc->cursor_in_range) { in xf86_crtc_show_cursor()
351 crtc->funcs->hide_cursor(crtc); in xf86_crtc_show_cursor()
355 if (!crtc->cursor_shown) in xf86_crtc_show_cursor()
356 crtc->cursor_shown = xf86_driver_show_cursor(crtc); in xf86_crtc_show_cursor()
358 return crtc->cursor_shown; in xf86_crtc_show_cursor()
369 xf86CrtcPtr crtc = xf86_config->crtc[c]; in xf86_show_cursors() local
371 if (crtc->enabled && !xf86_crtc_show_cursor(crtc)) in xf86_show_cursors()
379 xf86_crtc_transform_cursor_position(xf86CrtcPtr crtc, int *x, int *y) in xf86_crtc_transform_cursor_position() argument
381 ScrnInfoPtr scrn = crtc->scrn; in xf86_crtc_transform_cursor_position()
391 *x = *x - crtc->x + ScreenPriv->HotX; in xf86_crtc_transform_cursor_position()
392 *y = *y - crtc->y + ScreenPriv->HotY; in xf86_crtc_transform_cursor_position()
394 switch (crtc->rotation & 0xf) { in xf86_crtc_transform_cursor_position()
400 *y = crtc->mode.VDisplay - t - 1; in xf86_crtc_transform_cursor_position()
404 *x = crtc->mode.HDisplay - *x - 1; in xf86_crtc_transform_cursor_position()
405 *y = crtc->mode.VDisplay - *y - 1; in xf86_crtc_transform_cursor_position()
409 *x = crtc->mode.HDisplay - *y - 1; in xf86_crtc_transform_cursor_position()
416 if (crtc->rotation & RR_Reflect_Y) in xf86_crtc_transform_cursor_position()
417 *x = crtc->mode.HDisplay - *x - 1; in xf86_crtc_transform_cursor_position()
418 if (crtc->rotation & RR_Reflect_X) in xf86_crtc_transform_cursor_position()
419 *y = crtc->mode.VDisplay - *y - 1; in xf86_crtc_transform_cursor_position()
421 if (crtc->rotation & RR_Reflect_X) in xf86_crtc_transform_cursor_position()
422 *x = crtc->mode.HDisplay - *x - 1; in xf86_crtc_transform_cursor_position()
423 if (crtc->rotation & RR_Reflect_Y) in xf86_crtc_transform_cursor_position()
424 *y = crtc->mode.VDisplay - *y - 1; in xf86_crtc_transform_cursor_position()
430 xf86_crtc_rotate_coord_back(crtc->rotation, cursor_info->MaxWidth, in xf86_crtc_transform_cursor_position()
438 xf86_crtc_set_cursor_position(xf86CrtcPtr crtc, int x, int y) in xf86_crtc_set_cursor_position() argument
440 ScrnInfoPtr scrn = crtc->scrn; in xf86_crtc_set_cursor_position()
443 DisplayModePtr mode = &crtc->mode; in xf86_crtc_set_cursor_position()
449 if (crtc->rotation != RR_Rotate_0) in xf86_crtc_set_cursor_position()
450 xf86_crtc_transform_cursor_position(crtc, &crtc_x, &crtc_y); in xf86_crtc_set_cursor_position()
452 crtc_x -= crtc->x; in xf86_crtc_set_cursor_position()
453 crtc_y -= crtc->y; in xf86_crtc_set_cursor_position()
461 crtc->cursor_in_range = FALSE; in xf86_crtc_set_cursor_position()
462 xf86_crtc_hide_cursor(crtc); in xf86_crtc_set_cursor_position()
464 crtc->cursor_in_range = TRUE; in xf86_crtc_set_cursor_position()
465 if (crtc->driverIsPerformingTransform & XF86DriverTransformCursorPosition) in xf86_crtc_set_cursor_position()
466 crtc->funcs->set_cursor_position(crtc, x, y); in xf86_crtc_set_cursor_position()
468 crtc->funcs->set_cursor_position(crtc, crtc_x, crtc_y); in xf86_crtc_set_cursor_position()
469 xf86_crtc_show_cursor(crtc); in xf86_crtc_set_cursor_position()
483 xf86CrtcPtr crtc = xf86_config->crtc[c]; in xf86_set_cursor_position() local
485 if (crtc->enabled) in xf86_set_cursor_position()
486 xf86_crtc_set_cursor_position(crtc, x, y); in xf86_set_cursor_position()
494 xf86_crtc_load_cursor_image(xf86CrtcPtr crtc, CARD8 *src) in xf86_crtc_load_cursor_image() argument
496 ScrnInfoPtr scrn = crtc->scrn; in xf86_crtc_load_cursor_image()
500 const Rotation rotation = xf86_crtc_cursor_rotation(crtc); in xf86_crtc_load_cursor_image()
502 crtc->cursor_argb = FALSE; in xf86_crtc_load_cursor_image()
526 return xf86_driver_load_cursor_image(crtc, cursor_image); in xf86_crtc_load_cursor_image()
540 xf86CrtcPtr crtc = xf86_config->crtc[c]; in xf86_load_cursor_image() local
542 if (crtc->enabled) { in xf86_load_cursor_image()
543 if (xf86_driver_has_load_cursor_image(crtc)) { in xf86_load_cursor_image()
544 if (!xf86_crtc_load_cursor_image(crtc, src)) in xf86_load_cursor_image()
546 } else if (xf86_driver_has_load_cursor_argb(crtc)) { in xf86_load_cursor_image()
547 if (!xf86_crtc_convert_cursor_to_argb(crtc, src)) in xf86_load_cursor_image()
569 xf86CrtcPtr crtc = xf86_config->crtc[c]; in xf86_use_hw_cursor() local
571 if (!crtc->enabled) in xf86_use_hw_cursor()
574 if (crtc->transformPresent) in xf86_use_hw_cursor()
599 xf86_crtc_load_cursor_argb(xf86CrtcPtr crtc, CursorPtr cursor) in xf86_crtc_load_cursor_argb() argument
601 ScrnInfoPtr scrn = crtc->scrn; in xf86_crtc_load_cursor_argb()
613 const Rotation rotation = xf86_crtc_cursor_rotation(crtc); in xf86_crtc_load_cursor_argb()
626 return xf86_driver_load_cursor_argb(crtc, cursor_image); in xf86_crtc_load_cursor_argb()
637 xf86CrtcPtr crtc = xf86_config->crtc[c]; in xf86_load_cursor_argb() local
639 if (crtc->enabled) in xf86_load_cursor_argb()
640 if (!xf86_crtc_load_cursor_argb(crtc, cursor)) in xf86_load_cursor_argb()