public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* A few clean-ups and a baby step towards unified register definitions
@ 2014-01-06 15:02 Damien Lespiau
  2014-01-06 15:02 ` [PATCH igt 1/6] intel_reg: Renamed INST_DONE to INSTDONE Damien Lespiau
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Damien Lespiau @ 2014-01-06 15:02 UTC (permalink / raw)
  To: intel-gfx

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.

-- 
Damien

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH igt 1/6] intel_reg: Renamed INST_DONE to INSTDONE
  2014-01-06 15:02 A few clean-ups and a baby step towards unified register definitions Damien Lespiau
@ 2014-01-06 15:02 ` Damien Lespiau
  2014-01-06 15:02 ` [PATCH igt 2/6] instdone: Add an assert to make sure we never overflow instdone_bits Damien Lespiau
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Damien Lespiau @ 2014-01-06 15:02 UTC (permalink / raw)
  To: intel-gfx

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

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 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(-)

diff --git a/lib/instdone.c b/lib/instdone.c
index 2038842..b4d51f0 100644
--- a/lib/instdone.c
+++ b/lib/instdone.c
@@ -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
diff --git a/lib/intel_reg.h b/lib/intel_reg.h
index d8eec65..b6404e4 100644
--- a/lib/intel_reg.h
+++ b/lib/intel_reg.h
@@ -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)
diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c
index 529ec54..ac0b194 100644
--- a/tools/intel_error_decode.c
+++ b/tools/intel_error_decode.c
@@ -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 {
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index c8b506a..31e080a 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -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]);
diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
index 6064695..8d8aa91 100644
--- a/tools/intel_reg_dumper.c
+++ b/tools/intel_reg_dumper.c
@@ -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),
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH igt 2/6] instdone: Add an assert to make sure we never overflow instdone_bits
  2014-01-06 15:02 A few clean-ups and a baby step towards unified register definitions Damien Lespiau
  2014-01-06 15:02 ` [PATCH igt 1/6] intel_reg: Renamed INST_DONE to INSTDONE Damien Lespiau
@ 2014-01-06 15:02 ` Damien Lespiau
  2014-01-06 15:02 ` [PATCH igt 3/6] lib: Move the INSTDONE bit definitions to instdone.c Damien Lespiau
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Damien Lespiau @ 2014-01-06 15:02 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 lib/instdone.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/instdone.c b/lib/instdone.c
index b4d51f0..1399df7 100644
--- a/lib/instdone.c
+++ b/lib/instdone.c
@@ -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;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH igt 3/6] lib: Move the INSTDONE bit definitions to instdone.c
  2014-01-06 15:02 A few clean-ups and a baby step towards unified register definitions Damien Lespiau
  2014-01-06 15:02 ` [PATCH igt 1/6] intel_reg: Renamed INST_DONE to INSTDONE Damien Lespiau
  2014-01-06 15:02 ` [PATCH igt 2/6] instdone: Add an assert to make sure we never overflow instdone_bits Damien Lespiau
@ 2014-01-06 15:02 ` Damien Lespiau
  2014-01-06 15:02 ` [PATCH igt 4/6] lib: Use INSTDONE_I965 and INSTDONE_1 for gen6 Damien Lespiau
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Damien Lespiau @ 2014-01-06 15:02 UTC (permalink / raw)
  To: intel-gfx

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

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 lib/instdone.c  | 242 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/intel_reg.h | 237 ------------------------------------------------------
 2 files changed, 242 insertions(+), 237 deletions(-)

diff --git a/lib/instdone.c b/lib/instdone.c
index 1399df7..18b2613 100644
--- a/lib/instdone.c
+++ b/lib/instdone.c
@@ -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;
 
diff --git a/lib/intel_reg.h b/lib/intel_reg.h
index b6404e4..39949d1 100644
--- a/lib/intel_reg.h
+++ b/lib/intel_reg.h
@@ -371,63 +371,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define IPEHR                  0x208C
 
 #define INSTDONE                0x2090
-# 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)
-
 #define NOP_ID                   0x2094
 
 #define SCPD0                    0x209c	/* debug */
@@ -435,101 +378,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define IPEIR_I965                  0x2064 /* i965 */
 #define IPEHR_I965                  0x2068 /* i965 */
 #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)
-# 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_INSTDONE_1		0x206c
-# 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)
-
 #define INST_PS_I965                0x2070
 
 /* Current active ring head address: 
@@ -542,93 +391,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define DMA_FADD_P             0x2078
 #define DMA_FADD_S               0x20d4
 #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)
-# 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)
-
 #define GEN6_INSTDONE_2		0x207c
-# 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)
 
 #define CACHE_MODE_0           0x2120
 #define CACHE_MODE_1           0x2124
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH igt 4/6] lib: Use INSTDONE_I965 and INSTDONE_1 for gen6
  2014-01-06 15:02 A few clean-ups and a baby step towards unified register definitions Damien Lespiau
                   ` (2 preceding siblings ...)
  2014-01-06 15:02 ` [PATCH igt 3/6] lib: Move the INSTDONE bit definitions to instdone.c Damien Lespiau
@ 2014-01-06 15:02 ` Damien Lespiau
  2014-01-06 15:02 ` [PATCH igt 5/6] tools: Removed unused tools/intel_iosf_read.c Damien Lespiau
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Damien Lespiau @ 2014-01-06 15:02 UTC (permalink / raw)
  To: intel-gfx

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).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 lib/instdone.c           | 6 +++---
 tools/intel_reg_dumper.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/instdone.c b/lib/instdone.c
index 18b2613..99857e2 100644
--- a/lib/instdone.c
+++ b/lib/instdone.c
@@ -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
diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
index 8d8aa91..805b665 100644
--- a/tools/intel_reg_dumper.c
+++ b/tools/intel_reg_dumper.c
@@ -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),
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH igt 5/6] tools: Removed unused tools/intel_iosf_read.c
  2014-01-06 15:02 A few clean-ups and a baby step towards unified register definitions Damien Lespiau
                   ` (3 preceding siblings ...)
  2014-01-06 15:02 ` [PATCH igt 4/6] lib: Use INSTDONE_I965 and INSTDONE_1 for gen6 Damien Lespiau
@ 2014-01-06 15:02 ` Damien Lespiau
  2014-01-06 15:02 ` [PATCH igt 6/6] tools: Remove intel_disable_clock_gating Damien Lespiau
  2014-01-07  0:41 ` A few clean-ups and a baby step towards unified register definitions Kenneth Graunke
  6 siblings, 0 replies; 9+ messages in thread
From: Damien Lespiau @ 2014-01-06 15:02 UTC (permalink / raw)
  To: intel-gfx

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2733 bytes --]

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

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 tools/intel_iosf_read.c | 70 -------------------------------------------------
 1 file changed, 70 deletions(-)
 delete mode 100644 tools/intel_iosf_read.c

diff --git a/tools/intel_iosf_read.c b/tools/intel_iosf_read.c
deleted file mode 100644
index 15cd82c..0000000
--- a/tools/intel_iosf_read.c
+++ /dev/null
@@ -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 <vijay.a.purushothaman@intel.com>
- *
- */
-
-#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;
-}
-- 
1.8.3.1


[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH igt 6/6] tools: Remove intel_disable_clock_gating
  2014-01-06 15:02 A few clean-ups and a baby step towards unified register definitions Damien Lespiau
                   ` (4 preceding siblings ...)
  2014-01-06 15:02 ` [PATCH igt 5/6] tools: Removed unused tools/intel_iosf_read.c Damien Lespiau
@ 2014-01-06 15:02 ` Damien Lespiau
  2014-01-07  0:41 ` A few clean-ups and a baby step towards unified register definitions Kenneth Graunke
  6 siblings, 0 replies; 9+ messages in thread
From: Damien Lespiau @ 2014-01-06 15:02 UTC (permalink / raw)
  To: intel-gfx

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 3712 bytes --]

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.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 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

diff --git a/tools/.gitignore b/tools/.gitignore
index 64fe2b7..d74e2c1 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -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
diff --git a/tools/Makefile.sources b/tools/Makefile.sources
index a4664fe..54b3fc7 100644
--- a/tools/Makefile.sources
+++ b/tools/Makefile.sources
@@ -1,5 +1,4 @@
 bin_PROGRAMS = 				\
-	intel_disable_clock_gating 	\
 	intel_audio_dump 		\
 	intel_backlight 		\
 	intel_bios_dumper 		\
diff --git a/tools/intel_disable_clock_gating.c b/tools/intel_disable_clock_gating.c
deleted file mode 100644
index 8dde3e1..0000000
--- a/tools/intel_disable_clock_gating.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright © 2010 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:
- *	Zhenyu Wang <zhenyuw@linux.intel.com>
- *
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <err.h>
-#include <string.h>
-#include "intel_gpu_tools.h"
-
-int main(int argc, char** argv)
-{
-	struct pci_device *pci_dev;
-
-	pci_dev = intel_get_pci_device();
-	intel_get_mmio(pci_dev);
-
-	if (IS_GEN5(pci_dev->device_id)) {
-		printf("Restore method:\n");
-
-		printf("intel_reg_write 0x%x 0x%08x\n",
-		       PCH_3DCGDIS0, INREG(PCH_3DCGDIS0));
-		OUTREG(PCH_3DCGDIS0, 0xffffffff);
-
-		printf("intel_reg_write 0x%x 0x%08x\n",
-		       PCH_3DCGDIS1, INREG(PCH_3DCGDIS1));
-		OUTREG(PCH_3DCGDIS1, 0xffffffff);
-
-		printf("intel_reg_write 0x%x 0x%08x\n",
-		       PCH_3DRAMCGDIS0, INREG(PCH_3DRAMCGDIS0));
-		OUTREG(PCH_3DRAMCGDIS0, 0xffffffff);
-
-		printf("intel_reg_write 0x%x 0x%08x\n",
-		       PCH_DSPCLK_GATE_D, INREG(PCH_DSPCLK_GATE_D));
-		OUTREG(PCH_DSPCLK_GATE_D, 0xffffffff);
-
-		printf("intel_reg_write 0x%x 0x%08x\n",
-		       PCH_DSPRAMCLK_GATE_D, INREG(PCH_DSPRAMCLK_GATE_D));
-		OUTREG(PCH_DSPRAMCLK_GATE_D, 0xffffffff);
-	} else {
-		fprintf(stderr, "unsupported chipset\n");
-	}
-
-
-	return 0;
-}
-
-- 
1.8.3.1


[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: A few clean-ups and a baby step towards unified register definitions
  2014-01-06 15:02 A few clean-ups and a baby step towards unified register definitions Damien Lespiau
                   ` (5 preceding siblings ...)
  2014-01-06 15:02 ` [PATCH igt 6/6] tools: Remove intel_disable_clock_gating Damien Lespiau
@ 2014-01-07  0:41 ` Kenneth Graunke
  2014-01-07 16:49   ` Damien Lespiau
  6 siblings, 1 reply; 9+ messages in thread
From: Kenneth Graunke @ 2014-01-07  0:41 UTC (permalink / raw)
  To: Damien Lespiau, intel-gfx

On 01/06/2014 07:02 AM, Damien Lespiau wrote:
> 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:
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: A few clean-ups and a baby step towards unified register definitions
  2014-01-07  0:41 ` A few clean-ups and a baby step towards unified register definitions Kenneth Graunke
@ 2014-01-07 16:49   ` Damien Lespiau
  0 siblings, 0 replies; 9+ messages in thread
From: Damien Lespiau @ 2014-01-07 16:49 UTC (permalink / raw)
  To: Kenneth Graunke; +Cc: intel-gfx

On Mon, Jan 06, 2014 at 04:41:43PM -0800, Kenneth Graunke wrote:
> On 01/06/2014 07:02 AM, Damien Lespiau wrote:
> > 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:
> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

Thanks for the review, pushed.

-- 
Damien

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-07 16:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-06 15:02 A few clean-ups and a baby step towards unified register definitions Damien Lespiau
2014-01-06 15:02 ` [PATCH igt 1/6] intel_reg: Renamed INST_DONE to INSTDONE Damien Lespiau
2014-01-06 15:02 ` [PATCH igt 2/6] instdone: Add an assert to make sure we never overflow instdone_bits Damien Lespiau
2014-01-06 15:02 ` [PATCH igt 3/6] lib: Move the INSTDONE bit definitions to instdone.c Damien Lespiau
2014-01-06 15:02 ` [PATCH igt 4/6] lib: Use INSTDONE_I965 and INSTDONE_1 for gen6 Damien Lespiau
2014-01-06 15:02 ` [PATCH igt 5/6] tools: Removed unused tools/intel_iosf_read.c Damien Lespiau
2014-01-06 15:02 ` [PATCH igt 6/6] tools: Remove intel_disable_clock_gating Damien Lespiau
2014-01-07  0:41 ` A few clean-ups and a baby step towards unified register definitions Kenneth Graunke
2014-01-07 16:49   ` Damien Lespiau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox