Lines Matching defs:priv

231 static void agp_insert_file_private(struct agp_file_private * priv)
238 prev->prev = priv;
239 priv->next = prev;
240 agp_fe.file_priv_list = priv;
243 static void agp_remove_file_private(struct agp_file_private * priv)
248 next = priv->next;
249 prev = priv->prev;
344 struct agp_file_private *priv;
348 priv = agp_find_private(temp->pid);
350 if (priv != NULL) {
351 clear_bit(AGP_FF_IS_VALID, &priv->access_flags);
352 clear_bit(AGP_FF_IS_CLIENT, &priv->access_flags);
412 struct agp_file_private *priv;
414 priv = agp_find_private(clients->pid);
416 if (priv != NULL) {
417 set_bit(AGP_FF_IS_VALID, &priv->access_flags);
418 set_bit(AGP_FF_IS_CLIENT, &priv->access_flags);
435 struct agp_file_private *priv;
437 priv = agp_find_private(clients->pid);
439 if (priv != NULL)
440 clear_bit(AGP_FF_IS_VALID, &priv->access_flags);
571 struct agp_file_private *priv = file->private_data;
579 if (!(test_bit(AGP_FF_IS_VALID, &priv->access_flags)))
589 if (test_bit(AGP_FF_IS_CLIENT, &priv->access_flags)) {
613 if (test_bit(AGP_FF_IS_CONTROLLER, &priv->access_flags)) {
644 struct agp_file_private *priv = file->private_data;
648 DBG("priv=%p", priv);
650 if (test_bit(AGP_FF_IS_CONTROLLER, &priv->access_flags)) {
653 controller = agp_find_controller_by_pid(priv->my_pid);
657 agp_controller_release_current(controller, priv);
663 if (test_bit(AGP_FF_IS_CLIENT, &priv->access_flags))
664 agp_remove_client(priv->my_pid);
666 agp_remove_file_private(priv);
667 kfree(priv);
676 struct agp_file_private *priv;
684 priv = kzalloc(sizeof(struct agp_file_private), GFP_KERNEL);
685 if (priv == NULL) {
690 set_bit(AGP_FF_ALLOW_CLIENT, &priv->access_flags);
691 priv->my_pid = current->pid;
694 /* Root priv, can be controller */
695 set_bit(AGP_FF_ALLOW_CONTROLLER, &priv->access_flags);
700 set_bit(AGP_FF_IS_CLIENT, &priv->access_flags);
701 set_bit(AGP_FF_IS_VALID, &priv->access_flags);
703 file->private_data = (void *) priv;
704 agp_insert_file_private(priv);
705 DBG("private=%p, client=%p", priv, client);
725 static int agpioc_info_wrap(struct agp_file_private *priv, void __user *arg)
748 int agpioc_acquire_wrap(struct agp_file_private *priv)
754 if (!(test_bit(AGP_FF_ALLOW_CONTROLLER, &priv->access_flags)))
770 controller = agp_find_controller_by_pid(priv->my_pid);
775 controller = agp_create_controller(priv->my_pid);
786 set_bit(AGP_FF_IS_CONTROLLER, &priv->access_flags);
787 set_bit(AGP_FF_IS_VALID, &priv->access_flags);
791 int agpioc_release_wrap(struct agp_file_private *priv)
794 agp_controller_release_current(agp_fe.current_controller, priv);
798 int agpioc_setup_wrap(struct agp_file_private *priv, void __user *arg)
810 static int agpioc_reserve_wrap(struct agp_file_private *priv, void __user *arg)
878 int agpioc_protect_wrap(struct agp_file_private *priv)
885 static int agpioc_allocate_wrap(struct agp_file_private *priv, void __user *arg)
912 int agpioc_deallocate_wrap(struct agp_file_private *priv, int arg)
926 static int agpioc_bind_wrap(struct agp_file_private *priv, void __user *arg)
943 static int agpioc_unbind_wrap(struct agp_file_private *priv, void __user *arg)
966 DBG("priv=%p, cmd=%x", curr_priv, cmd);