[Intel-gfx] [PATCH] drm/i915: Reset logical ring contexts' head and tail during GPU reset

Daniel Vetter daniel at ffwll.ch
Mon Feb 23 15:21:32 PST 2015


On Tue, Feb 17, 2015 at 11:34:31AM +0000, Dave Gordon wrote:
> On 16/02/15 16:12, Thomas Daniel wrote:
> > +			if (i915_gem_object_get_pages(ctx_obj)) {
> > +				WARN(1, "Failed get_pages for context obj\n");
> > +				continue;
> > +			}
> 
> This could be folded into a single "if (WARN_ON(...)) continue;"

It's also a bit bad style to not handle this case at all. But meh ;-)

> > +			page = i915_gem_object_get_page(ctx_obj, 1);
> 
> Isn't it a pity that we have i915_gem_object_get_page() and
> i915_gem_object_get_pages() which look so similar but do completely
> different things :(

lookup_page might be a more suitable name for this one indeed ... patch
highly welcome.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the Intel-gfx mailing list