Lines Matching refs:wrptr
58 static char *udl_set_base16bpp(char *wrptr, u32 base) in udl_set_base16bpp() argument
61 wrptr = udl_set_register(wrptr, 0x20, base >> 16); in udl_set_base16bpp()
62 wrptr = udl_set_register(wrptr, 0x21, base >> 8); in udl_set_base16bpp()
63 return udl_set_register(wrptr, 0x22, base); in udl_set_base16bpp()
70 static char *udl_set_base8bpp(char *wrptr, u32 base) in udl_set_base8bpp() argument
72 wrptr = udl_set_register(wrptr, 0x26, base >> 16); in udl_set_base8bpp()
73 wrptr = udl_set_register(wrptr, 0x27, base >> 8); in udl_set_base8bpp()
74 return udl_set_register(wrptr, 0x28, base); in udl_set_base8bpp()
77 static char *udl_set_register_16(char *wrptr, u8 reg, u16 value) in udl_set_register_16() argument
79 wrptr = udl_set_register(wrptr, reg, value >> 8); in udl_set_register_16()
80 return udl_set_register(wrptr, reg+1, value); in udl_set_register_16()
87 static char *udl_set_register_16be(char *wrptr, u8 reg, u16 value) in udl_set_register_16be() argument
89 wrptr = udl_set_register(wrptr, reg, value); in udl_set_register_16be()
90 return udl_set_register(wrptr, reg+1, value >> 8); in udl_set_register_16be()
119 static char *udl_set_register_lfsr16(char *wrptr, u8 reg, u16 value) in udl_set_register_lfsr16() argument
121 return udl_set_register_16(wrptr, reg, udl_lfsr16(value)); in udl_set_register_lfsr16()
146 static char *udl_set_vid_cmds(char *wrptr, struct drm_display_mode *mode) in udl_set_vid_cmds() argument
154 wrptr = udl_set_register_lfsr16(wrptr, 0x01, xds); in udl_set_vid_cmds()
157 wrptr = udl_set_register_lfsr16(wrptr, 0x03, xde); in udl_set_vid_cmds()
161 wrptr = udl_set_register_lfsr16(wrptr, 0x05, yds); in udl_set_vid_cmds()
164 wrptr = udl_set_register_lfsr16(wrptr, 0x07, yde); in udl_set_vid_cmds()
167 wrptr = udl_set_register_lfsr16(wrptr, 0x09, in udl_set_vid_cmds()
171 wrptr = udl_set_register_lfsr16(wrptr, 0x0B, 1); in udl_set_vid_cmds()
174 wrptr = udl_set_register_lfsr16(wrptr, 0x0D, in udl_set_vid_cmds()
178 wrptr = udl_set_register_16(wrptr, 0x0F, mode->hdisplay); in udl_set_vid_cmds()
182 wrptr = udl_set_register_lfsr16(wrptr, 0x11, yec); in udl_set_vid_cmds()
185 wrptr = udl_set_register_lfsr16(wrptr, 0x13, 0); in udl_set_vid_cmds()
188 wrptr = udl_set_register_lfsr16(wrptr, 0x15, mode->crtc_vsync_end - mode->crtc_vsync_start); in udl_set_vid_cmds()
191 wrptr = udl_set_register_16(wrptr, 0x17, mode->crtc_vdisplay); in udl_set_vid_cmds()
193 wrptr = udl_set_register_16be(wrptr, 0x1B, in udl_set_vid_cmds()
196 return wrptr; in udl_set_vid_cmds()
199 static char *udl_dummy_render(char *wrptr) in udl_dummy_render() argument
201 *wrptr++ = 0xAF; in udl_dummy_render()
202 *wrptr++ = 0x6A; /* copy */ in udl_dummy_render()
203 *wrptr++ = 0x00; /* from addr */ in udl_dummy_render()
204 *wrptr++ = 0x00; in udl_dummy_render()
205 *wrptr++ = 0x00; in udl_dummy_render()
206 *wrptr++ = 0x01; /* one pixel */ in udl_dummy_render()
207 *wrptr++ = 0x00; /* to address */ in udl_dummy_render()
208 *wrptr++ = 0x00; in udl_dummy_render()
209 *wrptr++ = 0x00; in udl_dummy_render()
210 return wrptr; in udl_dummy_render()
331 char *wrptr; in udl_simple_display_pipe_enable() local
340 wrptr = udl_vidreg_lock(buf); in udl_simple_display_pipe_enable()
341 wrptr = udl_set_color_depth(wrptr, color_depth); in udl_simple_display_pipe_enable()
343 wrptr = udl_set_base16bpp(wrptr, 0); in udl_simple_display_pipe_enable()
345 wrptr = udl_set_base8bpp(wrptr, 2 * mode->vdisplay * mode->hdisplay); in udl_simple_display_pipe_enable()
347 wrptr = udl_set_vid_cmds(wrptr, mode); in udl_simple_display_pipe_enable()
348 wrptr = udl_set_blank_mode(wrptr, UDL_BLANK_MODE_ON); in udl_simple_display_pipe_enable()
349 wrptr = udl_vidreg_unlock(wrptr); in udl_simple_display_pipe_enable()
351 wrptr = udl_dummy_render(wrptr); in udl_simple_display_pipe_enable()
353 udl->mode_buf_len = wrptr - buf; in udl_simple_display_pipe_enable()