コード例 #1
0
ファイル: nouveau_drm.c プロジェクト: asmalldev/linux
static void
nouveau_cli_fini(struct nouveau_cli *cli)
{
	nvkm_vm_ref(NULL, &nvxx_client(&cli->base)->vm, NULL);
	usif_client_fini(cli);
	nvif_device_fini(&cli->device);
	nvif_client_fini(&cli->base);
}
コード例 #2
0
ファイル: nv_init.c プロジェクト: Aeternam/nouveau
int
main(int argc, char **argv)
{
    struct nvif_client client;
    struct nvif_device device;
    bool suspend = false, wait = false;
    int ret, c;

    while ((c = getopt(argc, argv, "sw"U_GETOPT)) != -1) {
        switch (c) {
        case 's':
            suspend = true;
            break;
        case 'w':
            wait = true;
            break;
        default:
            if (!u_option(c))
                return 1;
            break;
        }
    }

    ret = u_device(NULL, argv[0], "info", true, true, ~0ULL,
                   0x00000000, &client, &device);
    if (ret)
        return ret;

    if (suspend) {
        nvif_client_suspend(&client);
        nvif_client_resume(&client);
    }

    while (wait && (c = getchar()) == EOF) {
        sched_yield();
    }

    printf("shutting down...\n");
    nvif_device_fini(&device);
    nvif_client_fini(&client);
    printf("done!\n");
    return ret;
}
コード例 #3
0
ファイル: device.c プロジェクト: 168519/linux
static void
nvif_device_del(struct nvif_device *device)
{
	nvif_device_fini(device);
	kfree(device);
}