Lines Matching refs:cmd_p

500 	struct virtio_gpu_resource_create_2d *cmd_p;  in virtio_gpu_cmd_create_resource()  local
503 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_create_resource()
504 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_create_resource()
507 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_CREATE_2D); in virtio_gpu_cmd_create_resource()
508 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_create_resource()
509 cmd_p->format = cpu_to_le32(params->format); in virtio_gpu_cmd_create_resource()
510 cmd_p->width = cpu_to_le32(params->width); in virtio_gpu_cmd_create_resource()
511 cmd_p->height = cpu_to_le32(params->height); in virtio_gpu_cmd_create_resource()
531 struct virtio_gpu_resource_unref *cmd_p; in virtio_gpu_cmd_unref_resource() local
535 cmd_p = virtio_gpu_alloc_cmd_cb(vgdev, &vbuf, sizeof(*cmd_p), in virtio_gpu_cmd_unref_resource()
537 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_unref_resource()
539 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_UNREF); in virtio_gpu_cmd_unref_resource()
540 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_unref_resource()
553 struct virtio_gpu_set_scanout *cmd_p; in virtio_gpu_cmd_set_scanout() local
556 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_set_scanout()
557 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_set_scanout()
559 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_SET_SCANOUT); in virtio_gpu_cmd_set_scanout()
560 cmd_p->resource_id = cpu_to_le32(resource_id); in virtio_gpu_cmd_set_scanout()
561 cmd_p->scanout_id = cpu_to_le32(scanout_id); in virtio_gpu_cmd_set_scanout()
562 cmd_p->r.width = cpu_to_le32(width); in virtio_gpu_cmd_set_scanout()
563 cmd_p->r.height = cpu_to_le32(height); in virtio_gpu_cmd_set_scanout()
564 cmd_p->r.x = cpu_to_le32(x); in virtio_gpu_cmd_set_scanout()
565 cmd_p->r.y = cpu_to_le32(y); in virtio_gpu_cmd_set_scanout()
577 struct virtio_gpu_resource_flush *cmd_p; in virtio_gpu_cmd_resource_flush() local
580 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_resource_flush()
581 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_resource_flush()
584 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_FLUSH); in virtio_gpu_cmd_resource_flush()
585 cmd_p->resource_id = cpu_to_le32(resource_id); in virtio_gpu_cmd_resource_flush()
586 cmd_p->r.width = cpu_to_le32(width); in virtio_gpu_cmd_resource_flush()
587 cmd_p->r.height = cpu_to_le32(height); in virtio_gpu_cmd_resource_flush()
588 cmd_p->r.x = cpu_to_le32(x); in virtio_gpu_cmd_resource_flush()
589 cmd_p->r.y = cpu_to_le32(y); in virtio_gpu_cmd_resource_flush()
602 struct virtio_gpu_transfer_to_host_2d *cmd_p; in virtio_gpu_cmd_transfer_to_host_2d() local
610 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_transfer_to_host_2d()
611 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_transfer_to_host_2d()
614 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D); in virtio_gpu_cmd_transfer_to_host_2d()
615 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_transfer_to_host_2d()
616 cmd_p->offset = cpu_to_le64(offset); in virtio_gpu_cmd_transfer_to_host_2d()
617 cmd_p->r.width = cpu_to_le32(width); in virtio_gpu_cmd_transfer_to_host_2d()
618 cmd_p->r.height = cpu_to_le32(height); in virtio_gpu_cmd_transfer_to_host_2d()
619 cmd_p->r.x = cpu_to_le32(x); in virtio_gpu_cmd_transfer_to_host_2d()
620 cmd_p->r.y = cpu_to_le32(y); in virtio_gpu_cmd_transfer_to_host_2d()
632 struct virtio_gpu_resource_attach_backing *cmd_p; in virtio_gpu_cmd_resource_attach_backing() local
635 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_resource_attach_backing()
636 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_resource_attach_backing()
638 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING); in virtio_gpu_cmd_resource_attach_backing()
639 cmd_p->resource_id = cpu_to_le32(resource_id); in virtio_gpu_cmd_resource_attach_backing()
640 cmd_p->nr_entries = cpu_to_le32(nents); in virtio_gpu_cmd_resource_attach_backing()
764 struct virtio_gpu_ctrl_hdr *cmd_p; in virtio_gpu_cmd_get_display_info() local
773 cmd_p = virtio_gpu_alloc_cmd_resp in virtio_gpu_cmd_get_display_info()
775 sizeof(*cmd_p), sizeof(struct virtio_gpu_resp_display_info), in virtio_gpu_cmd_get_display_info()
777 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_get_display_info()
780 cmd_p->type = cpu_to_le32(VIRTIO_GPU_CMD_GET_DISPLAY_INFO); in virtio_gpu_cmd_get_display_info()
787 struct virtio_gpu_get_capset_info *cmd_p; in virtio_gpu_cmd_get_capset_info() local
796 cmd_p = virtio_gpu_alloc_cmd_resp in virtio_gpu_cmd_get_capset_info()
798 sizeof(*cmd_p), sizeof(struct virtio_gpu_resp_capset_info), in virtio_gpu_cmd_get_capset_info()
800 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_get_capset_info()
802 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_GET_CAPSET_INFO); in virtio_gpu_cmd_get_capset_info()
803 cmd_p->capset_index = cpu_to_le32(idx); in virtio_gpu_cmd_get_capset_info()
812 struct virtio_gpu_get_capset *cmd_p; in virtio_gpu_cmd_get_capset() local
871 cmd_p = virtio_gpu_alloc_cmd_resp in virtio_gpu_cmd_get_capset()
872 (vgdev, &virtio_gpu_cmd_capset_cb, &vbuf, sizeof(*cmd_p), in virtio_gpu_cmd_get_capset()
875 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_GET_CAPSET); in virtio_gpu_cmd_get_capset()
876 cmd_p->capset_id = cpu_to_le32(vgdev->capsets[idx].id); in virtio_gpu_cmd_get_capset()
877 cmd_p->capset_version = cpu_to_le32(version); in virtio_gpu_cmd_get_capset()
886 struct virtio_gpu_cmd_get_edid *cmd_p; in virtio_gpu_cmd_get_edids() local
900 cmd_p = virtio_gpu_alloc_cmd_resp in virtio_gpu_cmd_get_edids()
902 sizeof(*cmd_p), sizeof(struct virtio_gpu_resp_edid), in virtio_gpu_cmd_get_edids()
904 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_GET_EDID); in virtio_gpu_cmd_get_edids()
905 cmd_p->scanout = cpu_to_le32(scanout); in virtio_gpu_cmd_get_edids()
916 struct virtio_gpu_ctx_create *cmd_p; in virtio_gpu_cmd_context_create() local
919 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_context_create()
920 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_context_create()
922 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_CTX_CREATE); in virtio_gpu_cmd_context_create()
923 cmd_p->hdr.ctx_id = cpu_to_le32(id); in virtio_gpu_cmd_context_create()
924 cmd_p->nlen = cpu_to_le32(nlen); in virtio_gpu_cmd_context_create()
925 cmd_p->context_init = cpu_to_le32(context_init); in virtio_gpu_cmd_context_create()
926 strscpy(cmd_p->debug_name, name, sizeof(cmd_p->debug_name)); in virtio_gpu_cmd_context_create()
933 struct virtio_gpu_ctx_destroy *cmd_p; in virtio_gpu_cmd_context_destroy() local
936 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_context_destroy()
937 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_context_destroy()
939 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_CTX_DESTROY); in virtio_gpu_cmd_context_destroy()
940 cmd_p->hdr.ctx_id = cpu_to_le32(id); in virtio_gpu_cmd_context_destroy()
949 struct virtio_gpu_ctx_resource *cmd_p; in virtio_gpu_cmd_context_attach_resource() local
952 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_context_attach_resource()
953 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_context_attach_resource()
956 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_CTX_ATTACH_RESOURCE); in virtio_gpu_cmd_context_attach_resource()
957 cmd_p->hdr.ctx_id = cpu_to_le32(ctx_id); in virtio_gpu_cmd_context_attach_resource()
958 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_context_attach_resource()
967 struct virtio_gpu_ctx_resource *cmd_p; in virtio_gpu_cmd_context_detach_resource() local
970 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_context_detach_resource()
971 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_context_detach_resource()
974 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_CTX_DETACH_RESOURCE); in virtio_gpu_cmd_context_detach_resource()
975 cmd_p->hdr.ctx_id = cpu_to_le32(ctx_id); in virtio_gpu_cmd_context_detach_resource()
976 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_context_detach_resource()
987 struct virtio_gpu_resource_create_3d *cmd_p; in virtio_gpu_cmd_resource_create_3d() local
990 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_resource_create_3d()
991 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_resource_create_3d()
994 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_CREATE_3D); in virtio_gpu_cmd_resource_create_3d()
995 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_resource_create_3d()
996 cmd_p->format = cpu_to_le32(params->format); in virtio_gpu_cmd_resource_create_3d()
997 cmd_p->width = cpu_to_le32(params->width); in virtio_gpu_cmd_resource_create_3d()
998 cmd_p->height = cpu_to_le32(params->height); in virtio_gpu_cmd_resource_create_3d()
1000 cmd_p->target = cpu_to_le32(params->target); in virtio_gpu_cmd_resource_create_3d()
1001 cmd_p->bind = cpu_to_le32(params->bind); in virtio_gpu_cmd_resource_create_3d()
1002 cmd_p->depth = cpu_to_le32(params->depth); in virtio_gpu_cmd_resource_create_3d()
1003 cmd_p->array_size = cpu_to_le32(params->array_size); in virtio_gpu_cmd_resource_create_3d()
1004 cmd_p->last_level = cpu_to_le32(params->last_level); in virtio_gpu_cmd_resource_create_3d()
1005 cmd_p->nr_samples = cpu_to_le32(params->nr_samples); in virtio_gpu_cmd_resource_create_3d()
1006 cmd_p->flags = cpu_to_le32(params->flags); in virtio_gpu_cmd_resource_create_3d()
1023 struct virtio_gpu_transfer_host_3d *cmd_p; in virtio_gpu_cmd_transfer_to_host_3d() local
1031 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_transfer_to_host_3d()
1032 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_transfer_to_host_3d()
1036 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_TRANSFER_TO_HOST_3D); in virtio_gpu_cmd_transfer_to_host_3d()
1037 cmd_p->hdr.ctx_id = cpu_to_le32(ctx_id); in virtio_gpu_cmd_transfer_to_host_3d()
1038 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_transfer_to_host_3d()
1039 convert_to_hw_box(&cmd_p->box, box); in virtio_gpu_cmd_transfer_to_host_3d()
1040 cmd_p->offset = cpu_to_le64(offset); in virtio_gpu_cmd_transfer_to_host_3d()
1041 cmd_p->level = cpu_to_le32(level); in virtio_gpu_cmd_transfer_to_host_3d()
1042 cmd_p->stride = cpu_to_le32(stride); in virtio_gpu_cmd_transfer_to_host_3d()
1043 cmd_p->layer_stride = cpu_to_le32(layer_stride); in virtio_gpu_cmd_transfer_to_host_3d()
1058 struct virtio_gpu_transfer_host_3d *cmd_p; in virtio_gpu_cmd_transfer_from_host_3d() local
1061 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_transfer_from_host_3d()
1062 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_transfer_from_host_3d()
1066 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_TRANSFER_FROM_HOST_3D); in virtio_gpu_cmd_transfer_from_host_3d()
1067 cmd_p->hdr.ctx_id = cpu_to_le32(ctx_id); in virtio_gpu_cmd_transfer_from_host_3d()
1068 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_transfer_from_host_3d()
1069 convert_to_hw_box(&cmd_p->box, box); in virtio_gpu_cmd_transfer_from_host_3d()
1070 cmd_p->offset = cpu_to_le64(offset); in virtio_gpu_cmd_transfer_from_host_3d()
1071 cmd_p->level = cpu_to_le32(level); in virtio_gpu_cmd_transfer_from_host_3d()
1072 cmd_p->stride = cpu_to_le32(stride); in virtio_gpu_cmd_transfer_from_host_3d()
1073 cmd_p->layer_stride = cpu_to_le32(layer_stride); in virtio_gpu_cmd_transfer_from_host_3d()
1084 struct virtio_gpu_cmd_submit *cmd_p; in virtio_gpu_cmd_submit() local
1087 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_submit()
1088 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_submit()
1094 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_SUBMIT_3D); in virtio_gpu_cmd_submit()
1095 cmd_p->hdr.ctx_id = cpu_to_le32(ctx_id); in virtio_gpu_cmd_submit()
1096 cmd_p->size = cpu_to_le32(data_size); in virtio_gpu_cmd_submit()
1151 struct virtio_gpu_resource_assign_uuid *cmd_p; in virtio_gpu_cmd_resource_assign_uuid() local
1164 cmd_p = virtio_gpu_alloc_cmd_resp in virtio_gpu_cmd_resource_assign_uuid()
1165 (vgdev, virtio_gpu_cmd_resource_uuid_cb, &vbuf, sizeof(*cmd_p), in virtio_gpu_cmd_resource_assign_uuid()
1167 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_resource_assign_uuid()
1169 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID); in virtio_gpu_cmd_resource_assign_uuid()
1170 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_resource_assign_uuid()
1203 struct virtio_gpu_resource_map_blob *cmd_p; in virtio_gpu_cmd_map() local
1212 cmd_p = virtio_gpu_alloc_cmd_resp in virtio_gpu_cmd_map()
1213 (vgdev, virtio_gpu_cmd_resource_map_cb, &vbuf, sizeof(*cmd_p), in virtio_gpu_cmd_map()
1215 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_map()
1217 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_MAP_BLOB); in virtio_gpu_cmd_map()
1218 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_map()
1219 cmd_p->offset = cpu_to_le64(offset); in virtio_gpu_cmd_map()
1229 struct virtio_gpu_resource_unmap_blob *cmd_p; in virtio_gpu_cmd_unmap() local
1232 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_unmap()
1233 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_unmap()
1235 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_UNMAP_BLOB); in virtio_gpu_cmd_unmap()
1236 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_unmap()
1248 struct virtio_gpu_resource_create_blob *cmd_p; in virtio_gpu_cmd_resource_create_blob() local
1251 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_resource_create_blob()
1252 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_resource_create_blob()
1254 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_RESOURCE_CREATE_BLOB); in virtio_gpu_cmd_resource_create_blob()
1255 cmd_p->hdr.ctx_id = cpu_to_le32(params->ctx_id); in virtio_gpu_cmd_resource_create_blob()
1256 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_resource_create_blob()
1257 cmd_p->blob_mem = cpu_to_le32(params->blob_mem); in virtio_gpu_cmd_resource_create_blob()
1258 cmd_p->blob_flags = cpu_to_le32(params->blob_flags); in virtio_gpu_cmd_resource_create_blob()
1259 cmd_p->blob_id = cpu_to_le64(params->blob_id); in virtio_gpu_cmd_resource_create_blob()
1260 cmd_p->size = cpu_to_le64(params->size); in virtio_gpu_cmd_resource_create_blob()
1261 cmd_p->nr_entries = cpu_to_le32(nents); in virtio_gpu_cmd_resource_create_blob()
1278 struct virtio_gpu_set_scanout_blob *cmd_p; in virtio_gpu_cmd_set_scanout_blob() local
1282 cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); in virtio_gpu_cmd_set_scanout_blob()
1283 memset(cmd_p, 0, sizeof(*cmd_p)); in virtio_gpu_cmd_set_scanout_blob()
1285 cmd_p->hdr.type = cpu_to_le32(VIRTIO_GPU_CMD_SET_SCANOUT_BLOB); in virtio_gpu_cmd_set_scanout_blob()
1286 cmd_p->resource_id = cpu_to_le32(bo->hw_res_handle); in virtio_gpu_cmd_set_scanout_blob()
1287 cmd_p->scanout_id = cpu_to_le32(scanout_id); in virtio_gpu_cmd_set_scanout_blob()
1289 cmd_p->format = cpu_to_le32(format); in virtio_gpu_cmd_set_scanout_blob()
1290 cmd_p->width = cpu_to_le32(fb->width); in virtio_gpu_cmd_set_scanout_blob()
1291 cmd_p->height = cpu_to_le32(fb->height); in virtio_gpu_cmd_set_scanout_blob()
1294 cmd_p->strides[i] = cpu_to_le32(fb->pitches[i]); in virtio_gpu_cmd_set_scanout_blob()
1295 cmd_p->offsets[i] = cpu_to_le32(fb->offsets[i]); in virtio_gpu_cmd_set_scanout_blob()
1298 cmd_p->r.width = cpu_to_le32(width); in virtio_gpu_cmd_set_scanout_blob()
1299 cmd_p->r.height = cpu_to_le32(height); in virtio_gpu_cmd_set_scanout_blob()
1300 cmd_p->r.x = cpu_to_le32(x); in virtio_gpu_cmd_set_scanout_blob()
1301 cmd_p->r.y = cpu_to_le32(y); in virtio_gpu_cmd_set_scanout_blob()