omap_dmm 43 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c static struct dmm *omap_dmm; omap_dmm 276 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c list_add(&engine->idle_node, &omap_dmm->idle_head); omap_dmm 279 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c atomic_inc(&omap_dmm->engine_counter); omap_dmm 280 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c wake_up_interruptible(&omap_dmm->engine_queue); omap_dmm 323 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c ret = wait_event_interruptible(omap_dmm->engine_queue, omap_dmm 324 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c atomic_add_unless(&omap_dmm->engine_counter, -1, 0)); omap_dmm 490 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c txn = dmm_txn_init(omap_dmm, area->tcm); omap_dmm 573 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c list_add(&block->alloc_node, &omap_dmm->alloc_head); omap_dmm 597 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c list_add(&block->alloc_node, &omap_dmm->alloc_head); omap_dmm 610 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dev_err(omap_dmm->dev, "failed to release block\n"); omap_dmm 727 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c return omap_dmm->plat_data->cpu_cache_flags; omap_dmm 732 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c return omap_dmm ? true : false; omap_dmm 741 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (omap_dmm) { omap_dmm 743 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dmm_write(omap_dmm, 0x7e7e7e7e, DMM_PAT_IRQENABLE_CLR); omap_dmm 744 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c free_irq(omap_dmm->irq, omap_dmm); omap_dmm 748 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c list_for_each_entry_safe(block, _block, &omap_dmm->alloc_head, omap_dmm 755 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c for (i = 0; i < omap_dmm->num_lut; i++) omap_dmm 756 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (omap_dmm->tcm && omap_dmm->tcm[i]) omap_dmm 757 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->tcm[i]->deinit(omap_dmm->tcm[i]); omap_dmm 758 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c kfree(omap_dmm->tcm); omap_dmm 760 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c kfree(omap_dmm->engines); omap_dmm 761 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (omap_dmm->refill_va) omap_dmm 762 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dma_free_wc(omap_dmm->dev, omap_dmm 763 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c REFILL_BUFFER_SIZE * omap_dmm->num_engines, omap_dmm 764 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->refill_va, omap_dmm->refill_pa); omap_dmm 765 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (omap_dmm->dummy_page) omap_dmm 766 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c __free_page(omap_dmm->dummy_page); omap_dmm 768 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (omap_dmm->dmm_workaround) omap_dmm 769 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dmm_workaround_uninit(omap_dmm); omap_dmm 771 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c iounmap(omap_dmm->base); omap_dmm 772 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c kfree(omap_dmm); omap_dmm 773 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm = NULL; omap_dmm 786 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm = kzalloc(sizeof(*omap_dmm), GFP_KERNEL); omap_dmm 787 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!omap_dmm) omap_dmm 791 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c INIT_LIST_HEAD(&omap_dmm->alloc_head); omap_dmm 792 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c INIT_LIST_HEAD(&omap_dmm->idle_head); omap_dmm 794 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c init_waitqueue_head(&omap_dmm->engine_queue); omap_dmm 806 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->plat_data = match->data; omap_dmm 816 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->phys_base = mem->start; omap_dmm 817 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->base = ioremap(mem->start, SZ_2K); omap_dmm 819 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!omap_dmm->base) { omap_dmm 824 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->irq = platform_get_irq(dev, 0); omap_dmm 825 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (omap_dmm->irq < 0) { omap_dmm 830 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->dev = &dev->dev; omap_dmm 838 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!dmm_workaround_init(omap_dmm)) { omap_dmm 839 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->dmm_workaround = true; omap_dmm 848 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c hwinfo = dmm_read(omap_dmm, DMM_PAT_HWINFO); omap_dmm 849 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->num_engines = (hwinfo >> 24) & 0x1F; omap_dmm 850 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->num_lut = (hwinfo >> 16) & 0x1F; omap_dmm 851 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->container_width = 256; omap_dmm 852 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->container_height = 128; omap_dmm 854 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c atomic_set(&omap_dmm->engine_counter, omap_dmm->num_engines); omap_dmm 857 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c pat_geom = dmm_read(omap_dmm, DMM_PAT_GEOMETRY); omap_dmm 858 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->lut_width = ((pat_geom >> 16) & 0xF) << 5; omap_dmm 859 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->lut_height = ((pat_geom >> 24) & 0xF) << 5; omap_dmm 863 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (omap_dmm->lut_height != omap_dmm->container_height) omap_dmm 864 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->num_lut++; omap_dmm 867 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dmm_write(omap_dmm, 0x88888888, DMM_PAT_VIEW__0); omap_dmm 868 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dmm_write(omap_dmm, 0x88888888, DMM_PAT_VIEW__1); omap_dmm 869 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dmm_write(omap_dmm, 0x80808080, DMM_PAT_VIEW_MAP__0); omap_dmm 870 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dmm_write(omap_dmm, 0x80000000, DMM_PAT_VIEW_MAP_BASE); omap_dmm 871 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dmm_write(omap_dmm, 0x88888888, DMM_TILER_OR__0); omap_dmm 872 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dmm_write(omap_dmm, 0x88888888, DMM_TILER_OR__1); omap_dmm 874 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->dummy_page = alloc_page(GFP_KERNEL | __GFP_DMA32); omap_dmm 875 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!omap_dmm->dummy_page) { omap_dmm 886 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->dummy_pa = page_to_phys(omap_dmm->dummy_page); omap_dmm 889 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->refill_va = dma_alloc_wc(&dev->dev, omap_dmm 890 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c REFILL_BUFFER_SIZE * omap_dmm->num_engines, omap_dmm 891 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c &omap_dmm->refill_pa, GFP_KERNEL); omap_dmm 892 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!omap_dmm->refill_va) { omap_dmm 898 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->engines = kcalloc(omap_dmm->num_engines, omap_dmm 899 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c sizeof(*omap_dmm->engines), GFP_KERNEL); omap_dmm 900 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!omap_dmm->engines) { omap_dmm 905 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c for (i = 0; i < omap_dmm->num_engines; i++) { omap_dmm 906 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->engines[i].id = i; omap_dmm 907 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->engines[i].dmm = omap_dmm; omap_dmm 908 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->engines[i].refill_va = omap_dmm->refill_va + omap_dmm 910 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->engines[i].refill_pa = omap_dmm->refill_pa + omap_dmm 912 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c init_completion(&omap_dmm->engines[i].compl); omap_dmm 914 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c list_add(&omap_dmm->engines[i].idle_node, &omap_dmm->idle_head); omap_dmm 917 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->tcm = kcalloc(omap_dmm->num_lut, sizeof(*omap_dmm->tcm), omap_dmm 919 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!omap_dmm->tcm) { omap_dmm 928 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c for (i = 0; i < omap_dmm->num_lut; i++) { omap_dmm 929 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->tcm[i] = sita_init(omap_dmm->container_width, omap_dmm 930 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->container_height); omap_dmm 932 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!omap_dmm->tcm[i]) { omap_dmm 938 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->tcm[i]->lut_id = i; omap_dmm 944 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c containers[TILFMT_8BIT] = omap_dmm->tcm[0]; omap_dmm 945 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c containers[TILFMT_16BIT] = omap_dmm->tcm[0]; omap_dmm 946 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c containers[TILFMT_32BIT] = omap_dmm->tcm[0]; omap_dmm 948 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (omap_dmm->container_height != omap_dmm->lut_height) { omap_dmm 952 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c containers[TILFMT_PAGE] = omap_dmm->tcm[1]; omap_dmm 953 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->tcm[1]->y_offset = OMAP5_LUT_OFFSET; omap_dmm 954 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->tcm[1]->lut_id = 0; omap_dmm 956 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c containers[TILFMT_PAGE] = omap_dmm->tcm[0]; omap_dmm 961 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c .p1.x = omap_dmm->container_width - 1, omap_dmm 962 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c .p1.y = omap_dmm->container_height - 1, omap_dmm 965 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c ret = request_irq(omap_dmm->irq, omap_dmm_irq_handler, IRQF_SHARED, omap_dmm 966 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c "omap_dmm_irq_handler", omap_dmm); omap_dmm 970 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->irq, ret); omap_dmm 971 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c omap_dmm->irq = -1; omap_dmm 981 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dmm_write(omap_dmm, 0x7e7e7e7e, DMM_PAT_IRQENABLE_SET); omap_dmm 984 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c for (i = 0; i < omap_dmm->num_lut; i++) { omap_dmm 985 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c area.tcm = omap_dmm->tcm[i]; omap_dmm 987 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dev_err(omap_dmm->dev, "refill failed"); omap_dmm 990 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dev_info(omap_dmm->dev, "initialized all PAT entries\n"); omap_dmm 1092 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!omap_dmm) { omap_dmm 1097 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c h_adj = omap_dmm->container_height / ydiv; omap_dmm 1098 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c w_adj = omap_dmm->container_width / xdiv; omap_dmm 1106 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c for (lut_idx = 0; lut_idx < omap_dmm->num_lut; lut_idx++) { omap_dmm 1110 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c for (i = 0; i < omap_dmm->container_height; i++) { omap_dmm 1117 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c list_for_each_entry(block, &omap_dmm->alloc_head, alloc_node) { omap_dmm 1118 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (block->area.tcm == omap_dmm->tcm[lut_idx]) { omap_dmm 1157 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dev_dbg(omap_dmm->dev, "CONTAINER %d DUMP BEGIN\n", omap_dmm 1160 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dev_dbg(omap_dmm->dev, "%03d:%s\n", i, map[i]); omap_dmm 1161 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c dev_dbg(omap_dmm->dev, "CONTAINER %d DUMP END\n", omap_dmm 1180 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c if (!omap_dmm) omap_dmm 1185 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c .p1.x = omap_dmm->container_width - 1, omap_dmm 1186 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c .p1.y = omap_dmm->container_height - 1, omap_dmm 1190 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c for (i = 0; i < omap_dmm->num_lut; i++) { omap_dmm 1191 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c area.tcm = omap_dmm->tcm[i];