static int _check_global_timestamp(struct kgsl_device *device, struct adreno_context *drawctxt, unsigned int timestamp) { /* Stop waiting if the context is invalidated */ if (drawctxt->state == ADRENO_CONTEXT_STATE_INVALID) return 1; return kgsl_check_timestamp(device, NULL, timestamp); }
static int _check_context_timestamp(struct kgsl_device *device, struct kgsl_context *context, unsigned int timestamp) { /* Bail if the drawctxt has been invalidated or destroyed */ if (kgsl_context_detached(context) || kgsl_context_invalid(context)) return 1; return kgsl_check_timestamp(device, context, timestamp); }
static int _check_context_timestamp(struct kgsl_device *device, struct adreno_context *drawctxt, unsigned int timestamp) { int ret = 0; /* Bail if the drawctxt has been invalidated or destroyed */ if (kgsl_context_detached(&drawctxt->base) || drawctxt->state != ADRENO_CONTEXT_STATE_ACTIVE) return 1; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); ret = kgsl_check_timestamp(device, &drawctxt->base, timestamp); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); return ret; }
static int _check_context_timestamp(struct kgsl_device *device, struct adreno_context *drawctxt, unsigned int timestamp) { int ret = 0; /* Bail if the drawctxt has been invalidated or destroyed */ if (kgsl_context_detached(&drawctxt->base) || kgsl_context_invalid(&drawctxt->base)) return 1; mutex_lock(&device->mutex); ret = kgsl_check_timestamp(device, &drawctxt->base, timestamp); mutex_unlock(&device->mutex); return ret; }
static int _check_context_timestamp(struct kgsl_device *device, struct adreno_context *drawctxt, unsigned int timestamp) { int ret = 0; if (kgsl_context_detached(&drawctxt->base) || drawctxt->state != ADRENO_CONTEXT_STATE_ACTIVE) return 1; mutex_lock(&device->mutex); ret = kgsl_check_timestamp(device, &drawctxt->base, timestamp); mutex_unlock(&device->mutex); return ret; }