Lines Matching full:track

1336 	struct r100_cs_track *track;  in r100_packet3_load_vbpntr()  local
1342 track = (struct r100_cs_track *)p->track; in r100_packet3_load_vbpntr()
1350 track->num_arrays = c; in r100_packet3_load_vbpntr()
1362 track->arrays[i + 0].esize = idx_value >> 8; in r100_packet3_load_vbpntr()
1363 track->arrays[i + 0].robj = reloc->robj; in r100_packet3_load_vbpntr()
1364 track->arrays[i + 0].esize &= 0x7F; in r100_packet3_load_vbpntr()
1373 track->arrays[i + 1].robj = reloc->robj; in r100_packet3_load_vbpntr()
1374 track->arrays[i + 1].esize = idx_value >> 24; in r100_packet3_load_vbpntr()
1375 track->arrays[i + 1].esize &= 0x7F; in r100_packet3_load_vbpntr()
1387 track->arrays[i + 0].robj = reloc->robj; in r100_packet3_load_vbpntr()
1388 track->arrays[i + 0].esize = idx_value >> 8; in r100_packet3_load_vbpntr()
1389 track->arrays[i + 0].esize &= 0x7F; in r100_packet3_load_vbpntr()
1585 struct r100_cs_track *track; in r100_packet0_check() local
1594 track = (struct r100_cs_track *)p->track; in r100_packet0_check()
1624 track->zb.robj = reloc->robj; in r100_packet0_check()
1625 track->zb.offset = idx_value; in r100_packet0_check()
1626 track->zb_dirty = true; in r100_packet0_check()
1637 track->cb[0].robj = reloc->robj; in r100_packet0_check()
1638 track->cb[0].offset = idx_value; in r100_packet0_check()
1639 track->cb_dirty = true; in r100_packet0_check()
1664 track->textures[i].robj = reloc->robj; in r100_packet0_check()
1665 track->tex_dirty = true; in r100_packet0_check()
1680 track->textures[0].cube_info[i].offset = idx_value; in r100_packet0_check()
1682 track->textures[0].cube_info[i].robj = reloc->robj; in r100_packet0_check()
1683 track->tex_dirty = true; in r100_packet0_check()
1698 track->textures[1].cube_info[i].offset = idx_value; in r100_packet0_check()
1700 track->textures[1].cube_info[i].robj = reloc->robj; in r100_packet0_check()
1701 track->tex_dirty = true; in r100_packet0_check()
1716 track->textures[2].cube_info[i].offset = idx_value; in r100_packet0_check()
1718 track->textures[2].cube_info[i].robj = reloc->robj; in r100_packet0_check()
1719 track->tex_dirty = true; in r100_packet0_check()
1722 track->maxy = ((idx_value >> 16) & 0x7FF); in r100_packet0_check()
1723 track->cb_dirty = true; in r100_packet0_check()
1724 track->zb_dirty = true; in r100_packet0_check()
1746 track->cb[0].pitch = idx_value & RADEON_COLORPITCH_MASK; in r100_packet0_check()
1747 track->cb_dirty = true; in r100_packet0_check()
1750 track->zb.pitch = idx_value & RADEON_DEPTHPITCH_MASK; in r100_packet0_check()
1751 track->zb_dirty = true; in r100_packet0_check()
1760 track->cb[0].cpp = 1; in r100_packet0_check()
1765 track->cb[0].cpp = 2; in r100_packet0_check()
1768 track->cb[0].cpp = 4; in r100_packet0_check()
1775 track->z_enabled = !!(idx_value & RADEON_Z_ENABLE); in r100_packet0_check()
1776 track->cb_dirty = true; in r100_packet0_check()
1777 track->zb_dirty = true; in r100_packet0_check()
1782 track->zb.cpp = 2; in r100_packet0_check()
1790 track->zb.cpp = 4; in r100_packet0_check()
1795 track->zb_dirty = true; in r100_packet0_check()
1810 for (i = 0; i < track->num_texture; i++) in r100_packet0_check()
1811 track->textures[i].enabled = !!(temp & (1 << i)); in r100_packet0_check()
1812 track->tex_dirty = true; in r100_packet0_check()
1816 track->vap_vf_cntl = idx_value; in r100_packet0_check()
1819 track->vtx_size = r100_get_vtx_size(idx_value); in r100_packet0_check()
1825 track->textures[i].width = (idx_value & RADEON_TEX_USIZE_MASK) + 1; in r100_packet0_check()
1826 track->textures[i].height = ((idx_value & RADEON_TEX_VSIZE_MASK) >> RADEON_TEX_VSIZE_SHIFT) + 1; in r100_packet0_check()
1827 track->tex_dirty = true; in r100_packet0_check()
1833 track->textures[i].pitch = idx_value + 32; in r100_packet0_check()
1834 track->tex_dirty = true; in r100_packet0_check()
1840 track->textures[i].num_levels = ((idx_value & RADEON_MAX_MIP_LEVEL_MASK) in r100_packet0_check()
1844 track->textures[i].roundup_w = false; in r100_packet0_check()
1847 track->textures[i].roundup_h = false; in r100_packet0_check()
1848 track->tex_dirty = true; in r100_packet0_check()
1855 track->textures[i].use_pitch = true; in r100_packet0_check()
1857 track->textures[i].use_pitch = false; in r100_packet0_check()
1858track->textures[i].width = 1 << ((idx_value & RADEON_TXFORMAT_WIDTH_MASK) >> RADEON_TXFORMAT_WIDTH… in r100_packet0_check()
1859track->textures[i].height = 1 << ((idx_value & RADEON_TXFORMAT_HEIGHT_MASK) >> RADEON_TXFORMAT_HEI… in r100_packet0_check()
1862 track->textures[i].tex_coord_type = 2; in r100_packet0_check()
1867 track->textures[i].cpp = 1; in r100_packet0_check()
1868 track->textures[i].compress_format = R100_TRACK_COMP_NONE; in r100_packet0_check()
1879 track->textures[i].cpp = 2; in r100_packet0_check()
1880 track->textures[i].compress_format = R100_TRACK_COMP_NONE; in r100_packet0_check()
1886 track->textures[i].cpp = 4; in r100_packet0_check()
1887 track->textures[i].compress_format = R100_TRACK_COMP_NONE; in r100_packet0_check()
1890 track->textures[i].cpp = 1; in r100_packet0_check()
1891 track->textures[i].compress_format = R100_TRACK_COMP_DXT1; in r100_packet0_check()
1895 track->textures[i].cpp = 1; in r100_packet0_check()
1896 track->textures[i].compress_format = R100_TRACK_COMP_DXT35; in r100_packet0_check()
1899 track->textures[i].cube_info[4].width = 1 << ((idx_value >> 16) & 0xf); in r100_packet0_check()
1900 track->textures[i].cube_info[4].height = 1 << ((idx_value >> 20) & 0xf); in r100_packet0_check()
1901 track->tex_dirty = true; in r100_packet0_check()
1909 track->textures[i].cube_info[face].width = 1 << ((tmp >> (face * 8)) & 0xf); in r100_packet0_check()
1910 track->textures[i].cube_info[face].height = 1 << ((tmp >> ((face * 8) + 4)) & 0xf); in r100_packet0_check()
1912 track->tex_dirty = true; in r100_packet0_check()
1943 struct r100_cs_track *track; in r100_packet3_check() local
1950 track = (struct r100_cs_track *)p->track; in r100_packet3_check()
1979 track->num_arrays = 1; in r100_packet3_check()
1980 track->vtx_size = r100_get_vtx_size(radeon_get_ib_value(p, idx + 2)); in r100_packet3_check()
1982 track->arrays[0].robj = reloc->robj; in r100_packet3_check()
1983 track->arrays[0].esize = track->vtx_size; in r100_packet3_check()
1985 track->max_indx = radeon_get_ib_value(p, idx+1); in r100_packet3_check()
1987 track->vap_vf_cntl = radeon_get_ib_value(p, idx+3); in r100_packet3_check()
1988 track->immd_dwords = pkt->count - 1; in r100_packet3_check()
1989 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
1998 track->vtx_size = r100_get_vtx_size(radeon_get_ib_value(p, idx + 0)); in r100_packet3_check()
1999 track->vap_vf_cntl = radeon_get_ib_value(p, idx + 1); in r100_packet3_check()
2000 track->immd_dwords = pkt->count - 1; in r100_packet3_check()
2001 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2011 track->vap_vf_cntl = radeon_get_ib_value(p, idx); in r100_packet3_check()
2012 track->immd_dwords = pkt->count; in r100_packet3_check()
2013 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2019 track->vap_vf_cntl = radeon_get_ib_value(p, idx); in r100_packet3_check()
2020 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2026 track->vap_vf_cntl = radeon_get_ib_value(p, idx); in r100_packet3_check()
2027 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2033 track->vap_vf_cntl = radeon_get_ib_value(p, idx + 1); in r100_packet3_check()
2034 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2040 track->vap_vf_cntl = radeon_get_ib_value(p, idx + 1); in r100_packet3_check()
2041 r = r100_cs_track_check(p->rdev, track); in r100_packet3_check()
2063 struct r100_cs_track *track; in r100_cs_parse() local
2066 track = kzalloc(sizeof(*track), GFP_KERNEL); in r100_cs_parse()
2067 if (!track) in r100_cs_parse()
2069 r100_cs_track_clear(p->rdev, track); in r100_cs_parse()
2070 p->track = track; in r100_cs_parse()
2154 struct r100_cs_track *track, unsigned idx) in r100_cs_track_cube() argument
2159 unsigned compress_format = track->textures[idx].compress_format; in r100_cs_track_cube()
2162 cube_robj = track->textures[idx].cube_info[face].robj; in r100_cs_track_cube()
2163 w = track->textures[idx].cube_info[face].width; in r100_cs_track_cube()
2164 h = track->textures[idx].cube_info[face].height; in r100_cs_track_cube()
2170 size *= track->textures[idx].cpp; in r100_cs_track_cube()
2172 size += track->textures[idx].cube_info[face].offset; in r100_cs_track_cube()
2177 r100_cs_track_texture_print(&track->textures[idx]); in r100_cs_track_cube()
2185 struct r100_cs_track *track) in r100_cs_track_texture_check() argument
2192 for (u = 0; u < track->num_texture; u++) { in r100_cs_track_texture_check()
2193 if (!track->textures[u].enabled) in r100_cs_track_texture_check()
2195 if (track->textures[u].lookup_disable) in r100_cs_track_texture_check()
2197 robj = track->textures[u].robj; in r100_cs_track_texture_check()
2203 for (i = 0; i <= track->textures[u].num_levels; i++) { in r100_cs_track_texture_check()
2204 if (track->textures[u].use_pitch) { in r100_cs_track_texture_check()
2206 w = (track->textures[u].pitch / track->textures[u].cpp) / (1 << i); in r100_cs_track_texture_check()
2208 w = track->textures[u].pitch / (1 << i); in r100_cs_track_texture_check()
2210 w = track->textures[u].width; in r100_cs_track_texture_check()
2212 w |= track->textures[u].width_11; in r100_cs_track_texture_check()
2214 if (track->textures[u].roundup_w) in r100_cs_track_texture_check()
2217 h = track->textures[u].height; in r100_cs_track_texture_check()
2219 h |= track->textures[u].height_11; in r100_cs_track_texture_check()
2221 if (track->textures[u].roundup_h) in r100_cs_track_texture_check()
2223 if (track->textures[u].tex_coord_type == 1) { in r100_cs_track_texture_check()
2224 d = (1 << track->textures[u].txdepth) / (1 << i); in r100_cs_track_texture_check()
2230 if (track->textures[u].compress_format) { in r100_cs_track_texture_check()
2232 size += r100_track_compress_size(track->textures[u].compress_format, w, h) * d; in r100_cs_track_texture_check()
2237 size *= track->textures[u].cpp; in r100_cs_track_texture_check()
2239 switch (track->textures[u].tex_coord_type) { in r100_cs_track_texture_check()
2244 if (track->separate_cube) { in r100_cs_track_texture_check()
2245 ret = r100_cs_track_cube(rdev, track, u); in r100_cs_track_texture_check()
2253 "%u\n", track->textures[u].tex_coord_type, u); in r100_cs_track_texture_check()
2259 r100_cs_track_texture_print(&track->textures[u]); in r100_cs_track_texture_check()
2266 int r100_cs_track_check(struct radeon_device *rdev, struct r100_cs_track *track) in r100_cs_track_check() argument
2272 unsigned num_cb = track->cb_dirty ? track->num_cb : 0; in r100_cs_track_check()
2274 if (num_cb && !track->zb_cb_clear && !track->color_channel_mask && in r100_cs_track_check()
2275 !track->blend_read_enable) in r100_cs_track_check()
2279 if (track->cb[i].robj == NULL) { in r100_cs_track_check()
2283 size = track->cb[i].pitch * track->cb[i].cpp * track->maxy; in r100_cs_track_check()
2284 size += track->cb[i].offset; in r100_cs_track_check()
2285 if (size > radeon_bo_size(track->cb[i].robj)) { in r100_cs_track_check()
2288 radeon_bo_size(track->cb[i].robj)); in r100_cs_track_check()
2290 i, track->cb[i].pitch, track->cb[i].cpp, in r100_cs_track_check()
2291 track->cb[i].offset, track->maxy); in r100_cs_track_check()
2295 track->cb_dirty = false; in r100_cs_track_check()
2297 if (track->zb_dirty && track->z_enabled) { in r100_cs_track_check()
2298 if (track->zb.robj == NULL) { in r100_cs_track_check()
2302 size = track->zb.pitch * track->zb.cpp * track->maxy; in r100_cs_track_check()
2303 size += track->zb.offset; in r100_cs_track_check()
2304 if (size > radeon_bo_size(track->zb.robj)) { in r100_cs_track_check()
2307 radeon_bo_size(track->zb.robj)); in r100_cs_track_check()
2309 track->zb.pitch, track->zb.cpp, in r100_cs_track_check()
2310 track->zb.offset, track->maxy); in r100_cs_track_check()
2314 track->zb_dirty = false; in r100_cs_track_check()
2316 if (track->aa_dirty && track->aaresolve) { in r100_cs_track_check()
2317 if (track->aa.robj == NULL) { in r100_cs_track_check()
2322 size = track->aa.pitch * track->cb[0].cpp * track->maxy; in r100_cs_track_check()
2323 size += track->aa.offset; in r100_cs_track_check()
2324 if (size > radeon_bo_size(track->aa.robj)) { in r100_cs_track_check()
2327 radeon_bo_size(track->aa.robj)); in r100_cs_track_check()
2329 i, track->aa.pitch, track->cb[0].cpp, in r100_cs_track_check()
2330 track->aa.offset, track->maxy); in r100_cs_track_check()
2334 track->aa_dirty = false; in r100_cs_track_check()
2336 prim_walk = (track->vap_vf_cntl >> 4) & 0x3; in r100_cs_track_check()
2337 if (track->vap_vf_cntl & (1 << 14)) { in r100_cs_track_check()
2338 nverts = track->vap_alt_nverts; in r100_cs_track_check()
2340 nverts = (track->vap_vf_cntl >> 16) & 0xFFFF; in r100_cs_track_check()
2344 for (i = 0; i < track->num_arrays; i++) { in r100_cs_track_check()
2345 size = track->arrays[i].esize * track->max_indx * 4UL; in r100_cs_track_check()
2346 if (track->arrays[i].robj == NULL) { in r100_cs_track_check()
2351 if (size > radeon_bo_size(track->arrays[i].robj)) { in r100_cs_track_check()
2355 radeon_bo_size(track->arrays[i].robj) in r100_cs_track_check()
2357 DRM_ERROR("Max indices %u\n", track->max_indx); in r100_cs_track_check()
2363 for (i = 0; i < track->num_arrays; i++) { in r100_cs_track_check()
2364 size = track->arrays[i].esize * (nverts - 1) * 4UL; in r100_cs_track_check()
2365 if (track->arrays[i].robj == NULL) { in r100_cs_track_check()
2370 if (size > radeon_bo_size(track->arrays[i].robj)) { in r100_cs_track_check()
2374 radeon_bo_size(track->arrays[i].robj) in r100_cs_track_check()
2381 size = track->vtx_size * nverts; in r100_cs_track_check()
2382 if (size != track->immd_dwords) { in r100_cs_track_check()
2384 track->immd_dwords, size); in r100_cs_track_check()
2386 nverts, track->vtx_size); in r100_cs_track_check()
2396 if (track->tex_dirty) { in r100_cs_track_check()
2397 track->tex_dirty = false; in r100_cs_track_check()
2398 return r100_cs_track_texture_check(rdev, track); in r100_cs_track_check()
2403 void r100_cs_track_clear(struct radeon_device *rdev, struct r100_cs_track *track) in r100_cs_track_clear() argument
2407 track->cb_dirty = true; in r100_cs_track_clear()
2408 track->zb_dirty = true; in r100_cs_track_clear()
2409 track->tex_dirty = true; in r100_cs_track_clear()
2410 track->aa_dirty = true; in r100_cs_track_clear()
2413 track->num_cb = 1; in r100_cs_track_clear()
2415 track->num_texture = 3; in r100_cs_track_clear()
2417 track->num_texture = 6; in r100_cs_track_clear()
2418 track->maxy = 2048; in r100_cs_track_clear()
2419 track->separate_cube = true; in r100_cs_track_clear()
2421 track->num_cb = 4; in r100_cs_track_clear()
2422 track->num_texture = 16; in r100_cs_track_clear()
2423 track->maxy = 4096; in r100_cs_track_clear()
2424 track->separate_cube = false; in r100_cs_track_clear()
2425 track->aaresolve = false; in r100_cs_track_clear()
2426 track->aa.robj = NULL; in r100_cs_track_clear()
2429 for (i = 0; i < track->num_cb; i++) { in r100_cs_track_clear()
2430 track->cb[i].robj = NULL; in r100_cs_track_clear()
2431 track->cb[i].pitch = 8192; in r100_cs_track_clear()
2432 track->cb[i].cpp = 16; in r100_cs_track_clear()
2433 track->cb[i].offset = 0; in r100_cs_track_clear()
2435 track->z_enabled = true; in r100_cs_track_clear()
2436 track->zb.robj = NULL; in r100_cs_track_clear()
2437 track->zb.pitch = 8192; in r100_cs_track_clear()
2438 track->zb.cpp = 4; in r100_cs_track_clear()
2439 track->zb.offset = 0; in r100_cs_track_clear()
2440 track->vtx_size = 0x7F; in r100_cs_track_clear()
2441 track->immd_dwords = 0xFFFFFFFFUL; in r100_cs_track_clear()
2442 track->num_arrays = 11; in r100_cs_track_clear()
2443 track->max_indx = 0x00FFFFFFUL; in r100_cs_track_clear()
2444 for (i = 0; i < track->num_arrays; i++) { in r100_cs_track_clear()
2445 track->arrays[i].robj = NULL; in r100_cs_track_clear()
2446 track->arrays[i].esize = 0x7F; in r100_cs_track_clear()
2448 for (i = 0; i < track->num_texture; i++) { in r100_cs_track_clear()
2449 track->textures[i].compress_format = R100_TRACK_COMP_NONE; in r100_cs_track_clear()
2450 track->textures[i].pitch = 16536; in r100_cs_track_clear()
2451 track->textures[i].width = 16536; in r100_cs_track_clear()
2452 track->textures[i].height = 16536; in r100_cs_track_clear()
2453 track->textures[i].width_11 = 1 << 11; in r100_cs_track_clear()
2454 track->textures[i].height_11 = 1 << 11; in r100_cs_track_clear()
2455 track->textures[i].num_levels = 12; in r100_cs_track_clear()
2457 track->textures[i].tex_coord_type = 0; in r100_cs_track_clear()
2458 track->textures[i].txdepth = 0; in r100_cs_track_clear()
2460 track->textures[i].txdepth = 16; in r100_cs_track_clear()
2461 track->textures[i].tex_coord_type = 1; in r100_cs_track_clear()
2463 track->textures[i].cpp = 64; in r100_cs_track_clear()
2464 track->textures[i].robj = NULL; in r100_cs_track_clear()
2466 track->textures[i].enabled = false; in r100_cs_track_clear()
2467 track->textures[i].lookup_disable = false; in r100_cs_track_clear()
2468 track->textures[i].roundup_w = true; in r100_cs_track_clear()
2469 track->textures[i].roundup_h = true; in r100_cs_track_clear()
2470 if (track->separate_cube) in r100_cs_track_clear()
2472 track->textures[i].cube_info[face].robj = NULL; in r100_cs_track_clear()
2473 track->textures[i].cube_info[face].width = 16536; in r100_cs_track_clear()
2474 track->textures[i].cube_info[face].height = 16536; in r100_cs_track_clear()
2475 track->textures[i].cube_info[face].offset = 0; in r100_cs_track_clear()