Subversion Repositories Kolibri OS

Rev

Rev 4246 | Rev 4539 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4246 Rev 4280
Line 297... Line 297...
297
{
297
{
298
	struct i915_hw_context *ctx = p;
298
	struct i915_hw_context *ctx = p;
Line 299... Line 299...
299
 
299
 
Line -... Line 300...
-
 
300
	BUG_ON(id == DEFAULT_CONTEXT_ID);
-
 
301
 
-
 
302
	i915_gem_context_unreference(ctx);
Line -... Line 303...
-
 
303
	return 0;
-
 
304
}
-
 
305
 
-
 
306
struct i915_ctx_hang_stats *
-
 
307
i915_gem_context_get_hang_stats(struct drm_device *dev,
-
 
308
				struct drm_file *file,
-
 
309
				u32 id)
-
 
310
{
Line -... Line 311...
-
 
311
	struct drm_i915_private *dev_priv = dev->dev_private;
-
 
312
	struct drm_i915_file_private *file_priv = file->driver_priv;
-
 
313
	struct i915_hw_context *ctx;
300
	BUG_ON(id == DEFAULT_CONTEXT_ID);
314
 
-
 
315
	if (id == DEFAULT_CONTEXT_ID)
-
 
316
		return &file_priv->hang_stats;
-
 
317
 
-
 
318
	ctx = NULL;
-
 
319
	if (!dev_priv->hw_contexts_disabled)
-
 
320
		ctx = i915_gem_context_get(file->driver_priv, id);
301
 
321
	if (ctx == NULL)
Line 302... Line 322...
302
 
322
		return ERR_PTR(-ENOENT);
303
 
323
 
304
	return 0;
324
	return &ctx->hang_stats;