[Mesa-dev] [PATCH 08/70] i965: Remove early release of DRI2 miptree

Martin Peres martin.peres at linux.intel.com
Mon Aug 10 05:38:10 PDT 2015


On 10/08/15 15:26, Chris Wilson wrote:
> On Mon, Aug 10, 2015 at 03:18:09PM +0300, Martin Peres wrote:
>> On 07/08/15 23:13, Chris Wilson wrote:
>>> intel_update_winsys_renderbuffer_miptree() will release the existing
>>> miptree when wrapping a new DRI2 buffer, so we can remove the early
>>> release and so prevent a NULL mt dereference should importing the new
>>> DRI2 name fail for any reason. (Reusing the old DRI2 name will result
>>> in the rendering going astray, to a stale buffer, and not shown on the
>>> screen, but it allows us to issue a warning and not crash much later in
>>> innocent code.)
>>>
>>> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
>>> ---
>>>   src/mesa/drivers/dri/i965/brw_context.c | 1 -
>>>   1 file changed, 1 deletion(-)
>>>
>>> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
>>> index e8d1396..72f3897 100644
>>> --- a/src/mesa/drivers/dri/i965/brw_context.c
>>> +++ b/src/mesa/drivers/dri/i965/brw_context.c
>>> @@ -1388,7 +1388,6 @@ intel_process_dri2_buffer(struct brw_context *brw,
>>>                 buffer->cpp, buffer->pitch);
>>>      }
>>> -   intel_miptree_release(&rb->mt);
>>>      bo = drm_intel_bo_gem_create_from_name(brw->bufmgr, buffer_name,
>>>                                             buffer->name);
>>>      if (!bo) {
>> Looks like a bug fix, shouldn't this be sent separately?
> It is. I separated it out for that purpose :)
> -Chris

I meant, sent separately of this series. To make it clear it was 
independent and make the upstreaming faster :)



More information about the mesa-dev mailing list