File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,10 @@ static int __context_pin_state(struct i915_vma *vma)
123
123
if (err )
124
124
return err ;
125
125
126
+ err = i915_active_acquire (& vma -> active );
127
+ if (err )
128
+ goto err_unpin ;
129
+
126
130
/*
127
131
* And mark it as a globally pinned object to let the shrinker know
128
132
* it cannot reclaim the object until we release it.
@@ -131,11 +135,16 @@ static int __context_pin_state(struct i915_vma *vma)
131
135
vma -> obj -> mm .dirty = true;
132
136
133
137
return 0 ;
138
+
139
+ err_unpin :
140
+ i915_vma_unpin (vma );
141
+ return err ;
134
142
}
135
143
136
144
static void __context_unpin_state (struct i915_vma * vma )
137
145
{
138
146
i915_vma_make_shrinkable (vma );
147
+ i915_active_release (& vma -> active );
139
148
__i915_vma_unpin (vma );
140
149
}
141
150
You can’t perform that action at this time.
0 commit comments