Lines Matching +full:xlen +full:- +full:1
1 // SPDX-License-Identifier: GPL-2.0-only
6 * (c) 1998-2002 Petr Vandrovec <vandrove@vc.cvut.cz>
31 * "Gerd Knorr" <kraxel@goldbach.isdn.cs.tu-berlin.de>
55 * "Ulf Jaenicke-Roessler" <ujr@physik.phy.tu-dresden.de>
71 * (c) 1998 Gerd Knorr <kraxel@cs.tu-berlin.de>
85 #define curr_ydstorg(x) ((x)->curr.ydstorg.pixels)
120 mpitch = minfo->fbcon.var.xres_virtual; in matrox_cfbX_init()
122 minfo->fbops.fb_copyarea = cfb_copyarea; in matrox_cfbX_init()
123 minfo->fbops.fb_fillrect = cfb_fillrect; in matrox_cfbX_init()
124 minfo->fbops.fb_imageblit = cfb_imageblit; in matrox_cfbX_init()
125 minfo->fbops.fb_cursor = NULL; in matrox_cfbX_init()
127 accel = (minfo->fbcon.var.accel_flags & FB_ACCELF_TEXT) == FB_ACCELF_TEXT; in matrox_cfbX_init()
129 switch (minfo->fbcon.var.bits_per_pixel) { in matrox_cfbX_init()
131 mpitch = (mpitch >> 1) | 0x8000; /* disable linearization */ in matrox_cfbX_init()
133 matrox_cfb4_pal(minfo->cmap); in matrox_cfbX_init()
134 if (accel && !(mpitch & 1)) { in matrox_cfbX_init()
135 minfo->fbops.fb_copyarea = matroxfb_cfb4_copyarea; in matrox_cfbX_init()
136 minfo->fbops.fb_fillrect = matroxfb_cfb4_fillrect; in matrox_cfbX_init()
141 matrox_cfb8_pal(minfo->cmap); in matrox_cfbX_init()
143 minfo->fbops.fb_copyarea = matroxfb_copyarea; in matrox_cfbX_init()
144 minfo->fbops.fb_fillrect = matroxfb_fillrect; in matrox_cfbX_init()
145 minfo->fbops.fb_imageblit = matroxfb_imageblit; in matrox_cfbX_init()
148 case 16: if (minfo->fbcon.var.green.length == 5) in matrox_cfbX_init()
154 minfo->fbops.fb_copyarea = matroxfb_copyarea; in matrox_cfbX_init()
155 minfo->fbops.fb_fillrect = matroxfb_fillrect; in matrox_cfbX_init()
156 minfo->fbops.fb_imageblit = matroxfb_imageblit; in matrox_cfbX_init()
162 minfo->fbops.fb_copyarea = matroxfb_copyarea; in matrox_cfbX_init()
163 minfo->fbops.fb_fillrect = matroxfb_fillrect; in matrox_cfbX_init()
164 minfo->fbops.fb_imageblit = matroxfb_imageblit; in matrox_cfbX_init()
170 minfo->fbops.fb_copyarea = matroxfb_copyarea; in matrox_cfbX_init()
171 minfo->fbops.fb_fillrect = matroxfb_fillrect; in matrox_cfbX_init()
172 minfo->fbops.fb_imageblit = matroxfb_imageblit; in matrox_cfbX_init()
182 if (minfo->capable.plnwt) in matrox_cfbX_init()
183 mga_outl(M_PLNWT, -1); in matrox_cfbX_init()
184 if (minfo->capable.srcorg) { in matrox_cfbX_init()
193 …minfo->accel.m_dwg_rect = M_DWG_TRAP | M_DWG_SOLID | M_DWG_ARZERO | M_DWG_SGNZERO | M_DWG_SHIFTZER… in matrox_cfbX_init()
194 if (isMilleniumII(minfo)) minfo->accel.m_dwg_rect |= M_DWG_TRANSC; in matrox_cfbX_init()
195 minfo->accel.m_opmode = mopmode; in matrox_cfbX_init()
196 minfo->accel.m_access = maccess; in matrox_cfbX_init()
197 minfo->accel.m_pitch = mpitch; in matrox_cfbX_init()
204 mga_outl(M_MACCESS, minfo->accel.m_access); in matrox_accel_restore_maccess()
205 mga_outl(M_PITCH, minfo->accel.m_pitch); in matrox_accel_restore_maccess()
224 width--; in matrox_accel_bmove()
232 mga_outl(M_AR5, -vxres); in matrox_accel_bmove()
233 width--; in matrox_accel_bmove()
234 end = (sy+height-1)*vxres+sx+curr_ydstorg(minfo); in matrox_accel_bmove()
236 dy += height-1; in matrox_accel_bmove()
266 width--; in matrox_accel_bmove_lin()
274 mga_outl(M_AR5, -vxres); in matrox_accel_bmove_lin()
275 width--; in matrox_accel_bmove_lin()
276 end = (sy+height-1)*vxres+sx+curr_ydstorg(minfo); in matrox_accel_bmove_lin()
278 dy += height-1; in matrox_accel_bmove_lin()
295 if ((area->sx | area->dx | area->width) & 1) in matroxfb_cfb4_copyarea()
298 …move_lin(minfo, minfo->fbcon.var.xres_virtual >> 1, area->sy, area->sx >> 1, area->dy, area->dx >>… in matroxfb_cfb4_copyarea()
304 …matrox_accel_bmove(minfo, minfo->fbcon.var.xres_virtual, area->sy, area->sx, area->dy, area->dx, a… in matroxfb_copyarea()
318 mga_outl(M_DWGCTL, minfo->accel.m_dwg_rect | M_DWG_REPLACE); in matroxfb_accel_clear()
330 switch (rect->rop) { in matroxfb_fillrect()
332 …xfb_accel_clear(minfo, ((u_int32_t *)info->pseudo_palette)[rect->color], rect->dy, rect->dx, rect-… in matroxfb_fillrect()
348 if (sx & 1) { in matroxfb_cfb4_clear()
351 width --; in matroxfb_cfb4_clear()
352 whattodo = 1; in matroxfb_cfb4_clear()
354 if (width & 1) { in matroxfb_cfb4_clear()
357 width >>= 1; in matroxfb_cfb4_clear()
358 sx >>= 1; in matroxfb_cfb4_clear()
362 mga_outl(M_DWGCTL, minfo->accel.m_dwg_rect | M_DWG_REPLACE2); in matroxfb_cfb4_clear()
365 mga_outl(M_YDST, sy * minfo->fbcon.var.xres_virtual >> 6); in matroxfb_cfb4_clear()
370 u_int32_t step = minfo->fbcon.var.xres_virtual >> 1; in matroxfb_cfb4_clear()
371 vaddr_t vbase = minfo->video.vbase; in matroxfb_cfb4_clear()
372 if (whattodo & 1) { in matroxfb_cfb4_clear()
373 unsigned int uaddr = sy * step + sx - 1; in matroxfb_cfb4_clear()
376 for (loop = height; loop > 0; loop --) { in matroxfb_cfb4_clear()
385 for (loop = height; loop > 0; loop --) { in matroxfb_cfb4_clear()
398 switch (rect->rop) { in matroxfb_cfb4_fillrect()
400 …oxfb_cfb4_clear(minfo, ((u_int32_t *)info->pseudo_palette)[rect->color], rect->dy, rect->dx, rect-… in matroxfb_cfb4_fillrect()
411 u_int32_t xlen; in matroxfb_1bpp_imageblit() local
423 xlen = (charcell + 3) & ~3; in matroxfb_1bpp_imageblit()
426 ar0 = height * width - 1; in matroxfb_1bpp_imageblit()
427 easy = 1; in matroxfb_1bpp_imageblit()
429 ar0 = width - 1; in matroxfb_1bpp_imageblit()
443 fxbndry = ((xx + width - 1) << 16) | xx; in matroxfb_1bpp_imageblit()
444 mmio = minfo->mmio.vbase; in matroxfb_1bpp_imageblit()
453 mga_memcpy_toio(mmio, chardata, xlen); in matroxfb_1bpp_imageblit()
461 } else if (step == 1) { in matroxfb_1bpp_imageblit()
462 /* Special case for 1..8bit widths */ in matroxfb_1bpp_imageblit()
463 while (height--) { in matroxfb_1bpp_imageblit()
473 while (height--) { in matroxfb_1bpp_imageblit()
483 while (height--) { in matroxfb_1bpp_imageblit()
504 if (image->depth == 1) { in matroxfb_imageblit()
507 fgx = ((u_int32_t*)info->pseudo_palette)[image->fg_color]; in matroxfb_imageblit()
508 bgx = ((u_int32_t*)info->pseudo_palette)[image->bg_color]; in matroxfb_imageblit()
509 …matroxfb_1bpp_imageblit(minfo, fgx, bgx, image->data, image->width, image->height, image->dy, imag… in matroxfb_imageblit()
511 /* Danger! image->depth is useless: logo painting code always in matroxfb_imageblit()
513 always 8bpp and info->pseudo_palette is changed to contain in matroxfb_imageblit()
514 logo palette to be used (but only for true/direct-color... sic...). in matroxfb_imageblit()