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 @@ -896,11 +896,13 @@ static inline struct i915_ggtt *cache_to_ggtt(struct reloc_cache *cache)
896
896
897
897
static void reloc_gpu_flush (struct reloc_cache * cache )
898
898
{
899
- GEM_BUG_ON (cache -> rq_size >= cache -> rq -> batch -> obj -> base .size / sizeof (u32 ));
899
+ struct drm_i915_gem_object * obj = cache -> rq -> batch -> obj ;
900
+
901
+ GEM_BUG_ON (cache -> rq_size >= obj -> base .size / sizeof (u32 ));
900
902
cache -> rq_cmd [cache -> rq_size ] = MI_BATCH_BUFFER_END ;
901
903
902
- __i915_gem_object_flush_map (cache -> rq -> batch -> obj , 0 , cache -> rq_size );
903
- i915_gem_object_unpin_map (cache -> rq -> batch -> obj );
904
+ __i915_gem_object_flush_map (obj , 0 , sizeof ( u32 ) * ( cache -> rq_size + 1 ) );
905
+ i915_gem_object_unpin_map (obj );
904
906
905
907
intel_gt_chipset_flush (cache -> rq -> engine -> gt );
906
908
You can’t perform that action at this time.
0 commit comments