mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 18:24:14 +08:00
drm/nouveau/core/client: destroy client objects over nvif
Preparation for supporting subclients, and also good for consistency. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
2c3af924fb
commit
05da248bbe
@ -71,15 +71,6 @@ nvkm_client_suspend(void *priv)
|
|||||||
return nvkm_object_fini(&client->object, true);
|
return nvkm_object_fini(&client->object, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
nvkm_client_driver_fini(void *priv)
|
|
||||||
{
|
|
||||||
struct nvkm_client *client = priv;
|
|
||||||
struct nvkm_object *object = &client->object;
|
|
||||||
nvkm_object_fini(object, false);
|
|
||||||
nvkm_object_del(&object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
nvkm_client_ntfy(const void *header, u32 length, const void *data, u32 size)
|
nvkm_client_ntfy(const void *header, u32 length, const void *data, u32 size)
|
||||||
{
|
{
|
||||||
@ -128,7 +119,6 @@ const struct nvif_driver
|
|||||||
nvif_driver_nvkm = {
|
nvif_driver_nvkm = {
|
||||||
.name = "nvkm",
|
.name = "nvkm",
|
||||||
.init = nvkm_client_driver_init,
|
.init = nvkm_client_driver_init,
|
||||||
.fini = nvkm_client_driver_fini,
|
|
||||||
.suspend = nvkm_client_suspend,
|
.suspend = nvkm_client_suspend,
|
||||||
.resume = nvkm_client_resume,
|
.resume = nvkm_client_resume,
|
||||||
.ioctl = nvkm_client_ioctl,
|
.ioctl = nvkm_client_ioctl,
|
||||||
|
@ -47,11 +47,11 @@ nvif_client_resume(struct nvif_client *client)
|
|||||||
void
|
void
|
||||||
nvif_client_fini(struct nvif_client *client)
|
nvif_client_fini(struct nvif_client *client)
|
||||||
{
|
{
|
||||||
|
nvif_object_fini(&client->object);
|
||||||
if (client->driver) {
|
if (client->driver) {
|
||||||
client->driver->fini(client->object.priv);
|
if (client->driver->fini)
|
||||||
|
client->driver->fini(client->object.priv);
|
||||||
client->driver = NULL;
|
client->driver = NULL;
|
||||||
client->object.client = NULL;
|
|
||||||
nvif_object_fini(&client->object);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ nvkm_ioctl_del(struct nvkm_client *client,
|
|||||||
nvkm_object_del(&object);
|
nvkm_object_del(&object);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret ? ret : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -441,12 +441,13 @@ nvkm_ioctl(struct nvkm_client *client, bool supervisor,
|
|||||||
&args->v0.route, &args->v0.token);
|
&args->v0.route, &args->v0.token);
|
||||||
}
|
}
|
||||||
|
|
||||||
nvif_ioctl(object, "return %d\n", ret);
|
if (ret != 1) {
|
||||||
if (hack) {
|
nvif_ioctl(object, "return %d\n", ret);
|
||||||
*hack = client->data;
|
if (hack) {
|
||||||
client->data = NULL;
|
*hack = client->data;
|
||||||
|
client->data = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client->super = false;
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user