Lines Matching +full:enforce +full:- +full:video +full:- +full:mode

18  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
79 * Associates each hazard above with a possible multi-command
241 if ((buf_end - *buf) >= num_words) { in eat_words()
259 drm_local_map_t *map = seq->map_cache; in via_drm_lookup_agp_map()
261 if (map && map->offset <= offset in via_drm_lookup_agp_map()
262 && (offset + size) <= (map->offset + map->size)) { in via_drm_lookup_agp_map()
266 list_for_each_entry(r_list, &dev->maplist, head) { in via_drm_lookup_agp_map()
267 map = r_list->map; in via_drm_lookup_agp_map()
270 if (map->offset <= offset in via_drm_lookup_agp_map()
271 && (offset + size) <= (map->offset + map->size) in via_drm_lookup_agp_map()
272 && !(map->flags & _DRM_RESTRICTED) in via_drm_lookup_agp_map()
273 && (map->type == _DRM_AGP)) { in via_drm_lookup_agp_map()
274 seq->map_cache = map; in via_drm_lookup_agp_map()
284 * FIXME: To actually enforce this security policy strictly, drm_rmmap
292 switch (cur_seq->unfinished) { in finish_current_sequence()
294 DRM_DEBUG("Z Buffer start address is 0x%x\n", cur_seq->z_addr); in finish_current_sequence()
298 cur_seq->d_addr); in finish_current_sequence()
301 if (cur_seq->agp_texture) { in finish_current_sequence()
303 cur_seq->tex_level_lo[cur_seq->texture]; in finish_current_sequence()
304 unsigned end = cur_seq->tex_level_hi[cur_seq->texture]; in finish_current_sequence()
316 &(cur_seq->t_addr[tex = cur_seq->texture][start]); in finish_current_sequence()
317 pitch = &(cur_seq->pitch[tex][start]); in finish_current_sequence()
318 height = &(cur_seq->height[tex][start]); in finish_current_sequence()
319 npot = cur_seq->tex_npot[tex]; in finish_current_sequence()
333 (cur_seq, lo, hi - lo, cur_seq->dev)) { in finish_current_sequence()
343 cur_seq->unfinished = no_sequence; in finish_current_sequence()
352 if (cur_seq->unfinished && (cur_seq->unfinished != seqs[hz])) { in investigate_hazard()
393 cur_seq->unfinished = z_address; in investigate_hazard()
394 cur_seq->z_addr = (cur_seq->z_addr & 0xFF000000) | in investigate_hazard()
398 cur_seq->unfinished = z_address; in investigate_hazard()
399 cur_seq->z_addr = (cur_seq->z_addr & 0x00FFFFFF) | in investigate_hazard()
403 cur_seq->unfinished = z_address; in investigate_hazard()
409 cur_seq->unfinished = dest_address; in investigate_hazard()
410 cur_seq->d_addr = (cur_seq->d_addr & 0xFF000000) | in investigate_hazard()
414 cur_seq->unfinished = dest_address; in investigate_hazard()
415 cur_seq->d_addr = (cur_seq->d_addr & 0x00FFFFFF) | in investigate_hazard()
419 cur_seq->unfinished = dest_address; in investigate_hazard()
426 cur_seq->unfinished = tex_address; in investigate_hazard()
428 tmp_addr = &cur_seq->t_addr[cur_seq->texture][tmp]; in investigate_hazard()
432 cur_seq->unfinished = tex_address; in investigate_hazard()
433 tmp = ((cmd >> 24) - 0x20); in investigate_hazard()
435 tmp_addr = &cur_seq->t_addr[cur_seq->texture][tmp]; in investigate_hazard()
443 cur_seq->unfinished = tex_address; in investigate_hazard()
444 cur_seq->tex_level_lo[tmp = cur_seq->texture] = cmd & 0x3F; in investigate_hazard()
445 cur_seq->tex_level_hi[tmp] = (cmd & 0xFC0) >> 6; in investigate_hazard()
448 cur_seq->unfinished = tex_address; in investigate_hazard()
449 tmp = ((cmd >> 24) - HC_SubA_HTXnL0Pit); in investigate_hazard()
452 cur_seq->pitch[cur_seq->texture][tmp] = in investigate_hazard()
454 cur_seq->tex_npot[cur_seq->texture] = 1; in investigate_hazard()
456 cur_seq->pitch[cur_seq->texture][tmp] = in investigate_hazard()
458 cur_seq->tex_npot[cur_seq->texture] = 0; in investigate_hazard()
461 ("Unimplemented texture level 0 pitch mode.\n"); in investigate_hazard()
467 cur_seq->unfinished = tex_address; in investigate_hazard()
468 tmp_addr = &cur_seq->t_addr[cur_seq->texture][9]; in investigate_hazard()
473 cur_seq->unfinished = tex_address; in investigate_hazard()
479 cur_seq->unfinished = tex_address; in investigate_hazard()
480 tmp_addr = &(cur_seq->height[cur_seq->texture][0]); in investigate_hazard()
489 cur_seq->unfinished = tex_address; in investigate_hazard()
490 tmp_addr = &(cur_seq->height[cur_seq->texture][0]); in investigate_hazard()
497 cur_seq->unfinished = tex_address; in investigate_hazard()
503 cur_seq->agp_texture = (tmp == 3); in investigate_hazard()
504 cur_seq->tex_palette_size[cur_seq->texture] = in investigate_hazard()
508 cur_seq->vertex_count = cmd & 0x0000FFFF; in investigate_hazard()
511 cur_seq->multitex = (cmd >> 3) & 1; in investigate_hazard()
525 (drm_via_private_t *) cur_seq->dev->dev_private; in via_check_prim_list()
533 if ((buf_end - buf) < 2) { in via_check_prim_list()
556 if (cur_seq->agp && ((bcmd & (0xF << 11)) == 0)) { in via_check_prim_list()
564 dw_count += (cur_seq->multitex) ? 2 : 1; in via_check_prim_list()
566 dw_count += (cur_seq->multitex) ? 2 : 1; in via_check_prim_list()
582 if (dev_priv->num_fire_offsets >= in via_check_prim_list()
588 dev_priv->fire_offsets[dev_priv-> in via_check_prim_list()
614 if (cur_seq->agp && ((buf - cur_seq->buf_start) & 0x01)) { in via_check_prim_list()
634 if ((buf_end - buf) < 2) { in via_check_header2()
652 hc_state->texture = 0; in via_check_header2()
656 hc_state->texture = 1; in via_check_header2()
690 cmd, *(buf - 2)); in via_check_header2()
700 buf--; in via_check_header2()
705 } else if (hc_state->unfinished && in via_check_header2()
710 if (hc_state->unfinished && finish_current_sequence(hc_state)) in via_check_header2()
725 next_fire = dev_priv->fire_offsets[*fire_count]; in via_parse_header2()
732 (*fire_count < dev_priv->num_fire_offsets) && in via_parse_header2()
743 if (++(*fire_count) < dev_priv->num_fire_offsets) in via_parse_header2()
744 next_fire = dev_priv->fire_offsets[*fire_count]; in via_parse_header2()
768 DRM_ERROR("Invalid VIDEO DMA command. " in verify_mmio_address()
769 "Attempt to access 3D- or command burst area.\n"); in verify_mmio_address()
772 DRM_ERROR("Invalid VIDEO DMA command. " in verify_mmio_address()
776 DRM_ERROR("Invalid VIDEO DMA command. " in verify_mmio_address()
789 if (buf_end - buf < dwords) { in verify_video_tail()
790 DRM_ERROR("Illegal termination of video command.\n"); in verify_video_tail()
793 while (dwords--) { in verify_video_tail()
795 DRM_ERROR("Illegal video command tail.\n"); in verify_video_tail()
817 "Attempt to access 3D- or command burst area.\n"); in via_check_header1()
859 if (buf_end - buf < 4) { in via_check_vheader5()
860 DRM_ERROR("Illegal termination of video header5 command\n"); in via_check_vheader5()
879 if ((data & 3) && verify_video_tail(&buf, buf_end, 4 - (data & 3))) in via_check_vheader5()
896 while (i--) in via_parse_vheader5()
899 buf += 4 - (count & 3); in via_parse_vheader5()
911 if (buf_end - buf < 4) { in via_check_vheader6()
912 DRM_ERROR("Illegal termination of video header6 command\n"); in via_check_vheader6()
925 if ((buf_end - buf) < (data << 1)) { in via_check_vheader6()
926 DRM_ERROR("Illegal termination of video header6 command\n"); in via_check_vheader6()
935 if ((data & 3) && verify_video_tail(&buf, buf_end, 4 - (data & 3))) in via_check_vheader6()
951 while (i--) { in via_parse_vheader6()
957 buf += 4 - (count & 3); in via_parse_vheader6()
967 drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; in via_verify_command_stream()
968 drm_via_state_t *hc_state = &dev_priv->hc_state; in via_verify_command_stream()
976 cme_video = (dev_priv->chipset == VIA_PRO_GROUP_A || in via_verify_command_stream()
977 dev_priv->chipset == VIA_DX9_0); in via_verify_command_stream()
979 supported_3d = dev_priv->chipset != VIA_DX9_0; in via_verify_command_stream()
981 hc_state->dev = dev; in via_verify_command_stream()
982 hc_state->unfinished = no_sequence; in via_verify_command_stream()
983 hc_state->map_cache = NULL; in via_verify_command_stream()
984 hc_state->agp = agp; in via_verify_command_stream()
985 hc_state->buf_start = buf; in via_verify_command_stream()
986 dev_priv->num_fire_offsets = 0; in via_verify_command_stream()
1028 return -EINVAL; in via_verify_command_stream()
1033 return -EINVAL; in via_verify_command_stream()
1043 drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; in via_parse_command_stream()
1084 return -EINVAL; in via_parse_command_stream()
1088 return -EINVAL; in via_parse_command_stream()