etnaviv fixes and MAINTAINERS patch
-----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJbRAoxAAoJEAx081l5xIa+zEgP/3umHHNNEF6GMcxVyPeBFoxd UFDVonPvHUD5ASNo9UV9YEMHrNRCvLVs2vd9EkWFaqxtik5Hy+VS+HHD1Mhr8DtE zGWuloOr1W3IXzNROBKqwjHwEPZp8LKQUxDxIkpei0X05cr3sO5xQWEjbPl+LkQD VsIaLyUGe6G8UN/+upaa6j03oh3L+JxCZt5vTEXVMEAIohsjtwC0wq//Lx92Lzd6 L7yQGPGWMKRWvt9XPcaEckLcgj9Ys3gBe3zmPvxy3M5R210oat2wS1GbHOba3lOl 8euZSRls6IXQeLY85VQpco1zT0YZaMsni3Q9kOzHiu1tH6cu++id7BY9zcJcLyUy uaUxtfOihNetnAdAeMGhJZukyPMtoip4r7lI57htr+bX4uTxpbVIl2bvT6Sih+bE kZGdxRSk7L+2rb55aREkdBLsIog+T1a4XEH/ARllGrs6V0Yy9HEvS+s8vFFerOoL ZWGEjVpoz2DsUOHPlhydbimyJ39ly3sw2h5VRe5hIaoc+/w3i5sX/jeAxc4zQNjm /qY4Gj9VaZBvdqAvC15tOT6U+fucPucjVx1AIdHNSaCldUb/mY+hdCs5fg0EDUab rayNXC9aK0ghx8jK0AV+GNzqdYikzaxchXD6foHvnXdVc1NQ3Paxo11aG+adlJvk uYz0R4dC83sA/yVvKIR9 =e1Tg -----END PGP SIGNATURE----- Merge tag 'drm-fixes-2018-07-10' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This just contains some etnaviv fixes and a MAINTAINERS update for the new drm tree locations" * tag 'drm-fixes-2018-07-10' of git://anongit.freedesktop.org/drm/drm: MAINTAINERS: update drm tree drm/etnaviv: bring back progress check in job timeout handler drm/etnaviv: Fix driver unregistering drm/etnaviv: Check for platform_device_register_simple() failure
This commit is contained in:
commit
30c2c32d7f
|
@ -581,7 +581,7 @@ W: https://www.infradead.org/~dhowells/kafs/
|
|||
|
||||
AGPGART DRIVER
|
||||
M: David Airlie <airlied@linux.ie>
|
||||
T: git git://people.freedesktop.org/~airlied/linux (part of drm maint)
|
||||
T: git git://anongit.freedesktop.org/drm/drm
|
||||
S: Maintained
|
||||
F: drivers/char/agp/
|
||||
F: include/linux/agp*
|
||||
|
@ -4630,7 +4630,7 @@ F: include/uapi/drm/vmwgfx_drm.h
|
|||
DRM DRIVERS
|
||||
M: David Airlie <airlied@linux.ie>
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
T: git git://people.freedesktop.org/~airlied/linux
|
||||
T: git git://anongit.freedesktop.org/drm/drm
|
||||
B: https://bugs.freedesktop.org/
|
||||
C: irc://chat.freenode.net/dri-devel
|
||||
S: Maintained
|
||||
|
|
|
@ -631,8 +631,11 @@ static struct platform_driver etnaviv_platform_driver = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct platform_device *etnaviv_drm;
|
||||
|
||||
static int __init etnaviv_init(void)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
int ret;
|
||||
struct device_node *np;
|
||||
|
||||
|
@ -644,7 +647,7 @@ static int __init etnaviv_init(void)
|
|||
|
||||
ret = platform_driver_register(&etnaviv_platform_driver);
|
||||
if (ret != 0)
|
||||
platform_driver_unregister(&etnaviv_gpu_driver);
|
||||
goto unregister_gpu_driver;
|
||||
|
||||
/*
|
||||
* If the DT contains at least one available GPU device, instantiate
|
||||
|
@ -653,20 +656,33 @@ static int __init etnaviv_init(void)
|
|||
for_each_compatible_node(np, NULL, "vivante,gc") {
|
||||
if (!of_device_is_available(np))
|
||||
continue;
|
||||
|
||||
platform_device_register_simple("etnaviv", -1, NULL, 0);
|
||||
pdev = platform_device_register_simple("etnaviv", -1,
|
||||
NULL, 0);
|
||||
if (IS_ERR(pdev)) {
|
||||
ret = PTR_ERR(pdev);
|
||||
of_node_put(np);
|
||||
goto unregister_platform_driver;
|
||||
}
|
||||
etnaviv_drm = pdev;
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
unregister_platform_driver:
|
||||
platform_driver_unregister(&etnaviv_platform_driver);
|
||||
unregister_gpu_driver:
|
||||
platform_driver_unregister(&etnaviv_gpu_driver);
|
||||
return ret;
|
||||
}
|
||||
module_init(etnaviv_init);
|
||||
|
||||
static void __exit etnaviv_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&etnaviv_gpu_driver);
|
||||
platform_device_unregister(etnaviv_drm);
|
||||
platform_driver_unregister(&etnaviv_platform_driver);
|
||||
platform_driver_unregister(&etnaviv_gpu_driver);
|
||||
}
|
||||
module_exit(etnaviv_exit);
|
||||
|
||||
|
|
|
@ -131,6 +131,9 @@ struct etnaviv_gpu {
|
|||
struct work_struct sync_point_work;
|
||||
int sync_point_event;
|
||||
|
||||
/* hang detection */
|
||||
u32 hangcheck_dma_addr;
|
||||
|
||||
void __iomem *mmio;
|
||||
int irq;
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "etnaviv_gem.h"
|
||||
#include "etnaviv_gpu.h"
|
||||
#include "etnaviv_sched.h"
|
||||
#include "state.xml.h"
|
||||
|
||||
static int etnaviv_job_hang_limit = 0;
|
||||
module_param_named(job_hang_limit, etnaviv_job_hang_limit, int , 0444);
|
||||
|
@ -85,6 +86,29 @@ static void etnaviv_sched_timedout_job(struct drm_sched_job *sched_job)
|
|||
{
|
||||
struct etnaviv_gem_submit *submit = to_etnaviv_submit(sched_job);
|
||||
struct etnaviv_gpu *gpu = submit->gpu;
|
||||
u32 dma_addr;
|
||||
int change;
|
||||
|
||||
/*
|
||||
* If the GPU managed to complete this jobs fence, the timout is
|
||||
* spurious. Bail out.
|
||||
*/
|
||||
if (fence_completed(gpu, submit->out_fence->seqno))
|
||||
return;
|
||||
|
||||
/*
|
||||
* If the GPU is still making forward progress on the front-end (which
|
||||
* should never loop) we shift out the timeout to give it a chance to
|
||||
* finish the job.
|
||||
*/
|
||||
dma_addr = gpu_read(gpu, VIVS_FE_DMA_ADDRESS);
|
||||
change = dma_addr - gpu->hangcheck_dma_addr;
|
||||
if (change < 0 || change > 16) {
|
||||
gpu->hangcheck_dma_addr = dma_addr;
|
||||
schedule_delayed_work(&sched_job->work_tdr,
|
||||
sched_job->sched->timeout);
|
||||
return;
|
||||
}
|
||||
|
||||
/* block scheduler */
|
||||
kthread_park(gpu->sched.thread);
|
||||
|
|
Loading…
Reference in New Issue