Re: [Mesa-dev] [PATCH 11/18] i965: Replace the region in DRIimage with just a BO pointer and stride.

2014-05-01 Thread Chad Versace
On Tue, Apr 29, 2014 at 04:34:36PM -0700, Eric Anholt wrote:
 Regions aren't refcounted safely for multithreaded applications, and
 they're not terribly useful wrappers of a BO, so I'm trying to remove
 them.
 
 Even the stride I added here could probably be reduced to use of an
 existing field in the __DRIimageRec, but I want this to be as mechanical
 of a change as possible.

Patches up to here are
Reviewed-by: Chad Versace chad.vers...@linux.intel.com

I'm done reviewing today. I want to finish reviewing the series tomorrow
on the Max, but am unsure if I'll have the time.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 11/18] i965: Replace the region in DRIimage with just a BO pointer and stride.

2014-04-30 Thread Eric Anholt
Kenneth Graunke kenn...@whitecape.org writes:

 On 04/29/2014 04:34 PM, Eric Anholt wrote:
 [snip]
 @@ -558,12 +572,8 @@ intel_dup_image(__DRIimage *orig_image, void 
 *loaderPrivate)
 if (image == NULL)
return NULL;
  
 -   intel_region_reference(image-region, orig_image-region);
 -   if (image-region == NULL) {
 -  free(image);
 -  return NULL;
 -   }
 -
 +   drm_intel_bo_reference(orig_image-bo);
 +   image-bo  = orig_image-bo

 I noticed you dropped this NULL check, rather than checking image-bo !=
 NULL.  Presumably in intel_dup_image, you know that the orig_image BO
 actually exists?  If so, this seems fine.

Yeah, we only return an image if it's got a BO attached.

(We also only returned images when they had regions attached, so even
the old code was doing a pointless check)


pgpgRT1EXsWaB.pgp
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev