@@ -5396,13 +5396,8 @@ static void virtual_engine_initial_hint(struct virtual_engine *ve)
5396
5396
* typically be the first we inspect for submission.
5397
5397
*/
5398
5398
swp = prandom_u32_max (ve -> num_siblings );
5399
- if (!swp )
5400
- return ;
5401
-
5402
- swap (ve -> siblings [swp ], ve -> siblings [0 ]);
5403
- if (!intel_engine_has_relative_mmio (ve -> siblings [0 ]))
5404
- virtual_update_register_offsets (ve -> context .lrc_reg_state ,
5405
- ve -> siblings [0 ]);
5399
+ if (swp )
5400
+ swap (ve -> siblings [swp ], ve -> siblings [0 ]);
5406
5401
}
5407
5402
5408
5403
static int virtual_context_alloc (struct intel_context * ce )
@@ -5415,15 +5410,9 @@ static int virtual_context_alloc(struct intel_context *ce)
5415
5410
static int virtual_context_pin (struct intel_context * ce )
5416
5411
{
5417
5412
struct virtual_engine * ve = container_of (ce , typeof (* ve ), context );
5418
- int err ;
5419
5413
5420
5414
/* Note: we must use a real engine class for setting up reg state */
5421
- err = __execlists_context_pin (ce , ve -> siblings [0 ]);
5422
- if (err )
5423
- return err ;
5424
-
5425
- virtual_engine_initial_hint (ve );
5426
- return 0 ;
5415
+ return __execlists_context_pin (ce , ve -> siblings [0 ]);
5427
5416
}
5428
5417
5429
5418
static void virtual_context_enter (struct intel_context * ce )
@@ -5770,6 +5759,7 @@ intel_execlists_create_virtual(struct intel_engine_cs **siblings,
5770
5759
5771
5760
ve -> base .flags |= I915_ENGINE_IS_VIRTUAL ;
5772
5761
5762
+ virtual_engine_initial_hint (ve );
5773
5763
return & ve -> context ;
5774
5764
5775
5765
err_put :
0 commit comments