File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -984,6 +984,7 @@ struct bo_setup_state {
984
984
struct xe_lrc * lrc ;
985
985
struct xe_hw_engine * hwe ;
986
986
size_t max_size ;
987
+ size_t reserve_dw ;
987
988
unsigned int offset ;
988
989
const struct bo_setup * funcs ;
989
990
unsigned int num_funcs ;
@@ -1017,10 +1018,10 @@ static int setup_bo(struct bo_setup_state *state)
1017
1018
remain -= len ;
1018
1019
1019
1020
/*
1020
- * There should always be at least 1 additional dword for
1021
- * the end marker
1021
+ * Caller has asked for at least reserve_dw to remain unused.
1022
1022
*/
1023
- if (len < 0 || xe_gt_WARN_ON (state -> lrc -> gt , remain < 1 ))
1023
+ if (len < 0 ||
1024
+ xe_gt_WARN_ON (state -> lrc -> gt , remain < state -> reserve_dw ))
1024
1025
goto fail ;
1025
1026
1026
1027
state -> ptr += len ;
@@ -1054,6 +1055,7 @@ static int setup_wa_bb(struct xe_lrc *lrc, struct xe_hw_engine *hwe)
1054
1055
.lrc = lrc ,
1055
1056
.hwe = hwe ,
1056
1057
.max_size = LRC_WA_BB_SIZE ,
1058
+ .reserve_dw = 1 ,
1057
1059
.offset = __xe_lrc_wa_bb_offset (lrc ),
1058
1060
.funcs = funcs ,
1059
1061
.num_funcs = ARRAY_SIZE (funcs ),
You can’t perform that action at this time.
0 commit comments