]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/nouveau: remove nouveau_chan.device
authorBen Skeggs <bskeggs@nvidia.com>
Fri, 26 Jul 2024 04:38:23 +0000 (14:38 +1000)
committerDanilo Krummrich <dakr@kernel.org>
Sat, 27 Jul 2024 01:05:46 +0000 (03:05 +0200)
nouveau_chan.device is always the same as nouveau_chan.cli.device,
so there's no need to store it separately.

Signed-off-by: Ben Skeggs <bskeggs@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240726043828.58966-33-bskeggs@nvidia.com
drivers/gpu/drm/nouveau/nouveau_chan.c
drivers/gpu/drm/nouveau/nouveau_chan.h

index e18a80fda2ca20507dc0bd5f4272eb12e100272d..127bd518030d6d3b0ab783e9b8a77ac06a192dff 100644 (file)
@@ -157,7 +157,6 @@ nouveau_channel_prep(struct nouveau_cli *cli,
                return -ENOMEM;
 
        chan->cli = cli;
-       chan->device = device;
        chan->drm = drm;
        chan->vmm = nouveau_cli_vmm(cli);
        atomic_set(&chan->killed, 0);
@@ -364,8 +363,9 @@ nouveau_channel_ctor(struct nouveau_cli *cli, bool priv, u64 runm,
 static int
 nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
 {
-       struct nvif_device *device = chan->device;
-       struct nouveau_drm *drm = chan->drm;
+       struct nouveau_cli *cli = chan->cli;
+       struct nouveau_drm *drm = cli->drm;
+       struct nvif_device *device = &cli->device;
        struct nv_dma_v0 args = {};
        int ret, i;
 
index 260febd634ee21676dfce72bdcd681189d7dd556..18a9cbfef8ca323050dc25ef6d787494056bd14a 100644 (file)
@@ -13,7 +13,6 @@ struct nouveau_channel {
        } chan;
 
        struct nouveau_cli *cli;
-       struct nvif_device *device;
        struct nouveau_drm *drm;
        struct nouveau_vmm *vmm;