Skip to content
Open
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
4 changes: 4 additions & 0 deletions drivers/gpu/drm/v3d/v3d_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
MODULE_PARM_DESC(super_pages, "Enable/Disable Super Pages support.");
#endif

bool debug_mmu = false;

Check failure on line 50 in drivers/gpu/drm/v3d/v3d_drv.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: do not initialise globals to false
module_param(debug_mmu, bool, 0644);
MODULE_PARM_DESC(debug_mmu, "Enable/Disable MMU error logging");

static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
Expand Down
25 changes: 14 additions & 11 deletions drivers/gpu/drm/v3d/v3d_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@
"GMP",
};
const char *client = "?";
static int logged_error;
static bool logged_error = false;

Check failure on line 186 in drivers/gpu/drm/v3d/v3d_irq.c

View workflow job for this annotation

GitHub Actions / checkpatch review

ERROR: do not initialise statics to false
extern bool debug_mmu;

Check failure on line 187 in drivers/gpu/drm/v3d/v3d_irq.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: externs should be avoided in .c files

V3D_WRITE(V3D_MMU_CTL, V3D_READ(V3D_MMU_CTL));

Expand All @@ -193,16 +194,18 @@
client = v3d41_axi_ids[axi_id];
}

if (!logged_error)
dev_err(v3d->drm.dev, "MMU error from client %s (%d) at 0x%llx%s%s%s\n",
client, axi_id, (long long)vio_addr,
((intsts & V3D_HUB_INT_MMU_WRV) ?
", write violation" : ""),
((intsts & V3D_HUB_INT_MMU_PTI) ?
", pte invalid" : ""),
((intsts & V3D_HUB_INT_MMU_CAP) ?
", cap exceeded" : ""));
logged_error = 1;
if (!logged_error || debug_mmu) {
dev_err(v3d->drm.dev, "MMU error from client %s (%d) at 0x%llx%s%s%s\n",
client, axi_id, (long long)vio_addr,
((intsts & V3D_HUB_INT_MMU_WRV) ?
", write violation" : ""),
((intsts & V3D_HUB_INT_MMU_PTI) ?
", pte invalid" : ""),
((intsts & V3D_HUB_INT_MMU_CAP) ?
", cap exceeded" : ""));
}
logged_error = true;

status = IRQ_HANDLED;
}

Expand Down