mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-29 21:56:39 +07:00
drm/nouveau: fix pinning of notifier block
Problem introduced with commit 6ba9a68317
Reported-by: Bob Gleitsmann <rjgleits@bellsouth.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
8706398bf8
commit
11dea1a214
@ -35,19 +35,22 @@ nouveau_notifier_init_channel(struct nouveau_channel *chan)
|
||||
{
|
||||
struct drm_device *dev = chan->dev;
|
||||
struct nouveau_bo *ntfy = NULL;
|
||||
uint32_t flags;
|
||||
uint32_t flags, ttmpl;
|
||||
int ret;
|
||||
|
||||
if (nouveau_vram_notify)
|
||||
if (nouveau_vram_notify) {
|
||||
flags = NOUVEAU_GEM_DOMAIN_VRAM;
|
||||
else
|
||||
ttmpl = TTM_PL_FLAG_VRAM;
|
||||
} else {
|
||||
flags = NOUVEAU_GEM_DOMAIN_GART;
|
||||
ttmpl = TTM_PL_FLAG_TT;
|
||||
}
|
||||
|
||||
ret = nouveau_gem_new(dev, NULL, PAGE_SIZE, 0, flags, 0, 0, &ntfy);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = nouveau_bo_pin(ntfy, flags);
|
||||
ret = nouveau_bo_pin(ntfy, ttmpl);
|
||||
if (ret)
|
||||
goto out_err;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user