Lines Matching defs:cursor

38 /* HW cursor parameters */
357 * @cursor: hardware cursor data
358 * @blank_cursor: blank cursor for hiding cursor
359 * @next_cursor: scratch space to build load cursor
379 /* It's easier to parse the cursor data as little-endian */
380 __le16 cursor[MAX_CURS * MAX_CURS] __aligned(32);
381 /* Blank cursor data -- used to hide the cursor */
383 /* Scratch cursor data -- used to build new cursor */
444 "cursor=%08x curs_pos=%08x diu_mode=%08x bgnd=%08x "
448 hw->palette, hw->cursor, hw->curs_pos, hw->diu_mode,
816 /* Prep for DIU init - gamma table, cursor table */
973 * Copies a cursor image from user space to the proper place in driver
974 * memory so that the hardware can display the cursor image.
978 * second byte, and so on. Therefore, the each row of the cursor is (width +
987 * This could result in an unaligned 32-bit read. For example, if the cursor
989 * the top line of the cursor. We do a 32-bit read of 'image', but we look
1000 __le16 *cursor = data->cursor;
1010 cursor[w] = (line & mask) ? _fg : _bg;
1014 cursor += MAX_CURS;
1020 * Set a hardware cursor. The image data for the cursor is passed via the
1023 static int fsl_diu_cursor(struct fb_info *info, struct fb_cursor *cursor)
1029 if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS)
1032 /* The cursor size has changed */
1033 if (cursor->set & FB_CUR_SETSIZE) {
1035 * The DIU cursor is a fixed size, so when we get this
1036 * message, instead of resizing the cursor, we just clear
1041 memset(data->cursor, 0, sizeof(data->cursor));
1044 /* The cursor position has changed (cursor->image.dx|dy) */
1045 if (cursor->set & FB_CUR_SETPOS) {
1048 yy = (cursor->image.dy - info->var.yoffset) & 0x7ff;
1049 xx = (cursor->image.dx - info->var.xoffset) & 0x7ff;
1055 * FB_CUR_SETIMAGE - the cursor image has changed
1056 * FB_CUR_SETCMAP - the cursor colors has changed
1057 * FB_CUR_SETSHAPE - the cursor bitmask has changed
1059 if (cursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETCMAP | FB_CUR_SETIMAGE)) {
1061 * Determine the size of the cursor image data. Normally,
1065 DIV_ROUND_UP(cursor->image.width, 8) *
1066 cursor->image.height;
1069 unsigned int bg_idx = cursor->image.bg_color;
1070 unsigned int fg_idx = cursor->image.fg_color;
1090 source = (uint32_t *)cursor->image.data;
1091 mask = (uint32_t *)cursor->mask;
1093 if (cursor->rop == ROP_XOR)
1101 cursor->image.width, cursor->image.height);
1105 * Show or hide the cursor. The cursor data is always stored in the
1106 * 'cursor' memory block, and the actual cursor position is always in
1107 * the DIU's CURS_POS register. To hide the cursor, we redirect the
1108 * CURSOR register to a blank cursor. The show the cursor, we
1109 * redirect the CURSOR register to the real cursor data.
1111 if (cursor->enable)
1112 out_be32(&hw->cursor, DMA_ADDR(data, cursor));
1114 out_be32(&hw->cursor, DMA_ADDR(data, blank_cursor));