Commit 6284a418 authored by Dave Airlie's avatar Dave Airlie

Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes

Two fixes:
One fixes a bad interaction with the DRM scheduler, leading to some dma
fences not getting signalled after hitting the job timeout. The other
one fixes a GPU init regression, as apparently one old core doesn't
likes us reading some of the identification registers.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Lucas Stach <l.stach@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/aceebfe3af636346f5252bdf727cdd988bdcbdf2.camel@pengutronix.de
parents 234a2c42 50248a3e
...@@ -337,9 +337,16 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu) ...@@ -337,9 +337,16 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu)
gpu->identity.model = gpu_read(gpu, VIVS_HI_CHIP_MODEL); gpu->identity.model = gpu_read(gpu, VIVS_HI_CHIP_MODEL);
gpu->identity.revision = gpu_read(gpu, VIVS_HI_CHIP_REV); gpu->identity.revision = gpu_read(gpu, VIVS_HI_CHIP_REV);
gpu->identity.product_id = gpu_read(gpu, VIVS_HI_CHIP_PRODUCT_ID);
gpu->identity.customer_id = gpu_read(gpu, VIVS_HI_CHIP_CUSTOMER_ID); gpu->identity.customer_id = gpu_read(gpu, VIVS_HI_CHIP_CUSTOMER_ID);
gpu->identity.eco_id = gpu_read(gpu, VIVS_HI_CHIP_ECO_ID);
/*
* Reading these two registers on GC600 rev 0x19 result in a
* unhandled fault: external abort on non-linefetch
*/
if (!etnaviv_is_model_rev(gpu, GC600, 0x19)) {
gpu->identity.product_id = gpu_read(gpu, VIVS_HI_CHIP_PRODUCT_ID);
gpu->identity.eco_id = gpu_read(gpu, VIVS_HI_CHIP_ECO_ID);
}
/* /*
* !!!! HACK ALERT !!!! * !!!! HACK ALERT !!!!
......
...@@ -89,12 +89,15 @@ static void etnaviv_sched_timedout_job(struct drm_sched_job *sched_job) ...@@ -89,12 +89,15 @@ static void etnaviv_sched_timedout_job(struct drm_sched_job *sched_job)
u32 dma_addr; u32 dma_addr;
int change; int change;
/* block scheduler */
drm_sched_stop(&gpu->sched, sched_job);
/* /*
* If the GPU managed to complete this jobs fence, the timout is * If the GPU managed to complete this jobs fence, the timout is
* spurious. Bail out. * spurious. Bail out.
*/ */
if (dma_fence_is_signaled(submit->out_fence)) if (dma_fence_is_signaled(submit->out_fence))
return; goto out_no_timeout;
/* /*
* If the GPU is still making forward progress on the front-end (which * If the GPU is still making forward progress on the front-end (which
...@@ -105,12 +108,9 @@ static void etnaviv_sched_timedout_job(struct drm_sched_job *sched_job) ...@@ -105,12 +108,9 @@ static void etnaviv_sched_timedout_job(struct drm_sched_job *sched_job)
change = dma_addr - gpu->hangcheck_dma_addr; change = dma_addr - gpu->hangcheck_dma_addr;
if (change < 0 || change > 16) { if (change < 0 || change > 16) {
gpu->hangcheck_dma_addr = dma_addr; gpu->hangcheck_dma_addr = dma_addr;
return; goto out_no_timeout;
} }
/* block scheduler */
drm_sched_stop(&gpu->sched, sched_job);
if(sched_job) if(sched_job)
drm_sched_increase_karma(sched_job); drm_sched_increase_karma(sched_job);
...@@ -120,6 +120,7 @@ static void etnaviv_sched_timedout_job(struct drm_sched_job *sched_job) ...@@ -120,6 +120,7 @@ static void etnaviv_sched_timedout_job(struct drm_sched_job *sched_job)
drm_sched_resubmit_jobs(&gpu->sched); drm_sched_resubmit_jobs(&gpu->sched);
out_no_timeout:
/* restart scheduler after GPU is usable again */ /* restart scheduler after GPU is usable again */
drm_sched_start(&gpu->sched, true); drm_sched_start(&gpu->sched, true);
} }
......
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