[PATCH RFC 076/111] staging: etnaviv: fix busy reporting
Lucas Stach
l.stach at pengutronix.de
Thu Apr 2 08:30:18 PDT 2015
From: Russell King <rmk+kernel at arm.linux.org.uk>
GC600 does not set busy bits in its idle register for modules which are
not present. Add handling to ensure that we don't misinterpret these
zero bits as indicating that these modules are busy.
Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
drivers/staging/etnaviv/etnaviv_gpu.c | 15 +++++++++++++++
drivers/staging/etnaviv/etnaviv_gpu.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
index 4b3d8a004374..2ed8de8c522a 100644
--- a/drivers/staging/etnaviv/etnaviv_gpu.c
+++ b/drivers/staging/etnaviv/etnaviv_gpu.c
@@ -289,6 +289,20 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu)
dev_info(gpu->dev, "minor_features3: %x\n",
gpu->identity.minor_features3);
+ /* GC600 idle register reports zero bits where modules aren't present */
+ if (gpu->identity.model == chipModel_GC600) {
+ gpu->idle_mask = VIVS_HI_IDLE_STATE_TX |
+ VIVS_HI_IDLE_STATE_RA |
+ VIVS_HI_IDLE_STATE_SE |
+ VIVS_HI_IDLE_STATE_PA |
+ VIVS_HI_IDLE_STATE_SH |
+ VIVS_HI_IDLE_STATE_PE |
+ VIVS_HI_IDLE_STATE_DE |
+ VIVS_HI_IDLE_STATE_FE;
+ } else {
+ gpu->idle_mask = ~VIVS_HI_IDLE_STATE_AXI_LP;
+ }
+
etnaviv_hw_specs(gpu);
}
@@ -531,6 +545,7 @@ void etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m)
seq_printf(m, "\taxi: 0x%08x\n", axi);
seq_printf(m, "\tidle: 0x%08x\n", idle);
+ idle |= ~gpu->idle_mask & ~VIVS_HI_IDLE_STATE_AXI_LP;
if ((idle & VIVS_HI_IDLE_STATE_FE) == 0)
seq_puts(m, "\t FE is not idle\n");
if ((idle & VIVS_HI_IDLE_STATE_DE) == 0)
diff --git a/drivers/staging/etnaviv/etnaviv_gpu.h b/drivers/staging/etnaviv/etnaviv_gpu.h
index 59dc9c1a048f..484649530ccc 100644
--- a/drivers/staging/etnaviv/etnaviv_gpu.h
+++ b/drivers/staging/etnaviv/etnaviv_gpu.h
@@ -101,6 +101,7 @@ struct etnaviv_gpu {
/* list of GEM active objects: */
struct list_head active_list;
+ uint32_t idle_mask;
uint32_t submitted_fence;
uint32_t retired_fence;
uint32_t last_ring_pos;
--
2.1.4
More information about the dri-devel
mailing list