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

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

Merge "msm: vidc: Enable WARN_ON based on debug level"

parents 958e36a7 758ad853
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015, 2017, 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
@@ -298,7 +298,7 @@ static unsigned long __calculate_vmem_plus_ab(struct vidc_bus_vote_data *d)
		vmem_plus = 1;
		dprintk(VIDC_WARN,
			"could not calculate vmem ab value due to core freq mismatch\n");
		WARN_ON(1);
		WARN_ON(VIDC_DBG_WARN_ENABLE);
	}

exit:
+6 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, 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
@@ -1313,7 +1313,11 @@ static void cleanup_instance(struct msm_vidc_inst *inst)
		debugfs_remove_recursive(inst->debugfs_root);

		mutex_lock(&inst->pending_getpropq.lock);
		WARN_ON(!list_empty(&inst->pending_getpropq.list));
		if (!list_empty(&inst->pending_getpropq.list)) {
			dprintk(VIDC_ERR,
				"pending_getpropq not empty\n");
			WARN_ON(VIDC_DBG_WARN_ENABLE);
		}
		mutex_unlock(&inst->pending_getpropq.lock);
	}
}
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, 2017, 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
@@ -23,6 +23,7 @@
#endif

#define VIDC_DBG_TAG VIDC_DBG_LABEL ": %4s: "
#define VIDC_DBG_WARN_ENABLE (msm_vidc_debug & VIDC_INFO)

/* To enable messages OR these values and
 * echo the result to debugfs file.
+16 −8
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, 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
@@ -105,7 +105,11 @@ static int __tzbsp_set_video_state(enum tzbsp_video_state state);
 */
static inline void __strict_check(struct venus_hfi_device *device)
{
	WARN_ON(!mutex_is_locked(&device->lock));
	if (!mutex_is_locked(&device->lock)) {
		dprintk(VIDC_WARN,
			"device->lock mutex is not locked\n");
		WARN_ON(VIDC_DBG_WARN_ENABLE);
	}
}

static inline void __set_state(struct venus_hfi_device *device,
@@ -267,7 +271,7 @@ static int __acquire_regulator(struct regulator_info *rinfo)
	if (!regulator_is_enabled(rinfo->regulator)) {
		dprintk(VIDC_WARN, "Regulator is not enabled %s\n",
			rinfo->name);
		WARN_ON(1);
		WARN_ON(VIDC_DBG_WARN_ENABLE);
	}

	return rc;
@@ -617,7 +621,7 @@ static void __write_register(struct venus_hfi_device *device,
	if (!device->power_enabled) {
		dprintk(VIDC_WARN,
			"HFI Write register failed : Power is OFF\n");
		WARN_ON(1);
		WARN_ON(VIDC_DBG_WARN_ENABLE);
		return;
	}

@@ -643,7 +647,7 @@ static int __read_register(struct venus_hfi_device *device, u32 reg)
	if (!device->power_enabled) {
		dprintk(VIDC_WARN,
			"HFI Read register failed : Power is OFF\n");
		WARN_ON(1);
		WARN_ON(VIDC_DBG_WARN_ENABLE);
		return -EINVAL;
	}

@@ -1360,7 +1364,7 @@ static int __halt_axi(struct venus_hfi_device *device)
	if (!device->power_enabled) {
		dprintk(VIDC_WARN,
			"Clocks are OFF, skipping AXI HALT\n");
		WARN_ON(1);
		WARN_ON(VIDC_DBG_WARN_ENABLE);
		return -EINVAL;
	}

@@ -3530,7 +3534,11 @@ static int __response_handler(struct venus_hfi_device *device)
		if (session_id) {
			struct hal_session *session = NULL;

			WARN_ON(upper_32_bits((uintptr_t)*session_id) != 0);
			if (upper_32_bits((uintptr_t)*session_id) != 0) {
				dprintk(VIDC_WARN,
					"Upper 32 bits of session_id != 0\n");
				WARN_ON(VIDC_DBG_WARN_ENABLE);
			}
			session = __get_session(device,
					(u32)(uintptr_t)*session_id);
			if (!session) {
@@ -4088,7 +4096,7 @@ static int __disable_regulator(struct regulator_info *rinfo)
disable_regulator_failed:

	/* Bring attention to this issue */
	WARN_ON(1);
	WARN_ON(VIDC_DBG_WARN_ENABLE);
	return rc;
}