Home | History | Annotate | Download | only in xscale

Lines Matching refs:scr

268 		struct pxa2x0_lcd_screen *scr;
272 error = pxa2x0_lcd_new_screen(sc, descr->depth, &scr);
279 ri = &scr->rinfo;
280 ri->ri_hw = (void *)scr;
281 ri->ri_bits = scr->buf_va;
287 pxa2x0_lcd_start_dma(sc, scr);
288 sc->active = scr;
334 struct pxa2x0_lcd_screen *scr)
344 bus_dmamap_sync(sc->dma_tag, scr->dma, 0, scr->buf_size,
349 switch (scr->depth) {
371 scr->depth >= 16 ? scr->dma_desc_pa :
372 scr->dma_desc_pa + 2 * sizeof (struct lcd_dma_descriptor));
374 scr->dma_desc_pa + 1 * sizeof (struct lcd_dma_descriptor));
480 struct pxa2x0_lcd_screen *scr = NULL;
518 scr = kmem_zalloc(sizeof(*scr), KM_SLEEP);
519 scr->nsegs = 0;
520 scr->depth = depth;
521 scr->buf_size = size;
522 scr->buf_va = NULL;
526 error = bus_dmamem_alloc(dma_tag, size, 16, 0, scr->segs, 1,
527 &scr->nsegs, busdma_flag);
529 if (error || scr->nsegs != 1) {
540 error = bus_dmamem_map(dma_tag, scr->segs, scr->nsegs, size,
541 (void **)&scr->buf_va,
550 va = (vaddr_t)scr->buf_va;
567 memset(scr->buf_va, 0, scr->buf_size);
571 busdma_flag, &scr->dma);
575 error = bus_dmamap_load(dma_tag, scr->dma, scr->buf_va, size,
580 buf_pa = scr->segs[0].ds_addr;
585 (char *)(scr->buf_va) + roundup(size, PAGE_SIZE) -
590 desc[0].ldcmd = scr->buf_size;
603 desc[1].fsadr = buf_pa + scr->buf_size/2;
604 desc[0].ldcmd = desc[1].ldcmd = scr->buf_size/2;
613 scr->dma_desc = desc;
614 scr->dma_desc_pa = desc_pa;
615 scr->map_size = size; /* used when unmap this. */
617 LIST_INSERT_HEAD(&sc->screens, scr, link);
620 *scrpp = scr;
625 if (scr) {
626 if (scr->buf_va)
627 bus_dmamem_unmap(dma_tag, scr->buf_va, size);
628 if (scr->nsegs)
629 bus_dmamem_free(dma_tag, scr->segs, scr->nsegs);
630 kmem_free(scr, sizeof(*scr));
777 struct pxa2x0_lcd_screen *scr = cookie, *old;
780 if (old == scr)
786 pxa2x0_lcd_start_dma(sc, scr);
788 sc->active = scr;
797 struct pxa2x0_lcd_screen *scr;
802 error = pxa2x0_lcd_new_screen(sc, type->depth, &scr);
809 scr->rinfo.ri_flg = RI_ENABLE_ALPHA;
810 scr->rinfo.ri_depth = type->depth;
811 scr->rinfo.ri_bits = scr->buf_va;
812 scr->rinfo.ri_width = sc->geometry->panel_width;
813 scr->rinfo.ri_height = sc->geometry->panel_height;
814 scr->rinfo.ri_stride = scr->rinfo.ri_width * scr->rinfo.ri_depth / 8;
816 if (scr->rinfo.ri_depth > 16)
817 scr->rinfo.ri_stride = scr->rinfo.ri_width * 4;
819 scr->rinfo.ri_wsfcookie = -1; /* XXX */
821 rasops_init(&scr->rinfo, type->c.nrows, type->c.ncols);
823 (*scr->rinfo.ri_ops.allocattr)(&scr->rinfo, 0, 0, 0, attrp);
825 *cookiep = scr;
836 struct pxa2x0_lcd_screen *scr = cookie;
838 LIST_REMOVE(scr, link);
840 if (scr == sc->active) {
849 if (scr->buf_va)
850 bus_dmamem_unmap(sc->dma_tag, scr->buf_va, scr->map_size);
851 if (scr->nsegs > 0)
852 bus_dmamem_free(sc->dma_tag, scr->segs, scr->nsegs);
853 kmem_free(scr, sizeof(*scr));
861 struct pxa2x0_lcd_screen *scr = sc->active; /* ??? */
874 wsdisp_info->depth = scr->depth;
879 *(u_int *)data = scr->rinfo.ri_stride;
917 struct pxa2x0_lcd_screen *scr = sc->active; /* ??? */
919 if (scr == NULL)
923 offset >= scr->rinfo.ri_stride * scr->rinfo.ri_height)
926 return bus_dmamem_mmap(sc->dma_tag, scr->segs, scr->nsegs,
935 struct pxa2x0_lcd_screen *scr = cookie;
937 (*scr->rinfo.ri_ops.cursor)(&scr->rinfo, on, row, col);
943 struct pxa2x0_lcd_screen *scr = cookie;
945 return (*scr->rinfo.ri_ops.mapchar)(&scr->rinfo, c, cp);
951 struct pxa2x0_lcd_screen *scr = cookie;
953 (*scr->rinfo.ri_ops.putchar)(&scr->rinfo, row, col, uc, attr);
959 struct pxa2x0_lcd_screen *scr = cookie;
961 (*scr->rinfo.ri_ops.copycols)(&scr->rinfo, row, src, dst, num);
967 struct pxa2x0_lcd_screen *scr = cookie;
969 (*scr->rinfo.ri_ops.erasecols)(&scr->rinfo, row, col, num, attr);
975 struct pxa2x0_lcd_screen *scr = cookie;
977 (*scr->rinfo.ri_ops.copyrows)(&scr->rinfo, src, dst, num);
983 struct pxa2x0_lcd_screen *scr = cookie;
985 (*scr->rinfo.ri_ops.eraserows)(&scr->rinfo, row, num, attr);
991 struct pxa2x0_lcd_screen *scr = cookie;
993 return (*scr->rinfo.ri_ops.allocattr)(&scr->rinfo, fg, bg, flg, attr);