Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion drivers/gpu/drm/agx/agx.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ struct agx_device {
const struct asc_segment *segs;
int nsegs;
phys_addr_t sgx, fender;
void __iomem *rgx; /* read only, for the MMU fault status */

/* Firmware structures, see agx_fw.c. */
void *buf;
Expand Down
4 changes: 0 additions & 4 deletions drivers/gpu/drm/agx/agx_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,10 +874,6 @@ static int agx_probe(struct platform_device *pdev)
if (!res)
return dev_err_probe(dev, -EINVAL, "no sgx registers\n");
agx->sgx = res->start;
/* The firmware owns these; only read the fault status after a hang. */
agx->rgx = devm_ioremap(dev, res->start, resource_size(res));
if (!agx->rgx)
return -ENOMEM;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fender");
if (!res)
return dev_err_probe(dev, -EINVAL, "no fender registers\n");
Expand Down
14 changes: 7 additions & 7 deletions drivers/gpu/drm/agx/agx_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ MODULE_PARM_DESC(max_pstate, "highest GPU pstate, 1 (316 MHz) to 6 (1098 MHz)");
#define EV 3
#define EV_TA 4
#define EV_3D 7
#define RGX_MMU_FAULT_STATUS 0x17040
#define DONE_STAMP 0xcafe0003
/*
* Render stamps count up by 0x100 per job, as Apple's do: bits 14:8 are the
Expand Down Expand Up @@ -1220,7 +1219,7 @@ static void agx_dump_trace(struct agx_device *agx)
void agx_fw_timeout(struct agx_device *agx)
{
struct dma_fence *fence;
u64 st;

if (agx->ipad_memory) {
agx->wedged = true;
dev_err(agx->dev, "J171 firmware job timeout; reboot required\n");
Expand All @@ -1231,11 +1230,12 @@ void agx_fw_timeout(struct agx_device *agx)
dev_warn(agx->dev, "job finished without an event\n");
return;
}
st = readq(agx->rgx + RGX_MMU_FAULT_STATUS);
dev_err(agx->dev,
"job timed out, GPU wedged; MMU fault %#llx: VA %#llx ctx %llu requester %llu %s type %llu\n",
st, (st >> 24) & ~0x3fULL, (st >> 16) & 0x3f, (st >> 8) & 0xff,
st & BIT(4) ? "read" : "write", (st >> 1) & 7);
/*
* Only the firmware may touch the RGX registers: reading the MMU fault
* status here took an SError on the iPhone XR (the block was off) and
* reset the phone. Report what shared memory holds instead.
*/
dev_err(agx->dev, "job timed out, GPU wedged; reboot required\n");
if (agx->active_stamp == agx->rn.scratch + 0x40 &&
READ_ONCE(*(u32 *)(agx->buf + agx->rn.scratch)) != agx->rn.ta_stamp)
dev_err(agx->dev, "render stuck in its TA job\n");
Expand Down
Loading