Lines Matching full:cursor

45 	/* for unref'ing cursor bo's after scanout completes: */
57 /* protect REG_MDP5_LM_CURSOR* registers and cursor scanout_bo*/
60 /* current cursor being scanned out: */
65 } cursor; member
550 * Restore LM cursor state, as it might have been lost in mdp5_crtc_atomic_enable()
553 if (mdp5_crtc->cursor.iova) { in mdp5_crtc_atomic_enable()
556 spin_lock_irqsave(&mdp5_crtc->cursor.lock, flags); in mdp5_crtc_atomic_enable()
558 spin_unlock_irqrestore(&mdp5_crtc->cursor.lock, flags); in mdp5_crtc_atomic_enable()
761 /* trigger a warning if cursor isn't the highest zorder */ in mdp5_crtc_atomic_check()
849 * Cursor Region Of Interest (ROI) is a plane read from cursor in get_roi()
851 * the cursor point. In the default Cursor image the cursor point will in get_roi()
852 * be at the top left of the cursor image. in get_roi()
855 * If the cursor point reaches the right (xres - x < cursor.width) or in get_roi()
856 * bottom (yres - y < cursor.height) boundary of the screen, then ROI in get_roi()
857 * width and ROI height need to be evaluated to crop the cursor image in get_roi()
859 * (xres-x) will be new cursor width when x > (xres - cursor.width) in get_roi()
860 * (yres-y) will be new cursor height when y > (yres - cursor.height) in get_roi()
864 * (cursor.width - abs(x)) will be new cursor width when x < 0 in get_roi()
865 * (cursor.height - abs(y)) will be new cursor width when y < 0 in get_roi()
867 if (mdp5_crtc->cursor.x >= 0) in get_roi()
868 *roi_w = min(mdp5_crtc->cursor.width, xres - in get_roi()
869 mdp5_crtc->cursor.x); in get_roi()
871 *roi_w = mdp5_crtc->cursor.width - abs(mdp5_crtc->cursor.x); in get_roi()
872 if (mdp5_crtc->cursor.y >= 0) in get_roi()
873 *roi_h = min(mdp5_crtc->cursor.height, yres - in get_roi()
874 mdp5_crtc->cursor.y); in get_roi()
876 *roi_h = mdp5_crtc->cursor.height - abs(mdp5_crtc->cursor.y); in get_roi()
891 assert_spin_locked(&mdp5_crtc->cursor.lock); in mdp5_crtc_restore_cursor()
895 x = mdp5_crtc->cursor.x; in mdp5_crtc_restore_cursor()
896 y = mdp5_crtc->cursor.y; in mdp5_crtc_restore_cursor()
897 width = mdp5_crtc->cursor.width; in mdp5_crtc_restore_cursor()
898 height = mdp5_crtc->cursor.height; in mdp5_crtc_restore_cursor()
906 * the cursor buffer of the ROI is the positive overlap in mdp5_crtc_restore_cursor()
909 if (mdp5_crtc->cursor.x < 0) { in mdp5_crtc_restore_cursor()
910 src_x = abs(mdp5_crtc->cursor.x); in mdp5_crtc_restore_cursor()
915 if (mdp5_crtc->cursor.y < 0) { in mdp5_crtc_restore_cursor()
916 src_y = abs(mdp5_crtc->cursor.y); in mdp5_crtc_restore_cursor()
940 mdp5_crtc->cursor.iova); in mdp5_crtc_restore_cursor()
967 "cursor_set is deprecated with cursor planes\n"); in mdp5_crtc_cursor_set()
972 DRM_DEV_ERROR(dev->dev, "bad cursor size: %dx%d\n", width, height); in mdp5_crtc_cursor_set()
985 DBG("Cursor off"); in mdp5_crtc_cursor_set()
987 mdp5_crtc->cursor.iova = 0; in mdp5_crtc_cursor_set()
997 &mdp5_crtc->cursor.iova); in mdp5_crtc_cursor_set()
1005 spin_lock_irqsave(&mdp5_crtc->cursor.lock, flags); in mdp5_crtc_cursor_set()
1006 old_bo = mdp5_crtc->cursor.scanout_bo; in mdp5_crtc_cursor_set()
1008 mdp5_crtc->cursor.scanout_bo = cursor_bo; in mdp5_crtc_cursor_set()
1009 mdp5_crtc->cursor.width = width; in mdp5_crtc_cursor_set()
1010 mdp5_crtc->cursor.height = height; in mdp5_crtc_cursor_set()
1014 spin_unlock_irqrestore(&mdp5_crtc->cursor.lock, flags); in mdp5_crtc_cursor_set()
1019 DRM_DEV_ERROR(dev->dev, "failed to %sable cursor: %d\n", in mdp5_crtc_cursor_set()
1030 /* enable vblank to complete cursor work: */ in mdp5_crtc_cursor_set()
1049 "cursor_move is deprecated with cursor planes\n"); in mdp5_crtc_cursor_move()
1057 /* In case the CRTC is disabled, just drop the cursor update */ in mdp5_crtc_cursor_move()
1061 /* accept negative x/y coordinates up to maximum cursor overlap */ in mdp5_crtc_cursor_move()
1062 mdp5_crtc->cursor.x = x = max(x, -(int)mdp5_crtc->cursor.width); in mdp5_crtc_cursor_move()
1063 mdp5_crtc->cursor.y = y = max(y, -(int)mdp5_crtc->cursor.height); in mdp5_crtc_cursor_move()
1069 spin_lock_irqsave(&mdp5_crtc->cursor.lock, flags); in mdp5_crtc_cursor_move()
1071 spin_unlock_irqrestore(&mdp5_crtc->cursor.lock, flags); in mdp5_crtc_cursor_move()
1341 spin_lock_init(&mdp5_crtc->cursor.lock); in mdp5_crtc_init()
1351 "unref cursor", unref_cursor_worker); in mdp5_crtc_init()