[Intel-gfx] [PATCH] drm/i915/guc: Fix a fw content lost issue after it is evicted

Yu Dai yu.dai at intel.com
Tue Nov 10 15:29:35 PST 2015



On 11/09/2015 02:15 AM, Chris Wilson wrote:
> On Fri, Nov 06, 2015 at 03:18:37PM -0800, Yu Dai wrote:
> >
> >
> > On 11/06/2015 02:07 PM, Chris Wilson wrote:
> > >On Fri, Nov 06, 2015 at 01:55:27PM -0800, yu.dai at intel.com wrote:
> > >> From: Alex Dai <yu.dai at intel.com>
> > >>
> > >> We keep a copy of GuC fw in a GEM obj. However its content is lost
> > >> if the GEM obj is evicted (igt/gem_evict_*). Therefore, the later
> > >> fw loading during GPU reset will fail.
> > >
> > >No, it's not. The bug is in sg_copy_buffer called by
> > >i915_gem_object_create_from_data introduced by yourselves.
> > >
> >
> > My understanding is that sg_copy_from_buffer is used to copy data.
> > Can you clarify why using this will cause such issue?
>
> "However its content is lost if the GEM obj is evicted (igt/gem_evict_*)."
>
> is not strictly true. The content is lost if the object is swapped
> because the page is never marked as dirty. sg_copy_buffer() is copying
> into the page but never marks said page as dirty.
> -Chris
>
Thanks Chris. Now the patch is one line change. :)

Alex


More information about the Intel-gfx mailing list