mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 06:53:04 +00:00
drm/nouveau: pass drm to nv50_dmac_create(), rather than device+disp
Both of these are stored in nouveau_drm already. 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-31-bskeggs@nvidia.com
This commit is contained in:
parent
0fa0955acd
commit
3019023ec9
|
@ -307,7 +307,6 @@ base507c_new_(const struct nv50_wndw_func *func, const u32 *format,
|
|||
struct nvif_disp_chan_v0 args = {
|
||||
.id = head,
|
||||
};
|
||||
struct nouveau_display *disp = nouveau_display(drm->dev);
|
||||
struct nv50_disp *disp50 = nv50_disp(drm->dev);
|
||||
struct nv50_wndw *wndw;
|
||||
int ret;
|
||||
|
@ -318,7 +317,7 @@ base507c_new_(const struct nv50_wndw_func *func, const u32 *format,
|
|||
if (*pwndw = wndw, ret)
|
||||
return ret;
|
||||
|
||||
ret = nv50_dmac_create(&drm->client.device, &disp->disp.object,
|
||||
ret = nv50_dmac_create(drm,
|
||||
&oclass, head, &args, sizeof(args),
|
||||
disp50->sync->offset, &wndw->wndw);
|
||||
if (ret) {
|
||||
|
|
|
@ -166,7 +166,7 @@ core507d_new_(const struct nv50_core_func *func, struct nouveau_drm *drm,
|
|||
return -ENOMEM;
|
||||
core->func = func;
|
||||
|
||||
ret = nv50_dmac_create(&drm->client.device, &disp->disp->object,
|
||||
ret = nv50_dmac_create(drm,
|
||||
&oclass, 0, &args, sizeof(args),
|
||||
disp->sync->offset, &core->chan);
|
||||
if (ret) {
|
||||
|
|
|
@ -229,11 +229,12 @@ static int nv50_dmac_vram_pushbuf = -1;
|
|||
module_param_named(kms_vram_pushbuf, nv50_dmac_vram_pushbuf, int, 0400);
|
||||
|
||||
int
|
||||
nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
|
||||
nv50_dmac_create(struct nouveau_drm *drm,
|
||||
const s32 *oclass, u8 head, void *data, u32 size, s64 syncbuf,
|
||||
struct nv50_dmac *dmac)
|
||||
{
|
||||
struct nouveau_cli *cli = (void *)device->object.client;
|
||||
struct nvif_device *device = &drm->device;
|
||||
struct nvif_object *disp = &drm->display->disp.object;
|
||||
struct nvif_disp_chan_v0 *args = data;
|
||||
u8 type = NVIF_MEM_COHERENT;
|
||||
int ret;
|
||||
|
@ -253,8 +254,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
|
|||
(nv50_dmac_vram_pushbuf < 0 && device->info.family == NV_DEVICE_INFO_V0_PASCAL))
|
||||
type |= NVIF_MEM_VRAM;
|
||||
|
||||
ret = nvif_mem_ctor_map(&cli->mmu, "kmsChanPush", type, 0x1000,
|
||||
&dmac->_push.mem);
|
||||
ret = nvif_mem_ctor_map(&drm->mmu, "kmsChanPush", type, 0x1000, &dmac->_push.mem);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ struct nv50_outp_atom {
|
|||
} set, clr;
|
||||
};
|
||||
|
||||
int nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
|
||||
int nv50_dmac_create(struct nouveau_drm *,
|
||||
const s32 *oclass, u8 head, void *data, u32 size,
|
||||
s64 syncbuf, struct nv50_dmac *dmac);
|
||||
void nv50_dmac_destroy(struct nv50_dmac *);
|
||||
|
|
|
@ -159,7 +159,7 @@ ovly507e_new_(const struct nv50_wndw_func *func, const u32 *format,
|
|||
if (*pwndw = wndw, ret)
|
||||
return ret;
|
||||
|
||||
ret = nv50_dmac_create(&drm->client.device, &disp->disp->object,
|
||||
ret = nv50_dmac_create(drm,
|
||||
&oclass, 0, &args, sizeof(args),
|
||||
disp->sync->offset, &wndw->wndw);
|
||||
if (ret) {
|
||||
|
|
|
@ -71,10 +71,9 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
|
|||
struct nvif_disp_chan_v0 args = {
|
||||
.id = wndw->id,
|
||||
};
|
||||
struct nv50_disp *disp = nv50_disp(drm->dev);
|
||||
int ret;
|
||||
|
||||
ret = nv50_dmac_create(&drm->client.device, &disp->disp->object,
|
||||
ret = nv50_dmac_create(drm,
|
||||
&oclass, 0, &args, sizeof(args), -1,
|
||||
&wndw->wimm);
|
||||
if (ret) {
|
||||
|
|
|
@ -363,7 +363,7 @@ wndwc37e_new_(const struct nv50_wndw_func *func, struct nouveau_drm *drm,
|
|||
if (*pwndw = wndw, ret)
|
||||
return ret;
|
||||
|
||||
ret = nv50_dmac_create(&drm->client.device, &disp->disp->object,
|
||||
ret = nv50_dmac_create(drm,
|
||||
&oclass, 0, &args, sizeof(args),
|
||||
disp->sync->offset, &wndw->wndw);
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user