lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Spice-devel] [PATCH 09/11] Move main reference counter to GEM object instead of TTM ones
From
On 27 May 2015 at 20:04, Frediano Ziglio <fziglio@redhat.com> wrote:
> qxl_bo structure has two reference counters, one in the GEM object and
> another in the TTM object. The GEM object keep a counter to the TTM object
> so when GEM counter reached zero the TTM counter (using qxl_bo_unref) was
> decremented. The qxl object is fully freed (both GEM and TTM part are cleaned)
> when the TTM counter reach zero.
> One issue was that surface idr structure has no owning on qxl_bo objects however
> it contains a pointer to qxl_bo object. This caused some nasty race condition
> for instance qxl_bo object was reaped even after counter was already zero.
> This patch fix these races moving main counter (the one used by qxl_bo_(un)ref)
> to GEM object which cleanup routine (qxl_gem_object_free) remove the idr pointer
> (using qxl_surface_evict) when the counters are still valid.

Uggh, but yes, not sure I like this fix for the problem, but if it works,

Reviewed-by: Dave Airlie <airlied@redhat.com>


\
 
 \ /
  Last update: 2015-05-28 06:01    [W:0.195 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site