drm/i915: Transform WaInPlaceDecompressionHang into a simple reg write
Subsystems (2)
PATCH 1/6 drm/i915: Transform WaInPlaceDecompressionHang into a simple reg write
Afaict, GEN9_GAMT_ECO_REG_RW_IA does not live in the context, so writing it on every context creation is overkill (and wrong).
v2: Missing end parenthesis
--- drivers/gpu/drm/i915/intel_engine_cs.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_engine_cs.c +15 -10
@@ -985,8 +985,9 @@ static int skl_init_workarounds(struct intel_engine_cs *engine)/* WaInPlaceDecompressionHang:skl */ if (IS_SKL_REVID (dev_priv,SKL_REVID_H0 ,REVID_FOREVER )) -WA_SET_BIT (GEN9_GAMT_ECO_REG_RW_IA , -GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ); +I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , + (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | +GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ));/* WaDisableLSQCROPERFforOCL:skl */ ret =wa_ring_whitelist_reg (engine,GEN8_L3SQCREG4 );
@@ -1059,8 +1060,9 @@ static int bxt_init_workarounds(struct intel_engine_cs *engine)/* WaInPlaceDecompressionHang:bxt */ if (IS_BXT_REVID (dev_priv,BXT_REVID_C0 ,REVID_FOREVER )) -WA_SET_BIT (GEN9_GAMT_ECO_REG_RW_IA , -GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ); +I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , + (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | +GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ));return 0 ; }
@@ -1089,8 +1091,9 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine) GEN8_CSC2_SBE_VUE_CACHE_CONSERVATIVE);/* WaInPlaceDecompressionHang:cnl */ -WA_SET_BIT (GEN9_GAMT_ECO_REG_RW_IA , -GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ); +I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , + (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | +GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ));/* WaPushConstantDereferenceHoldDisable:cnl */ WA_SET_BIT (GEN7_ROW_CHICKEN2 ,PUSH_CONSTANT_DEREF_DISABLE );
@@ -1143,8 +1146,9 @@ static int kbl_init_workarounds(struct intel_engine_cs *engine) GEN7_SBE_SS_CACHE_DISPATCH_PORT_SHARING_DISABLE);/* WaInPlaceDecompressionHang:kbl */ -WA_SET_BIT (GEN9_GAMT_ECO_REG_RW_IA , -GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ); +I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , + (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | +GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ));/* WaDisableLSQCROPERFforOCL:kbl */ ret =wa_ring_whitelist_reg (engine,GEN8_L3SQCREG4 );
@@ -1196,8 +1200,9 @@ static int cfl_init_workarounds(struct intel_engine_cs *engine) GEN7_SBE_SS_CACHE_DISPATCH_PORT_SHARING_DISABLE);/* WaInPlaceDecompressionHang:cfl */ -WA_SET_BIT (GEN9_GAMT_ECO_REG_RW_IA , -GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ); +I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , + (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | +GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS ));return 0 ; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/6 drm/i915: Transform WaDisableI2mCycleOnWRPort into a simple reg write
GAMT_CHKN_BIT_REG does not live in the context.
--- drivers/gpu/drm/i915/intel_engine_cs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_engine_cs.c +4 -3
@@ -1072,10 +1072,11 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)struct drm_i915_private *dev_priv = engine->i915;int ret; -/* WaDisableI2mCycleOnWRPort: cnl (pre-prod) */ +/* WaDisableI2mCycleOnWRPort:cnl (pre-prod) */ if (IS_CNL_REVID (dev_priv,CNL_REVID_B0 ,CNL_REVID_B0 )) -WA_SET_BIT (GAMT_CHKN_BIT_REG , -GAMT_CHKN_DISABLE_I2M_CYCLE_ON_WR_PORT ); +I915_WRITE (GAMT_CHKN_BIT_REG , + (I915_READ (GAMT_CHKN_BIT_REG ) | +GAMT_CHKN_DISABLE_I2M_CYCLE_ON_WR_PORT ));/* WaForceContextSaveRestoreNonCoherent:cnl */ WA_SET_BIT_MASKED(CNL_HDC_CHICKEN0,
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/6 drm/i915: WaPushConstantDereferenceHoldDisable needs to modify a masked register
In reply to Oscar MateoSo do it correctly.
--- drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_engine_cs.c +1 -1
@@ -1097,7 +1097,7 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine) GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS));/* WaPushConstantDereferenceHoldDisable:cnl */ -WA_SET_BIT (GEN7_ROW_CHICKEN2 ,PUSH_CONSTANT_DEREF_DISABLE ); +WA_SET_BIT_MASKED (GEN7_ROW_CHICKEN2 ,PUSH_CONSTANT_DEREF_DISABLE );/* FtrEnableFastAnisoL1BankingFix: cnl */ WA_SET_BIT_MASKED (HALF_SLICE_CHICKEN3 ,CNL_FAST_ANISO_L1_BANKING_FIX );
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/6 drm/i915: Transform WaDisableGafsUnitClkGating into a simple reg write
In reply to Oscar MateoGEN7_UCGCTL4 does not live in the context.
--- drivers/gpu/drm/i915/intel_engine_cs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_engine_cs.c +6 -3
@@ -981,7 +981,8 @@ static int skl_init_workarounds(struct intel_engine_cs *engine) GEN9_GAPS_TSV_CREDIT_DISABLE));/* WaDisableGafsUnitClkGating:skl */ -WA_SET_BIT (GEN7_UCGCTL4 ,GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE ); +I915_WRITE (GEN7_UCGCTL4 , (I915_READ (GEN7_UCGCTL4 ) | + GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE);/* WaInPlaceDecompressionHang:skl */ if (IS_SKL_REVID (dev_priv,SKL_REVID_H0 ,REVID_FOREVER ))
@@ -1139,7 +1140,8 @@ static int kbl_init_workarounds(struct intel_engine_cs *engine) GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION);/* WaDisableGafsUnitClkGating:kbl */ -WA_SET_BIT (GEN7_UCGCTL4 ,GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE ); +I915_WRITE (GEN7_UCGCTL4 , (I915_READ (GEN7_UCGCTL4 ) | + GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE);/* WaDisableSbeCacheDispatchPortSharing:kbl */ WA_SET_BIT_MASKED(
@@ -1193,7 +1195,8 @@ static int cfl_init_workarounds(struct intel_engine_cs *engine) GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION);/* WaDisableGafsUnitClkGating:cfl */ -WA_SET_BIT (GEN7_UCGCTL4 ,GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE ); +I915_WRITE (GEN7_UCGCTL4 , (I915_READ (GEN7_UCGCTL4 ) | +GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE ));/* WaDisableSbeCacheDispatchPortSharing:cfl */ WA_SET_BIT_MASKED(
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/6 drm/i915: Transform WaDisableDynamicCreditSharing into a simple register write
In reply to Oscar MateoGAMT_CHKN_BIT_REG does not live in the context image.
--- drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_engine_cs.c +3 -2
@@ -1126,8 +1126,9 @@ static int kbl_init_workarounds(struct intel_engine_cs *engine)/* WaDisableDynamicCreditSharing:kbl */ if (IS_KBL_REVID (dev_priv,0 ,KBL_REVID_B0 )) -WA_SET_BIT (GAMT_CHKN_BIT_REG , -GAMT_CHKN_DISABLE_DYNAMIC_CREDIT_SHARING ); +I915_WRITE (GAMT_CHKN_BIT_REG , + (I915_READ (GAMT_CHKN_BIT_REG ) | +GAMT_CHKN_DISABLE_DYNAMIC_CREDIT_SHARING ));/* WaDisableFenceDestinationToSLM:kbl (pre-prod) */ if (IS_KBL_REVID (dev_priv,KBL_REVID_A0 ,KBL_REVID_A0 ))
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/6 drm/i915: Transform WaDisablePooledEuLoadBalancingFix into a simple register write
In reply to Oscar MateoFF_SLICE_CS_CHICKEN2 does not belong to the context image.
--- drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_engine_cs.c +2 -2
@@ -1024,8 +1024,8 @@ static int bxt_init_workarounds(struct intel_engine_cs *engine)/* WaDisablePooledEuLoadBalancingFix:bxt */ if (IS_BXT_REVID (dev_priv,BXT_REVID_B0 ,REVID_FOREVER )) { -WA_SET_BIT_MASKED (FF_SLICE_CS_CHICKEN2 , -GEN9_POOLED_EU_LOAD_BALANCING_FIX_DISABLE ); +I915_WRITE (FF_SLICE_CS_CHICKEN2 , +_MASKED_BIT_ENABLE (GEN9_POOLED_EU_LOAD_BALANCING_FIX_DISABLE )); }/* WaDisableSbeCacheDispatchPortSharing:bxt */
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [1/6] drm/i915: Transform WaInPlaceDecompressionHang into a simple reg write
In reply to Oscar Mateo== Series Details ==
== Series Details ==
Series: series starting with [1/6] drm/i915: Transform WaInPlaceDecompressionHang into a simple reg write
URL : https://patchwork.freedesktop.org/series/29920/
State : failure
== Summary ==
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/compile.h
CHK kernel/config_data.h
CC [M] drivers/gpu/drm/i915/intel_engine_cs.o
In file included from drivers/gpu/drm/i915/selftests/mock_engine.h:32:0,
from drivers/gpu/drm/i915/selftests/mock_engine.c:25,
from drivers/gpu/drm/i915/intel_engine_cs.c:1411:drivers/gpu/drm/i915/selftests/../intel_ringbuffer.h: In function ‘skl_init_workarounds’:drivers/gpu/drm/i915/selftests/../intel_ringbuffer.h:740:0: error: unterminated argument list invoking macro "I915_WRITE"
#endif /* _INTEL_RINGBUFFER_H_ */
drivers/gpu/drm/i915/intel_engine_cs.c:984:2: error: ‘I915_WRITE’ undeclared (first use in this function)
I915_WRITE(GEN7_UCGCTL4, (I915_READ(GEN7_UCGCTL4) |
^~~~~~~~~~drivers/gpu/drm/i915/intel_engine_cs.c:984:2: note: each undeclared identifier is reported only once for each function it appears in In file included from drivers/gpu/drm/i915/selftests/mock_engine.c:25:0,
from drivers/gpu/drm/i915/intel_engine_cs.c:1411:
drivers/gpu/drm/i915/selftests/mock_engine.h:34:1: error: expected ‘;’ before ‘struct’
struct mock_engine {
^~~~~~drivers/gpu/drm/i915/selftests/mock_engine.h:42:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
^~~~~~drivers/gpu/drm/i915/selftests/mock_engine.h:49:20: error: invalid storage class for function ‘mock_seqno_advance’
static inline void mock_seqno_advance(struct intel_engine_cs *engine, u32 seqno)
^~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/intel_engine_cs.c:1411:0:
drivers/gpu/drm/i915/selftests/mock_engine.c:28:50: error: ‘struct mock_engine’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
static struct mock_request *first_request(struct mock_engine *engine)
^~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:28:29: error: invalid storage class for function ‘first_request’
static struct mock_request *first_request(struct mock_engine *engine)
^~~~~~~~~~~~~
In file included from ./include/linux/preempt.h:10:0,
from ./include/linux/spinlock.h:50,
from ./include/linux/mmzone.h:7,
from ./include/linux/gfp.h:5,
from ./include/linux/slab.h:14,
from ./include/linux/io-mapping.h:22,
from drivers/gpu/drm/i915/i915_drv.h:36,
from drivers/gpu/drm/i915/intel_engine_cs.c:25:
drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘first_request’:
drivers/gpu/drm/i915/selftests/mock_engine.c:30:41: error: dereferencing pointer to incomplete type ‘struct mock_engine’
return list_first_entry_or_null(&engine->hw_queue,
^
./include/linux/list.h:398:30: note: in definition of macro ‘list_first_entry_or_null’
struct list_head *head__ = (ptr); \
^~~In file included from drivers/gpu/drm/i915/intel_engine_cs.c:1411:0:drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘skl_init_workarounds’:drivers/gpu/drm/i915/selftests/mock_engine.c:35:13: error: invalid storage class for function ‘hw_delay_complete’
static void hw_delay_complete(unsigned long data)
^~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘hw_delay_complete’:
drivers/gpu/drm/i915/selftests/mock_engine.c:40:19: error: dereferencing pointer to incomplete type ‘struct mock_engine’
spin_lock(&engine->hw_lock);
^~
drivers/gpu/drm/i915/selftests/mock_engine.c:42:26: error: passing argument 1 of ‘first_request’ from incompatible pointer type [-Werror=incompatible-pointer-types]
request = first_request(engine);
^~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:28:29: note: expected ‘struct mock_engine *’ but argument is of type ‘struct mock_engine *’
static struct mock_request *first_request(struct mock_engine *engine)
^~~~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:48:26: error: passing argument 1 of ‘first_request’ from incompatible pointer type [-Werror=incompatible-pointer-types]
request = first_request(engine);
^~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:28:29: note: expected ‘struct mock_engine *’ but argument is of type ‘struct mock_engine *’
static struct mock_request *first_request(struct mock_engine *engine)
^~~~~~~~~~~~~drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘skl_init_workarounds’:drivers/gpu/drm/i915/selftests/mock_engine.c:56:1: error: invalid storage class for function ‘mock_context_pin’
mock_context_pin(struct intel_engine_cs *engine,
^~~~~~~~~~~~~~~~drivers/gpu/drm/i915/selftests/mock_engine.c:63:13: error: invalid storage class for function ‘mock_context_unpin’
static void mock_context_unpin(struct intel_engine_cs *engine,
^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:69:12: error: invalid storage class for function ‘mock_request_alloc’
static int mock_request_alloc(struct drm_i915_gem_request *request)
^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:79:12: error: invalid storage class for function ‘mock_emit_flush’
static int mock_emit_flush(struct drm_i915_gem_request *request,
^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:85:13: error: invalid storage class for function ‘mock_emit_breadcrumb’
static void mock_emit_breadcrumb(struct drm_i915_gem_request *request,
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:90:13: error: invalid storage class for function ‘mock_submit_request’
static void mock_submit_request(struct drm_i915_gem_request *request)
^~~~~~~~~~~~~~~~~~~
In file included from ./include/uapi/linux/stddef.h:1:0,
from ./include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from ./include/uapi/linux/types.h:13,
from ./include/linux/types.h:5,
from ./include/uapi/drm/drm.h:41,
from ./include/uapi/drm/i915_drm.h:30,
from drivers/gpu/drm/i915/i915_drv.h:33,
from drivers/gpu/drm/i915/intel_engine_cs.c:25:
drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘mock_submit_request’:
drivers/gpu/drm/i915/selftests/mock_engine.c:94:40: error: dereferencing pointer to incomplete type ‘struct mock_engine’
container_of(request->engine, typeof(*engine), base);
^~
./include/linux/compiler.h:523:19: note: in definition of macro ‘__compiletime_assert’
bool __cond = !(condition); \
^~~~~~~~~./include/linux/compiler.h:546:2: note: in expansion of macro ‘_compiletime_assert’
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~./include/linux/build_bug.h:46:37: note: in expansion of macro ‘compiletime_assert’
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~./include/linux/kernel.h:860:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~./include/linux/kernel.h:860:20: note: in expansion of macro ‘__same_type’
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~drivers/gpu/drm/i915/selftests/mock_engine.c:94:3: note: in expansion of macro ‘container_of’
container_of(request->engine, typeof(*engine), base);
^~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/intel_engine_cs.c:1411:0:drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘skl_init_workarounds’:drivers/gpu/drm/i915/selftests/mock_engine.c:106:27: error: invalid storage class for function ‘mock_ring’
static struct intel_ring *mock_ring(struct intel_engine_cs *engine)
^~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:125:25: error: static declaration of ‘mock_engine’ follows non-static declaration
struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
^~~~~~~~~~~
In file included from drivers/gpu/drm/i915/selftests/mock_engine.c:25:0,
from drivers/gpu/drm/i915/intel_engine_cs.c:1411:
drivers/gpu/drm/i915/selftests/mock_engine.h:42:25: note: previous declaration of ‘mock_engine’ was here
struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
^~~~~~~~~~~
In file included from drivers/gpu/drm/i915/intel_engine_cs.c:1411:0:
drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘mock_engine’:
drivers/gpu/drm/i915/selftests/mock_engine.c:133:26: error: dereferencing pointer to incomplete type ‘struct mock_engine’
engine = kzalloc(sizeof(*engine) + PAGE_SIZE, GFP_KERNEL);
^~~~~~~drivers/gpu/drm/i915/selftests/mock_engine.c:147:2: error: invalid use of undefined type ‘struct mock_engine’
engine->base.status_page.page_addr = (void *)(engine + 1);
^~~~~~drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘skl_init_workarounds’:drivers/gpu/drm/i915/selftests/mock_engine.c:172:6: error: static declaration of ‘mock_engine_flush’ follows non-static declaration
void mock_engine_flush(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/selftests/mock_engine.c:25:0,
from drivers/gpu/drm/i915/intel_engine_cs.c:1411:
drivers/gpu/drm/i915/selftests/mock_engine.h:45:6: note: previous declaration of ‘mock_engine_flush’ was here
void mock_engine_flush(struct intel_engine_cs *engine);
^~~~~~~~~~~~~~~~~
In file included from ./include/uapi/linux/stddef.h:1:0,
from ./include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from ./include/uapi/linux/types.h:13,
from ./include/linux/types.h:5,
from ./include/uapi/drm/drm.h:41,
from ./include/uapi/drm/i915_drm.h:30,
from drivers/gpu/drm/i915/i915_drv.h:33,
from drivers/gpu/drm/i915/intel_engine_cs.c:25:
drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘mock_engine_flush’:
drivers/gpu/drm/i915/selftests/mock_engine.c:175:31: error: dereferencing pointer to incomplete type ‘struct mock_engine’
container_of(engine, typeof(*mock), base);
^~
./include/linux/compiler.h:523:19: note: in definition of macro ‘__compiletime_assert’
bool __cond = !(condition); \
^~~~~~~~~./include/linux/compiler.h:546:2: note: in expansion of macro ‘_compiletime_assert’
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~./include/linux/build_bug.h:46:37: note: in expansion of macro ‘compiletime_assert’
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~./include/linux/kernel.h:860:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~./include/linux/kernel.h:860:20: note: in expansion of macro ‘__same_type’
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~drivers/gpu/drm/i915/selftests/mock_engine.c:175:3: note: in expansion of macro ‘container_of’
container_of(engine, typeof(*mock), base);
^~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/intel_engine_cs.c:1411:0:drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘skl_init_workarounds’:drivers/gpu/drm/i915/selftests/mock_engine.c:188:6: error: static declaration of ‘mock_engine_reset’ follows non-static declaration
void mock_engine_reset(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/selftests/mock_engine.c:25:0,
from drivers/gpu/drm/i915/intel_engine_cs.c:1411:
drivers/gpu/drm/i915/selftests/mock_engine.h:46:6: note: previous declaration of ‘mock_engine_reset’ was here
void mock_engine_reset(struct intel_engine_cs *engine);
^~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/intel_engine_cs.c:1411:0:
drivers/gpu/drm/i915/selftests/mock_engine.c:193:6: error: static declaration of ‘mock_engine_free’ follows non-static declaration
void mock_engine_free(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/selftests/mock_engine.c:25:0,
from drivers/gpu/drm/i915/intel_engine_cs.c:1411:
drivers/gpu/drm/i915/selftests/mock_engine.h:47:6: note: previous declaration of ‘mock_engine_free’ was here
void mock_engine_free(struct intel_engine_cs *engine);
^~~~~~~~~~~~~~~~
In file included from ./include/uapi/linux/stddef.h:1:0,
from ./include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from ./include/uapi/linux/types.h:13,
from ./include/linux/types.h:5,
from ./include/uapi/drm/drm.h:41,
from ./include/uapi/drm/i915_drm.h:30,
from drivers/gpu/drm/i915/i915_drv.h:33,
from drivers/gpu/drm/i915/intel_engine_cs.c:25:
drivers/gpu/drm/i915/selftests/mock_engine.c: In function ‘mock_engine_free’:
drivers/gpu/drm/i915/selftests/mock_engine.c:196:31: error: dereferencing pointer to incomplete type ‘struct mock_engine’
container_of(engine, typeof(*mock), base);
^~
./include/linux/compiler.h:523:19: note: in definition of macro ‘__compiletime_assert’
bool __cond = !(condition); \
^~~~~~~~~./include/linux/compiler.h:546:2: note: in expansion of macro ‘_compiletime_assert’
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~./include/linux/build_bug.h:46:37: note: in expansion of macro ‘compiletime_assert’
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~./include/linux/kernel.h:860:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~./include/linux/kernel.h:860:20: note: in expansion of macro ‘__same_type’
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~drivers/gpu/drm/i915/selftests/mock_engine.c:196:3: note: in expansion of macro ‘container_of’
container_of(engine, typeof(*mock), base);
^~~~~~~~~~~~drivers/gpu/drm/i915/intel_engine_cs.c: In function ‘skl_init_workarounds’:drivers/gpu/drm/i915/intel_engine_cs.c:1412:0: error: expected declaration or statement at end of input
#endif
In file included from drivers/gpu/drm/i915/intel_engine_cs.c:1411:0:
At top level:drivers/gpu/drm/i915/selftests/mock_engine.c:193:6: error: ‘mock_engine_free’ defined but not used [-Werror=unused-function]
void mock_engine_free(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:188:6: error: ‘mock_engine_reset’ defined but not used [-Werror=unused-function]
void mock_engine_reset(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:172:6: error: ‘mock_engine_flush’ defined but not used [-Werror=unused-function]
void mock_engine_flush(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/selftests/mock_engine.c:125:25: error: ‘mock_engine’ defined but not used [-Werror=unused-function]
struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
^~~~~~~~~~~
drivers/gpu/drm/i915/intel_engine_cs.c:962:12: error: ‘skl_init_workarounds’ defined but not used [-Werror=unused-function]
static int skl_init_workarounds(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/intel_engine_cs.c:921:12: error: ‘skl_tune_iz_hashing’ defined but not used [-Werror=unused-function]
static int skl_tune_iz_hashing(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/intel_engine_cs.c:780:12: error: ‘chv_init_workarounds’ defined but not used [-Werror=unused-function]
static int chv_init_workarounds(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/intel_engine_cs.c:748:12: error: ‘bdw_init_workarounds’ defined but not used [-Werror=unused-function]
static int bdw_init_workarounds(struct intel_engine_cs *engine)
^~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errorsscripts/Makefile.build:302: recipe for target 'drivers/gpu/drm/i915/intel_engine_cs.o' failed make[4]: *** [drivers/gpu/drm/i915/intel_engine_cs.o] Error 1 scripts/Makefile.build:561: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:561: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:561: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1019: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Oscar Mateo
Afaict,
GEN9_GAMT_ECO_REG_RW_IAdoes not live in the context, so writing it on every context creation is overkill (and wrong).v2: Missing end parenthesis
Though there was a discussion whether this belongs in init_workarounds, or init_clock_gating - I do believe that moving things around and/or renaming things is something that should be done in a separate patch.
I compared modified registers with the spec. It all checks out. With the missing end parenthesis added (you're still missing some in a different patch ;) ), the whole series is:
-Michał
Quoted 8 lines
Cc Chris Wilson <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Oscar Mateo <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Michał Winiarski
Quoted 4 lines · Oscar Mateo
Afaict,
GEN9_GAMT_ECO_REG_RW_IAdoes not live in the context, so writing it on every context creation is overkill (and wrong).v2: Missing end parenthesis
Though there was a discussion whether this belongs in
init_workarounds, orinit_clock_gating- I do believe that moving things around and/or renaming things is something that should be done in a separate patch.
Quoted 7 lines
I compared modified registers with the spec. It all checks out. With the missing end parenthesis added (you're still missing some in a different patch ;) ), the whole series is:
Reviewed-by Michał Winiarski <[email protected]>-Michał
Yes, I reached the same conclusion myself after seeing how many wrongly-applied WAs we had. I would still like to reach an agreement on the refactoring of the WA code, though, because the whole thing is very confusing as it stands now.
Thanks for the review!
-- Oscar
Quoted 7 lines
Quoted 7 lines
Cc Chris Wilson <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Oscar Mateo <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx