Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm...
authorDave Airlie <airlied@redhat.com>
Mon, 21 Aug 2017 04:34:15 +0000 (14:34 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 21 Aug 2017 04:34:15 +0000 (14:34 +1000)
this cycle has been fairly calm in etnaviv land with most of the action
happening on the userspace side.

Notable changes:
- Improvements to CONFIG option handling to make it harder for users to
shoot themselves in the foot due to kernel misconfiguration.
- Tweaked GEM object population, so that userspace can take considerate
action when memory allocation fails, rather than waking the raging OOM
killer beast.

* 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux:
  drm/etnaviv: switch GEM allocations to __GFP_RETRY_MAYFAIL
  drm/etnaviv: don't fail GPU bind when CONFIG_THERMAL isn't enabled
  drm/etnaviv: switch to drm_*{get,put} helpers
  drm/etnaviv: select CMA and DMA_CMA if available
  drm/etnaviv: populate GEM objects on cpu_prep
  drm/etnaviv: reduce allocation failure message severity
  drm/etnaviv: don't trigger OOM killer when page allocation fails

1  2 
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c

index 6463fc2c736fd4db5881a259b21848328b7f6cea,d72154b5487005e2ec1789a815ca926e2573b276..a7ff2e4c00d26b35ca7e80bccf8d24317b642399
@@@ -88,7 -88,7 +88,7 @@@ static int submit_lookup_objects(struc
                 * Take a refcount on the object. The file table lock
                 * prevents the object_idr's refcount on this being dropped.
                 */
-               drm_gem_object_reference(obj);
+               drm_gem_object_get(obj);
  
                submit->bos[i].obj = to_etnaviv_bo(obj);
        }
@@@ -172,7 -172,7 +172,7 @@@ static int submit_fence_sync(const stru
        for (i = 0; i < submit->nr_bos; i++) {
                struct etnaviv_gem_object *etnaviv_obj = submit->bos[i].obj;
                bool write = submit->bos[i].flags & ETNA_SUBMIT_BO_WRITE;
 -              bool explicit = !(submit->flags & ETNA_SUBMIT_NO_IMPLICIT);
 +              bool explicit = !!(submit->flags & ETNA_SUBMIT_NO_IMPLICIT);
  
                ret = etnaviv_gpu_fence_sync_obj(etnaviv_obj, context, write,
                                                 explicit);
@@@ -270,8 -270,8 +270,8 @@@ static int submit_reloc(struct etnaviv_
                if (ret)
                        return ret;
  
 -              if (r->reloc_offset >= bo->obj->base.size - sizeof(*ptr)) {
 -                      DRM_ERROR("relocation %u outside object", i);
 +              if (r->reloc_offset > bo->obj->base.size - sizeof(*ptr)) {
 +                      DRM_ERROR("relocation %u outside object\n", i);
                        return -EINVAL;
                }
  
@@@ -291,7 -291,7 +291,7 @@@ static void submit_cleanup(struct etnav
                struct etnaviv_gem_object *etnaviv_obj = submit->bos[i].obj;
  
                submit_unlock_object(submit, i);
-               drm_gem_object_unreference_unlocked(&etnaviv_obj->base);
+               drm_gem_object_put_unlocked(&etnaviv_obj->base);
        }
  
        ww_acquire_fini(&submit->ticket);