mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 18:14:07 +08:00
drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0
VRAM offset 0 is a valid address, triggered on GA102. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
add42781ad
commit
caeb6ab899
@ -222,7 +222,7 @@ nv50_dmac_wait(struct nvif_push *push, u32 size)
|
||||
|
||||
int
|
||||
nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
|
||||
const s32 *oclass, u8 head, void *data, u32 size, u64 syncbuf,
|
||||
const s32 *oclass, u8 head, void *data, u32 size, s64 syncbuf,
|
||||
struct nv50_dmac *dmac)
|
||||
{
|
||||
struct nouveau_cli *cli = (void *)device->object.client;
|
||||
@ -271,7 +271,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!syncbuf)
|
||||
if (syncbuf < 0)
|
||||
return 0;
|
||||
|
||||
ret = nvif_object_ctor(&dmac->base.user, "kmsSyncCtxDma", NV50_DISP_HANDLE_SYNCBUF,
|
||||
|
@ -95,7 +95,7 @@ struct nv50_outp_atom {
|
||||
|
||||
int nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
|
||||
const s32 *oclass, u8 head, void *data, u32 size,
|
||||
u64 syncbuf, struct nv50_dmac *dmac);
|
||||
s64 syncbuf, struct nv50_dmac *dmac);
|
||||
void nv50_dmac_destroy(struct nv50_dmac *);
|
||||
|
||||
/*
|
||||
|
@ -76,7 +76,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
|
||||
int ret;
|
||||
|
||||
ret = nv50_dmac_create(&drm->client.device, &disp->disp->object,
|
||||
&oclass, 0, &args, sizeof(args), 0,
|
||||
&oclass, 0, &args, sizeof(args), -1,
|
||||
&wndw->wimm);
|
||||
if (ret) {
|
||||
NV_ERROR(drm, "wimm%04x allocation failed: %d\n", oclass, ret);
|
||||
|
Loading…
Reference in New Issue
Block a user