mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 01:48:11 +07:00
Merge branch 'linux-5.1' of git://github.com/skeggsb/linux into drm-fixes
Some minor nouveau dmem and other fixes. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Ben Skeggs <bskeggs@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/CABDvA==kMkD6n-cS9KpQBcTU1E8p7Wc+H1ZuOhSfD7yTFJVvkw@mail.gmail.com
This commit is contained in:
commit
cd84579112
@ -181,7 +181,7 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf,
|
||||
}
|
||||
|
||||
ret = pm_runtime_get_sync(drm->dev);
|
||||
if (IS_ERR_VALUE(ret) && ret != -EACCES)
|
||||
if (ret < 0 && ret != -EACCES)
|
||||
return ret;
|
||||
ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args));
|
||||
pm_runtime_put_autosuspend(drm->dev);
|
||||
|
@ -100,12 +100,10 @@ static void
|
||||
nouveau_dmem_free(struct hmm_devmem *devmem, struct page *page)
|
||||
{
|
||||
struct nouveau_dmem_chunk *chunk;
|
||||
struct nouveau_drm *drm;
|
||||
unsigned long idx;
|
||||
|
||||
chunk = (void *)hmm_devmem_page_get_drvdata(page);
|
||||
idx = page_to_pfn(page) - chunk->pfn_first;
|
||||
drm = chunk->drm;
|
||||
|
||||
/*
|
||||
* FIXME:
|
||||
@ -456,11 +454,6 @@ nouveau_dmem_resume(struct nouveau_drm *drm)
|
||||
/* FIXME handle pin failure */
|
||||
WARN_ON(ret);
|
||||
}
|
||||
list_for_each_entry (chunk, &drm->dmem->chunk_empty, list) {
|
||||
ret = nouveau_bo_pin(chunk->bo, TTM_PL_FLAG_VRAM, false);
|
||||
/* FIXME handle pin failure */
|
||||
WARN_ON(ret);
|
||||
}
|
||||
mutex_unlock(&drm->dmem->mutex);
|
||||
}
|
||||
|
||||
@ -479,9 +472,6 @@ nouveau_dmem_suspend(struct nouveau_drm *drm)
|
||||
list_for_each_entry (chunk, &drm->dmem->chunk_full, list) {
|
||||
nouveau_bo_unpin(chunk->bo);
|
||||
}
|
||||
list_for_each_entry (chunk, &drm->dmem->chunk_empty, list) {
|
||||
nouveau_bo_unpin(chunk->bo);
|
||||
}
|
||||
mutex_unlock(&drm->dmem->mutex);
|
||||
}
|
||||
|
||||
@ -623,7 +613,7 @@ nouveau_dmem_init(struct nouveau_drm *drm)
|
||||
*/
|
||||
drm->dmem->devmem = hmm_devmem_add(&nouveau_dmem_devmem_ops,
|
||||
device, size);
|
||||
if (drm->dmem->devmem == NULL) {
|
||||
if (IS_ERR(drm->dmem->devmem)) {
|
||||
kfree(drm->dmem);
|
||||
drm->dmem = NULL;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user