Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8811912c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ion: Fix typecasting of msm_ion_heap_types"

parents 5452e33e ad7d1e33
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -428,7 +428,7 @@ struct ion_heap *ion_secure_carveout_heap_create(
	}

	manager->heap.ops = &ion_sc_heap_ops;
	manager->heap.type = ION_HEAP_TYPE_SECURE_CARVEOUT;
	manager->heap.type = (enum ion_heap_type)ION_HEAP_TYPE_SECURE_CARVEOUT;
	return &manager->heap;

err:
+3 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 * Copyright (C) Linaro 2012
 * Author: <benjamin.gaignard@linaro.org> for ST-Ericsson.
 *
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -254,7 +254,7 @@ struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *data)
	 * used to make the link with reserved CMA memory
	 */
	heap->priv = data->priv;
	heap->type = ION_HEAP_TYPE_DMA;
	heap->type = (enum ion_heap_type)ION_HEAP_TYPE_DMA;
	cma_heap_has_outer_cache = data->has_outer_cache;
	return heap;
}
@@ -436,7 +436,7 @@ struct ion_heap *ion_cma_secure_heap_create(struct ion_platform_heap *data)
	 * used to make the link with reserved CMA memory
	 */
	heap->priv = data->priv;
	heap->type = ION_HEAP_TYPE_HYP_CMA;
	heap->type = (enum ion_heap_type)ION_HEAP_TYPE_HYP_CMA;
	cma_heap_has_outer_cache = data->has_outer_cache;
	return heap;
}
+2 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 *
 * Copyright (C) Linaro 2012
 * Author: <benjamin.gaignard@linaro.org> for ST-Ericsson.
 * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
@@ -869,7 +869,7 @@ struct ion_heap *ion_secure_cma_heap_create(struct ion_platform_heap *data)
	mutex_init(&sheap->chunk_lock);
	mutex_init(&sheap->alloc_lock);
	sheap->heap.ops = &ion_secure_cma_ops;
	sheap->heap.type = ION_HEAP_TYPE_SECURE_DMA;
	sheap->heap.type = (enum ion_heap_type)ION_HEAP_TYPE_SECURE_DMA;
	sheap->npages = data->size >> PAGE_SHIFT;
	sheap->base = data->base;
	sheap->heap_size = data->size;
+7 −7
Original line number Diff line number Diff line
/*
 *
 * Copyright (c) 2014-2016,2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2016, 2018-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -49,10 +49,10 @@ struct prefetch_info {

static bool is_cp_flag_present(unsigned long flags)
{
	return flags && (ION_FLAG_CP_TOUCH ||
			ION_FLAG_CP_BITSTREAM ||
			ION_FLAG_CP_PIXEL ||
			ION_FLAG_CP_NON_PIXEL ||
	return flags & (ION_FLAG_CP_TOUCH |
			ION_FLAG_CP_BITSTREAM |
			ION_FLAG_CP_PIXEL |
			ION_FLAG_CP_NON_PIXEL |
			ION_FLAG_CP_CAMERA);
}

@@ -118,7 +118,7 @@ static int ion_system_secure_heap_allocate(
						heap);

	if (!ion_heap_is_system_secure_heap_type(secure_heap->heap.type) ||
	    !is_cp_flag_present(flags)) {
	    !(is_cp_flag_present(flags) || (flags & ION_FLAG_SECURE))) {
		pr_info("%s: Incorrect heap type or incorrect flags\n",
			__func__);
		return -EINVAL;
@@ -393,7 +393,7 @@ struct ion_heap *ion_system_secure_heap_create(struct ion_platform_heap *unused)
	if (!heap)
		return ERR_PTR(-ENOMEM);
	heap->heap.ops = &system_secure_heap_ops;
	heap->heap.type = ION_HEAP_TYPE_SYSTEM_SECURE;
	heap->heap.type = (enum ion_heap_type)ION_HEAP_TYPE_SYSTEM_SECURE;
	heap->sys_heap = get_ion_heap(ION_SYSTEM_HEAP_ID);

	heap->destroy_heap = false;
+8 −4
Original line number Diff line number Diff line
/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -862,6 +862,7 @@ long msm_ion_custom_ioctl(struct ion_client *client,
		int ret;

		ret = ion_walk_heaps(client, data.prefetch_data.heap_id,
				     (enum ion_heap_type)
				     ION_HEAP_TYPE_SECURE_DMA,
				     (void *)data.prefetch_data.len,
				     ion_secure_cma_prefetch);
@@ -869,6 +870,7 @@ long msm_ion_custom_ioctl(struct ion_client *client,
			return ret;

		ret = ion_walk_heaps(client, data.prefetch_data.heap_id,
				     (enum ion_heap_type)
				     ION_HEAP_TYPE_SYSTEM_SECURE,
				     (void *)&data.prefetch_data,
				     ion_system_secure_heap_prefetch);
@@ -880,6 +882,7 @@ long msm_ion_custom_ioctl(struct ion_client *client,
	{
		int ret;
		ret = ion_walk_heaps(client, data.prefetch_data.heap_id,
				     (enum ion_heap_type)
				     ION_HEAP_TYPE_SECURE_DMA,
				     (void *)data.prefetch_data.len,
				     ion_secure_cma_drain_pool);
@@ -888,6 +891,7 @@ long msm_ion_custom_ioctl(struct ion_client *client,
			return ret;

		ret = ion_walk_heaps(client, data.prefetch_data.heap_id,
				     (enum ion_heap_type)
				     ION_HEAP_TYPE_SYSTEM_SECURE,
				     (void *)&data.prefetch_data,
				     ion_system_secure_heap_drain);