Skip to contentSkip to conversation

A few clean-ups and a baby step towards unified register definitions

PATCH New Damien Lespiau 2 participants 9 messages Jan 6, 2014 – Jan 7, 2014 Library code

lore
Share & tools
lore
#0 lore raw

Having one source for registers defines sounds like a good idea. These patches, written long ago, were a baby step towards that goal by cleaning-up the INSTDONE definitons to be like the kernel ones.

Along the way, I removed one tool that isn't even compiled and another unusued one.

Signature · 1 line
Damien
#1 lore raw

PATCH 1/6 intel_reg: Renamed INST_DONE to INSTDONE

That's how the registers are named in the kernel defines.

---
 lib/instdone.c             | 6 +++---
 lib/intel_reg.h            | 6 +++---
 tools/intel_error_decode.c | 2 +-
 tools/intel_gpu_top.c      | 8 ++++----
 tools/intel_reg_dumper.c   | 2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)
lib/instdone.c +3 -3
index 2038842..b4d51f0 100644
@@ -46,19 +46,19 @@ add_instdone_bit(uint32_t reg, uint32_t bit, const char *name)
 static void
 gen3_instdone_bit(uint32_t bit, const char *name)
 {
-	add_instdone_bit(INST_DONE, bit, name);
+	add_instdone_bit(INSTDONE, bit, name);
 }
 
 static void
 gen4_instdone_bit(uint32_t bit, const char *name)
 {
-	add_instdone_bit(INST_DONE_I965, bit, name);
+	add_instdone_bit(INSTDONE_I965, bit, name);
 }
 
 static void
 gen4_instdone1_bit(uint32_t bit, const char *name)
 {
-	add_instdone_bit(INST_DONE_1, bit, name);
+	add_instdone_bit(INSTDONE_1, bit, name);
 }
 
 static void
lib/intel_reg.h +3 -3
index d8eec65..b6404e4 100644
@@ -370,7 +370,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define IPEIR                  0x2088
 #define IPEHR                  0x208C
 
-#define INST_DONE                0x2090
+#define INSTDONE                0x2090
 # define IDCT_DONE			(1 << 30)
 # define IQ_DONE			(1 << 29)
 # define PR_DONE			(1 << 28)
@@ -434,7 +434,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define INST_PS                  0x20c4
 #define IPEIR_I965                  0x2064 /* i965 */
 #define IPEHR_I965                  0x2068 /* i965 */
-#define INST_DONE_I965              0x206c
+#define INSTDONE_I965              0x206c
 # define I965_ROW_0_EU_0_DONE		(1 << 31)
 # define I965_ROW_0_EU_1_DONE		(1 << 30)
 # define I965_ROW_0_EU_2_DONE		(1 << 29)
@@ -541,7 +541,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #define DMA_FADD_P             0x2078
 #define DMA_FADD_S               0x20d4
-#define INST_DONE_1              0x207c
+#define INSTDONE_1              0x207c
 # define I965_GW_CS_DONE_CR		(1 << 19)
 # define I965_SVSM_CS_DONE_CR		(1 << 18)
 # define I965_SVDW_CS_DONE_CR		(1 << 17)
tools/intel_error_decode.c +1 -1
index 529ec54..ac0b194 100644
@@ -102,7 +102,7 @@ print_instdone(uint32_t devid, unsigned int instdone, unsigned int instdone1)
 	for (i = 0; i < num_instdone_bits; i++) {
 		int busy = 0;
 
-		if (instdone_bits[i].reg == INST_DONE_1) {
+		if (instdone_bits[i].reg == INSTDONE_1) {
 			if (!(instdone1 & instdone_bits[i].bit))
 				busy = 1;
 		} else {
tools/intel_gpu_top.c +4 -4
index c8b506a..31e080a 100644
@@ -144,7 +144,7 @@ update_idle_bit(struct top_bit *top_bit)
 {
 	uint32_t reg_val;
 
-	if (top_bit->bit->reg == INST_DONE_1)
+	if (top_bit->bit->reg == INSTDONE_1)
 		reg_val = instdone1;
 	else
 		reg_val = instdone;
@@ -559,10 +559,10 @@ int main(int argc, char **argv)
 			long long interval;
 			ti = gettime();
 			if (IS_965(devid)) {
-				instdone = INREG(INST_DONE_I965);
-				instdone1 = INREG(INST_DONE_1);
+				instdone = INREG(INSTDONE_I965);
+				instdone1 = INREG(INSTDONE_1);
 			} else
-				instdone = INREG(INST_DONE);
+				instdone = INREG(INSTDONE);
 
 			for (j = 0; j < num_instdone_bits; j++)
 				update_idle_bit(&top_bits[j]);
tools/intel_reg_dumper.c +1 -1
index 6064695..8d8aa91 100644
@@ -2476,7 +2476,7 @@ static struct reg_debug i945gm_mi_regs[] = {
 	DEFINEREG(HWS_PGA),
 	DEFINEREG(IPEIR),
 	DEFINEREG(IPEHR),
-	DEFINEREG(INST_DONE),
+	DEFINEREG(INSTDONE),
 	DEFINEREG(NOP_ID),
 	DEFINEREG(HWSTAM),
 	DEFINEREG(SCPD0),
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 2/6 instdone: Add an assert to make sure we never overflow instdone_bits

In reply to Damien Lespiau
---
 lib/instdone.c | 1 +
 1 file changed, 1 insertion(+)
lib/instdone.c +1 -0
index b4d51f0..1399df7 100644
@@ -37,6 +37,7 @@ int num_instdone_bits = 0;
 static void
 add_instdone_bit(uint32_t reg, uint32_t bit, const char *name)
 {
+	assert(num_instdone_bits < MAX_INSTDONE_BITS);
 	instdone_bits[num_instdone_bits].reg = reg;
 	instdone_bits[num_instdone_bits].bit = bit;
 	instdone_bits[num_instdone_bits].name = name;
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH 3/6 lib: Move the INSTDONE bit definitions to instdone.c

In reply to Damien Lespiau

This is the only place where they are used and we've even started using 1 << n constants with gen 7.

---
 lib/instdone.c  | 242 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/intel_reg.h | 237 ------------------------------------------------------
 2 files changed, 242 insertions(+), 237 deletions(-)
lib/instdone.c +242 -0
index 1399df7..18b2613 100644
@@ -31,6 +31,248 @@
 #include "intel_chipset.h"
 #include "intel_reg.h"
 
+/* INSTDONE */
+# define IDCT_DONE			(1 << 30)
+# define IQ_DONE			(1 << 29)
+# define PR_DONE			(1 << 28)
+# define VLD_DONE			(1 << 27)
+# define IP_DONE			(1 << 26)
+# define FBC_DONE			(1 << 25)
+# define BINNER_DONE			(1 << 24)
+# define SF_DONE			(1 << 23)
+# define SE_DONE			(1 << 22)
+# define WM_DONE			(1 << 21)
+# define IZ_DONE			(1 << 20)
+# define PERSPECTIVE_INTERP_DONE	(1 << 19)
+# define DISPATCHER_DONE		(1 << 18)
+# define PROJECTION_DONE		(1 << 17)
+# define DEPENDENT_ADDRESS_DONE		(1 << 16)
+# define QUAD_CACHE_DONE		(1 << 15)
+# define TEXTURE_FETCH_DONE		(1 << 14)
+# define TEXTURE_DECOMPRESS_DONE	(1 << 13)
+# define SAMPLER_CACHE_DONE		(1 << 12)
+# define FILTER_DONE			(1 << 11)
+# define BYPASS_FIFO_DONE		(1 << 10)
+# define PS_DONE			(1 << 9)
+# define CC_DONE			(1 << 8)
+# define MAP_FILTER_DONE		(1 << 7)
+# define MAP_L2_IDLE			(1 << 6)
+# define RING_2_ENABLE			(1 << 2)
+# define RING_1_ENABLE			(1 << 1)
+# define RING_0_ENABLE			(1 << 0)
+
+# define I830_GMBUS_DONE		(1 << 26)
+# define I830_FBC_DONE			(1 << 25)
+# define I830_BINNER_DONE		(1 << 24)
+# define I830_MPEG_DONE			(1 << 23)
+# define I830_MECO_DONE			(1 << 22)
+# define I830_MCD_DONE			(1 << 21)
+# define I830_MCSTP_DONE		(1 << 20)
+# define I830_CC_DONE			(1 << 19)
+# define I830_DG_DONE			(1 << 18)
+# define I830_DCMP_DONE			(1 << 17)
+# define I830_FTCH_DONE			(1 << 16)
+# define I830_IT_DONE			(1 << 15)
+# define I830_MG_DONE			(1 << 14)
+# define I830_MEC_DONE			(1 << 13)
+# define I830_PC_DONE			(1 << 12)
+# define I830_QCC_DONE			(1 << 11)
+# define I830_TB_DONE			(1 << 10)
+# define I830_WM_DONE			(1 << 9)
+# define I830_EF_DONE			(1 << 8)
+# define I830_BLITTER_DONE		(1 << 7)
+# define I830_MAP_L2_DONE		(1 << 6)
+# define I830_SECONDARY_RING_3_DONE	(1 << 5)
+# define I830_SECONDARY_RING_2_DONE	(1 << 4)
+# define I830_SECONDARY_RING_1_DONE	(1 << 3)
+# define I830_SECONDARY_RING_0_DONE	(1 << 2)
+# define I830_PRIMARY_RING_1_DONE	(1 << 1)
+# define I830_PRIMARY_RING_0_DONE	(1 << 0)
+
+/* INSTDONE_I965 */
+# define I965_ROW_0_EU_0_DONE		(1 << 31)
+# define I965_ROW_0_EU_1_DONE		(1 << 30)
+# define I965_ROW_0_EU_2_DONE		(1 << 29)
+# define I965_ROW_0_EU_3_DONE		(1 << 28)
+# define I965_ROW_1_EU_0_DONE		(1 << 27)
+# define I965_ROW_1_EU_1_DONE		(1 << 26)
+# define I965_ROW_1_EU_2_DONE		(1 << 25)
+# define I965_ROW_1_EU_3_DONE		(1 << 24)
+# define I965_SF_DONE			(1 << 23)
+# define I965_SE_DONE			(1 << 22)
+# define I965_WM_DONE			(1 << 21)
+# define I965_DISPATCHER_DONE		(1 << 18)
+# define I965_PROJECTION_DONE		(1 << 17)
+# define I965_DG_DONE			(1 << 16)
+# define I965_QUAD_CACHE_DONE		(1 << 15)
+# define I965_TEXTURE_FETCH_DONE	(1 << 14)
+# define I965_TEXTURE_DECOMPRESS_DONE	(1 << 13)
+# define I965_SAMPLER_CACHE_DONE	(1 << 12)
+# define I965_FILTER_DONE		(1 << 11)
+# define I965_BYPASS_DONE		(1 << 10)
+# define I965_PS_DONE			(1 << 9)
+# define I965_CC_DONE			(1 << 8)
+# define I965_MAP_FILTER_DONE		(1 << 7)
+# define I965_MAP_L2_IDLE		(1 << 6)
+# define I965_MA_ROW_0_DONE		(1 << 5)
+# define I965_MA_ROW_1_DONE		(1 << 4)
+# define I965_IC_ROW_0_DONE		(1 << 3)
+# define I965_IC_ROW_1_DONE		(1 << 2)
+# define I965_CP_DONE			(1 << 1)
+# define I965_RING_0_ENABLE		(1 << 0)
+
+# define ILK_ROW_0_EU_0_DONE		(1 << 31)
+# define ILK_ROW_0_EU_1_DONE		(1 << 30)
+# define ILK_ROW_0_EU_2_DONE		(1 << 29)
+# define ILK_ROW_0_EU_3_DONE		(1 << 28)
+# define ILK_ROW_1_EU_0_DONE		(1 << 27)
+# define ILK_ROW_1_EU_1_DONE		(1 << 26)
+# define ILK_ROW_1_EU_2_DONE		(1 << 25)
+# define ILK_ROW_1_EU_3_DONE		(1 << 24)
+# define ILK_ROW_2_EU_0_DONE		(1 << 23)
+# define ILK_ROW_2_EU_1_DONE		(1 << 22)
+# define ILK_ROW_2_EU_2_DONE		(1 << 21)
+# define ILK_ROW_2_EU_3_DONE		(1 << 20)
+# define ILK_VCP_DONE			(1 << 19)
+# define ILK_ROW_0_MATH_DONE		(1 << 18)
+# define ILK_ROW_1_MATH_DONE		(1 << 17)
+# define ILK_ROW_2_MATH_DONE		(1 << 16)
+# define ILK_VC1_DONE			(1 << 15)
+# define ILK_ROW_0_MA_DONE		(1 << 14)
+# define ILK_ROW_1_MA_DONE		(1 << 13)
+# define ILK_ROW_2_MA_DONE		(1 << 12)
+# define ILK_ROW_0_ISC_DONE		(1 << 11)
+# define ILK_ROW_1_ISC_DONE		(1 << 10)
+# define ILK_ROW_2_ISC_DONE		(1 << 9)
+# define ILK_VFE_DONE			(1 << 8)
+# define ILK_TD_DONE			(1 << 7)
+# define ILK_SVTS_DONE			(1 << 6)
+# define ILK_TS_DONE			(1 << 5)
+# define ILK_GW_DONE			(1 << 4)
+# define ILK_AI_DONE			(1 << 3)
+# define ILK_AC_DONE			(1 << 2)
+# define ILK_AM_DONE			(1 << 1)
+
+# define GEN6_MA_3_DONE			(1 << 31)
+# define GEN6_EU_32_DONE		(1 << 30)
+# define GEN6_EU_31_DONE		(1 << 29)
+# define GEN6_EU_30_DONE		(1 << 28)
+# define GEN6_MA_2_DONE			(1 << 27)
+# define GEN6_EU_22_DONE		(1 << 26)
+# define GEN6_EU_21_DONE		(1 << 25)
+# define GEN6_EU_20_DONE		(1 << 24)
+# define GEN6_MA_1_DONE			(1 << 23)
+# define GEN6_EU_12_DONE		(1 << 22)
+# define GEN6_EU_11_DONE		(1 << 21)
+# define GEN6_EU_10_DONE		(1 << 20)
+# define GEN6_MA_0_DONE			(1 << 19)
+# define GEN6_EU_02_DONE		(1 << 18)
+# define GEN6_EU_01_DONE		(1 << 17)
+# define GEN6_EU_00_DONE		(1 << 16)
+# define GEN6_IC_3_DONE			(1 << 15)
+# define GEN6_IC_2_DONE			(1 << 14)
+# define GEN6_IC_1_DONE			(1 << 13)
+# define GEN6_IC_0_DONE			(1 << 12)
+# define GEN6_ISC_10_DONE		(1 << 11)
+# define GEN6_ISC_32_DONE		(1 << 10)
+# define GEN6_VSC_DONE			(1 << 9)
+# define GEN6_IEF_DONE			(1 << 8)
+# define GEN6_VFE_DONE			(1 << 7)
+# define GEN6_TD_DONE			(1 << 6)
+# define GEN6_TS_DONE			(1 << 4)
+# define GEN6_GW_DONE			(1 << 3)
+# define GEN6_HIZ_DONE			(1 << 2)
+# define GEN6_AVS_DONE			(1 << 1)
+
+/* INSTDONE_1 */
+# define I965_GW_CS_DONE_CR		(1 << 19)
+# define I965_SVSM_CS_DONE_CR		(1 << 18)
+# define I965_SVDW_CS_DONE_CR		(1 << 17)
+# define I965_SVDR_CS_DONE_CR		(1 << 16)
+# define I965_SVRW_CS_DONE_CR		(1 << 15)
+# define I965_SVRR_CS_DONE_CR		(1 << 14)
+# define I965_SVTW_CS_DONE_CR		(1 << 13)
+# define I965_MASM_CS_DONE_CR		(1 << 12)
+# define I965_MASF_CS_DONE_CR		(1 << 11)
+# define I965_MAW_CS_DONE_CR		(1 << 10)
+# define I965_EM1_CS_DONE_CR		(1 << 9)
+# define I965_EM0_CS_DONE_CR		(1 << 8)
+# define I965_UC1_CS_DONE		(1 << 7)
+# define I965_UC0_CS_DONE		(1 << 6)
+# define I965_URB_CS_DONE		(1 << 5)
+# define I965_ISC_CS_DONE		(1 << 4)
+# define I965_CL_CS_DONE		(1 << 3)
+# define I965_GS_CS_DONE		(1 << 2)
+# define I965_VS0_CS_DONE		(1 << 1)
+# define I965_VF_CS_DONE		(1 << 0)
+
+# define G4X_BCS_DONE			(1 << 31)
+# define G4X_CS_DONE			(1 << 30)
+# define G4X_MASF_DONE			(1 << 29)
+# define G4X_SVDW_DONE			(1 << 28)
+# define G4X_SVDR_DONE			(1 << 27)
+# define G4X_SVRW_DONE			(1 << 26)
+# define G4X_SVRR_DONE			(1 << 25)
+# define G4X_ISC_DONE			(1 << 24)
+# define G4X_MT_DONE			(1 << 23)
+# define G4X_RC_DONE			(1 << 22)
+# define G4X_DAP_DONE			(1 << 21)
+# define G4X_MAWB_DONE			(1 << 20)
+# define G4X_MT_IDLE			(1 << 19)
+# define G4X_GBLT_BUSY			(1 << 18)
+# define G4X_SVSM_DONE			(1 << 17)
+# define G4X_MASM_DONE			(1 << 16)
+# define G4X_QC_DONE			(1 << 15)
+# define G4X_FL_DONE			(1 << 14)
+# define G4X_SC_DONE			(1 << 13)
+# define G4X_DM_DONE			(1 << 12)
+# define G4X_FT_DONE			(1 << 11)
+# define G4X_DG_DONE			(1 << 10)
+# define G4X_SI_DONE			(1 << 9)
+# define G4X_SO_DONE			(1 << 8)
+# define G4X_PL_DONE			(1 << 7)
+# define G4X_WIZ_DONE			(1 << 6)
+# define G4X_URB_DONE			(1 << 5)
+# define G4X_SF_DONE			(1 << 4)
+# define G4X_CL_DONE			(1 << 3)
+# define G4X_GS_DONE			(1 << 2)
+# define G4X_VS0_DONE			(1 << 1)
+# define G4X_VF_DONE			(1 << 0)
+
+/* GEN6_INSTDONE_2 */
+# define GEN6_GAM_DONE			(1 << 31)
+# define GEN6_CS_DONE			(1 << 30)
+# define GEN6_WMBE_DONE			(1 << 29)
+# define GEN6_SVRW_DONE			(1 << 28)
+# define GEN6_RCC_DONE			(1 << 27)
+# define GEN6_SVG_DONE			(1 << 26)
+# define GEN6_ISC_DONE			(1 << 25)
+# define GEN6_MT_DONE			(1 << 24)
+# define GEN6_RCPFE_DONE		(1 << 23)
+# define GEN6_RCPBE_DONE		(1 << 22)
+# define GEN6_VDI_DONE			(1 << 21)
+# define GEN6_RCZ_DONE			(1 << 20)
+# define GEN6_DAP_DONE			(1 << 19)
+# define GEN6_PSD_DONE			(1 << 18)
+# define GEN6_IZ_DONE			(1 << 17)
+# define GEN6_WMFE_DONE			(1 << 16)
+# define GEN6_SVSM_DONE			(1 << 15)
+# define GEN6_QC_DONE			(1 << 14)
+# define GEN6_FL_DONE			(1 << 13)
+# define GEN6_SC_DONE			(1 << 12)
+# define GEN6_DM_DONE			(1 << 11)
+# define GEN6_FT_DONE			(1 << 10)
+# define GEN6_DG_DONE			(1 << 9)
+# define GEN6_SI_DONE			(1 << 8)
+# define GEN6_SO_DONE			(1 << 7)
+# define GEN6_PL_DONE			(1 << 6)
+# define GEN6_VME_DONE			(1 << 5)
+# define GEN6_SF_DONE			(1 << 4)
+# define GEN6_CL_DONE			(1 << 3)
+# define GEN6_GS_DONE			(1 << 2)
+# define GEN6_VS0_DONE			(1 << 1)
+# define GEN6_VF_DONE			(1 << 0)
+
 struct instdone_bit instdone_bits[MAX_INSTDONE_BITS];
 int num_instdone_bits = 0;
 
lib/intel_reg.h +0 -237

257 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#4 lore raw

PATCH 4/6 lib: Use INSTDONE_I965 and INSTDONE_1 for gen6

In reply to Damien Lespiau

The GEN6_INSTDONE_1 and GEN6_INSTDONE_2 registers are just the old INSTDONE_I965 and INSTDONE_1 registers but renamed. Let's use the old names (this is what the kernel does).

---
 lib/instdone.c           | 6 +++---
 tools/intel_reg_dumper.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
lib/instdone.c +3 -3
index 18b2613..99857e2 100644
@@ -239,7 +239,7 @@
 # define G4X_VS0_DONE			(1 << 1)
 # define G4X_VF_DONE			(1 << 0)
 
-/* GEN6_INSTDONE_2 */
+/* INSTDONE_1 */
 # define GEN6_GAM_DONE			(1 << 31)
 # define GEN6_CS_DONE			(1 << 30)
 # define GEN6_WMBE_DONE			(1 << 29)
@@ -307,13 +307,13 @@ gen4_instdone1_bit(uint32_t bit, const char *name)
 static void
 gen6_instdone1_bit(uint32_t bit, const char *name)
 {
-	add_instdone_bit(GEN6_INSTDONE_1, bit, name);
+	add_instdone_bit(INSTDONE_I965, bit, name);
 }
 
 static void
 gen6_instdone2_bit(uint32_t bit, const char *name)
 {
-	add_instdone_bit(GEN6_INSTDONE_2, bit, name);
+	add_instdone_bit(INSTDONE_1, bit, name);
 }
 
 static void
tools/intel_reg_dumper.c +2 -2
index 8d8aa91..805b665 100644
@@ -2003,8 +2003,8 @@ static struct reg_debug gen6_fences[] = {
 
 static struct reg_debug ironlake_debug_regs[] = {
 	DEFINEREG(PGETBL_CTL),
-	DEFINEREG(GEN6_INSTDONE_1),
-	DEFINEREG(GEN6_INSTDONE_2),
+	DEFINEREG(INSTDONE_I965),
+	DEFINEREG(INSTDONE_1),
 	DEFINEREG2(CPU_VGACNTRL, i830_debug_vgacntrl),
 	DEFINEREG(DIGITAL_PORT_HOTPLUG_CNTRL),
 
Signature · 1 line
1.8.3.1
#5 lore raw

PATCH 5/6 tools: Removed unused tools/intel_iosf_read.c

In reply to Damien Lespiau

Also intel_iosf_read() does not exist, and would need a bit more arguments.

---
 tools/intel_iosf_read.c | 70 -------------------------------------------------
 1 file changed, 70 deletions(-)
 delete mode 100644 tools/intel_iosf_read.c
tools/intel_iosf_read.c deleted +0 -70
deleted file mode 100644
index 15cd82c..0000000
@@ -1,70 +0,0 @@
-/*
- * Copyright © 2012 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Authors:
- *		Vijay Purushothaman <[email protected]>
- *
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <err.h>
-#include <string.h>
-#include "intel_gpu_tools.h"
-
-static void usage(char *cmdname)
-{
-	printf("Warning : This program will work only on Valleyview\n");
-	printf("Usage: %s [addr]\n", cmdname);
-	printf("\t addr : in 0xXXXX format\n");
-}
-
-int main(int argc, char** argv)
-{
-	int ret = 0;
-	uint32_t reg, val;
-	char *cmdname = strdup(argv[0]);
-	struct pci_device *dev = intel_get_pci_device();
-
-	if (argc != 2 || !IS_VALLEYVIEW(dev->device_id)) {
-		usage(cmdname);
-		ret = 1;
-		goto out;
-	}
-
-	sscanf(argv[1], "0x%x", &reg);
-
-	intel_register_access_init(dev, 0);
-
-	ret = intel_iosf_read(reg, &val);
-	if (ret)
-		fprintf(stderr, "iosf read failed: %d\n", ret);
-
-	printf("Read IOSF register: 0x%x - Value : 0x%x\n", reg, val);
-
-	intel_register_access_fini();
-
-out:
-	free(cmdname);
-	return ret;
-}
Signature · 1 line
1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

PATCH 6/6 tools: Remove intel_disable_clock_gating

In reply to Damien Lespiau

This tool only supports ILK. I take the fact that nobody has felt the need to update for later platform a sign it's not very useful.

---
 tools/.gitignore                   |  1 -
 tools/Makefile.sources             |  1 -
 tools/intel_disable_clock_gating.c | 71 --------------------------------------
 3 files changed, 73 deletions(-)
 delete mode 100644 tools/intel_disable_clock_gating.c
tools/.gitignore +0 -1
index 64fe2b7..d74e2c1 100644
@@ -3,7 +3,6 @@ intel_audio_dump
 intel_backlight
 intel_bios_dumper
 intel_bios_reader
-intel_disable_clock_gating
 intel_dpio_read
 intel_dpio_write
 intel_dump_decode
tools/Makefile.sources +0 -1
index a4664fe..54b3fc7 100644
@@ -1,5 +1,4 @@
 bin_PROGRAMS = 				\
-	intel_disable_clock_gating 	\
 	intel_audio_dump 		\
 	intel_backlight 		\
 	intel_bios_dumper 		\
tools/intel_disable_clock_gating.c deleted +0 -71

71 lines not on this page · raw message

Signature · 1 line
1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by
#7 lore raw
In reply to Damien Lespiau
Quoted 7 lines · Damien Lespiau

Having one source for registers defines sounds like a good idea. These patches, written long ago, were a baby step towards that goal by cleaning-up the INSTDONE definitons to be like the kernel ones.

Along the way, I removed one tool that isn't even compiled and another unusued one.

Series is:

#8 lore raw
Quoted 11 lines · Kenneth Graunke
Quoted 7 lines · Damien Lespiau

Having one source for registers defines sounds like a good idea. These patches, written long ago, were a baby step towards that goal by cleaning-up the INSTDONE definitons to be like the kernel ones.

Along the way, I removed one tool that isn't even compiled and another unusued one.

Series is:

Thanks for the review, pushed.

Signature · 1 line
Damien