Merge tag 'drm-misc-fixes-2023-04-20-2' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
Short summary of fixes pull: * nouveau: fix dma-resv timeout * rockchip: fix suspend/resume * sched: fix timeout handling Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230420083114.GA17651@linux-uq9g
This commit is contained in:
@@ -645,7 +645,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
|
||||
struct drm_nouveau_gem_pushbuf_reloc *reloc,
|
||||
struct drm_nouveau_gem_pushbuf_bo *bo)
|
||||
{
|
||||
long ret = 0;
|
||||
int ret = 0;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < req->nr_relocs; i++) {
|
||||
@@ -653,6 +653,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
|
||||
struct drm_nouveau_gem_pushbuf_bo *b;
|
||||
struct nouveau_bo *nvbo;
|
||||
uint32_t data;
|
||||
long lret;
|
||||
|
||||
if (unlikely(r->bo_index >= req->nr_buffers)) {
|
||||
NV_PRINTK(err, cli, "reloc bo index invalid\n");
|
||||
@@ -703,13 +704,18 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
|
||||
data |= r->vor;
|
||||
}
|
||||
|
||||
ret = dma_resv_wait_timeout(nvbo->bo.base.resv,
|
||||
DMA_RESV_USAGE_BOOKKEEP,
|
||||
false, 15 * HZ);
|
||||
if (ret == 0)
|
||||
lret = dma_resv_wait_timeout(nvbo->bo.base.resv,
|
||||
DMA_RESV_USAGE_BOOKKEEP,
|
||||
false, 15 * HZ);
|
||||
if (!lret)
|
||||
ret = -EBUSY;
|
||||
else if (lret > 0)
|
||||
ret = 0;
|
||||
else
|
||||
ret = lret;
|
||||
|
||||
if (ret) {
|
||||
NV_PRINTK(err, cli, "reloc wait_idle failed: %ld\n",
|
||||
NV_PRINTK(err, cli, "reloc wait_idle failed: %d\n",
|
||||
ret);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -839,6 +839,8 @@ static void vop2_enable(struct vop2 *vop2)
|
||||
return;
|
||||
}
|
||||
|
||||
regcache_sync(vop2->map);
|
||||
|
||||
if (vop2->data->soc_id == 3566)
|
||||
vop2_writel(vop2, RK3568_OTP_WIN_EN, 1);
|
||||
|
||||
@@ -867,6 +869,8 @@ static void vop2_disable(struct vop2 *vop2)
|
||||
|
||||
pm_runtime_put_sync(vop2->dev);
|
||||
|
||||
regcache_mark_dirty(vop2->map);
|
||||
|
||||
clk_disable_unprepare(vop2->aclk);
|
||||
clk_disable_unprepare(vop2->hclk);
|
||||
}
|
||||
|
||||
@@ -308,7 +308,8 @@ static void drm_sched_start_timeout(struct drm_gpu_scheduler *sched)
|
||||
*/
|
||||
void drm_sched_fault(struct drm_gpu_scheduler *sched)
|
||||
{
|
||||
mod_delayed_work(sched->timeout_wq, &sched->work_tdr, 0);
|
||||
if (sched->ready)
|
||||
mod_delayed_work(sched->timeout_wq, &sched->work_tdr, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_sched_fault);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user