Commit f126f41c authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-misc-fixes-2023-04-20-2' of...

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: default avatarDave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230420083114.GA17651@linux-uq9g
parents 6a8f57ae b63a553e
...@@ -645,7 +645,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, ...@@ -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_reloc *reloc,
struct drm_nouveau_gem_pushbuf_bo *bo) struct drm_nouveau_gem_pushbuf_bo *bo)
{ {
long ret = 0; int ret = 0;
unsigned i; unsigned i;
for (i = 0; i < req->nr_relocs; i++) { for (i = 0; i < req->nr_relocs; i++) {
...@@ -653,6 +653,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, ...@@ -653,6 +653,7 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
struct drm_nouveau_gem_pushbuf_bo *b; struct drm_nouveau_gem_pushbuf_bo *b;
struct nouveau_bo *nvbo; struct nouveau_bo *nvbo;
uint32_t data; uint32_t data;
long lret;
if (unlikely(r->bo_index >= req->nr_buffers)) { if (unlikely(r->bo_index >= req->nr_buffers)) {
NV_PRINTK(err, cli, "reloc bo index invalid\n"); NV_PRINTK(err, cli, "reloc bo index invalid\n");
...@@ -703,13 +704,18 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli, ...@@ -703,13 +704,18 @@ nouveau_gem_pushbuf_reloc_apply(struct nouveau_cli *cli,
data |= r->vor; data |= r->vor;
} }
ret = dma_resv_wait_timeout(nvbo->bo.base.resv, lret = dma_resv_wait_timeout(nvbo->bo.base.resv,
DMA_RESV_USAGE_BOOKKEEP, DMA_RESV_USAGE_BOOKKEEP,
false, 15 * HZ); false, 15 * HZ);
if (ret == 0) if (!lret)
ret = -EBUSY; ret = -EBUSY;
else if (lret > 0)
ret = 0;
else
ret = lret;
if (ret) { if (ret) {
NV_PRINTK(err, cli, "reloc wait_idle failed: %ld\n", NV_PRINTK(err, cli, "reloc wait_idle failed: %d\n",
ret); ret);
break; break;
} }
......
...@@ -839,6 +839,8 @@ static void vop2_enable(struct vop2 *vop2) ...@@ -839,6 +839,8 @@ static void vop2_enable(struct vop2 *vop2)
return; return;
} }
regcache_sync(vop2->map);
if (vop2->data->soc_id == 3566) if (vop2->data->soc_id == 3566)
vop2_writel(vop2, RK3568_OTP_WIN_EN, 1); vop2_writel(vop2, RK3568_OTP_WIN_EN, 1);
...@@ -867,6 +869,8 @@ static void vop2_disable(struct vop2 *vop2) ...@@ -867,6 +869,8 @@ static void vop2_disable(struct vop2 *vop2)
pm_runtime_put_sync(vop2->dev); pm_runtime_put_sync(vop2->dev);
regcache_mark_dirty(vop2->map);
clk_disable_unprepare(vop2->aclk); clk_disable_unprepare(vop2->aclk);
clk_disable_unprepare(vop2->hclk); clk_disable_unprepare(vop2->hclk);
} }
......
...@@ -308,6 +308,7 @@ static void drm_sched_start_timeout(struct drm_gpu_scheduler *sched) ...@@ -308,6 +308,7 @@ static void drm_sched_start_timeout(struct drm_gpu_scheduler *sched)
*/ */
void drm_sched_fault(struct drm_gpu_scheduler *sched) void drm_sched_fault(struct drm_gpu_scheduler *sched)
{ {
if (sched->ready)
mod_delayed_work(sched->timeout_wq, &sched->work_tdr, 0); mod_delayed_work(sched->timeout_wq, &sched->work_tdr, 0);
} }
EXPORT_SYMBOL(drm_sched_fault); EXPORT_SYMBOL(drm_sched_fault);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment