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

Commit 0bd594f6 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: Dump Venus registers on fatal error"

parents 73f8a452 3c4c6b10
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -3278,6 +3278,26 @@ exit:
	return;
}

static void __dump_venus_debug_registers(struct venus_hfi_device *device)
{
	u32 reg;

	dprintk(VIDC_ERR, "Dumping Venus registers...\n");
	reg = __read_register(device, VENUS_VBIF_XIN_HALT_CTRL1);
	dprintk(VIDC_ERR, "VENUS_VBIF_XIN_HALT_CTRL1: 0x%x\n", reg);

	reg = __read_register(device,
		VIDC_VENUS_WRAPPER_MMCC_VENUS0_POWER_STATUS);
	dprintk(VIDC_ERR,
		"VIDC_VENUS_WRAPPER_MMCC_VENUS0_POWER_STATUS: 0x%x\n", reg);

	reg = __read_register(device, VIDC_WRAPPER_CPU_STATUS);
	dprintk(VIDC_ERR, "VIDC_WRAPPER_CPU_STATUS: 0x%x\n", reg);

	reg = __read_register(device, VIDC_CPU_CS_SCIACMDARG0);
	dprintk(VIDC_ERR, "VIDC_CPU_CS_SCIACMDARG0: 0x%x\n", reg);
}

static void __process_sys_error(struct venus_hfi_device *device)
{
	struct hfi_sfr_struct *vsfr = NULL;
@@ -3393,6 +3413,7 @@ static int __response_handler(struct venus_hfi_device *device)
			dprintk(VIDC_ERR, "SFR Message from FW: %s\n",
					vsfr->rg_data);

		__dump_venus_debug_registers(device);
		dprintk(VIDC_ERR, "Received watchdog timeout\n");
		packets[packet_count++] = info;
		goto exit;
@@ -3417,6 +3438,7 @@ static int __response_handler(struct venus_hfi_device *device)
		/* Process the packet types that we're interested in */
		switch (info->response_type) {
		case HAL_SYS_ERROR:
			__dump_venus_debug_registers(device);
			__process_sys_error(device);
			break;
		case HAL_SYS_RELEASE_RESOURCE_DONE:
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, 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
@@ -139,6 +139,7 @@
#define VIDC_VBIF_AT_OLD_HIGH           (VIDC_VBIF_BASE_OFFS + 0xC08)
#define VIDC_VBIF_AT_NEW_BASE           (VIDC_VBIF_BASE_OFFS + 0xC10)
#define VIDC_VBIF_AT_NEW_HIGH           (VIDC_VBIF_BASE_OFFS + 0xC18)
#define VENUS_VBIF_XIN_HALT_CTRL1   (VIDC_VBIF_BASE_OFFS + 0x204)
#define VENUS_VBIF_AXI_HALT_CTRL0   (VIDC_VBIF_BASE_OFFS + 0x208)
#define VENUS_VBIF_AXI_HALT_CTRL1   (VIDC_VBIF_BASE_OFFS + 0x20C)

@@ -150,6 +151,8 @@
	(VIDC_WRAPPER_BASE_OFFS + 0x20)
#define VIDC_VENUS0_WRAPPER_VBIF_PRIORITY_LEVEL \
	(VIDC_WRAPPER_BASE_OFFS + 0x24)
#define VIDC_VENUS_WRAPPER_MMCC_VENUS0_POWER_STATUS \
	(VIDC_WRAPPER_BASE_OFFS + 0x44)

#define VIDC_CTRL_INIT 0x000D2048
#define VIDC_CTRL_INIT_RESERVED_BITS31_1__M 0xFFFFFFFE