msm: eva: Give EVA IRQ thread realtime priority

To ensure consistent EVA feature performance.

Change-Id: I8068984bb677b7eef388b114efc36520be9f8d76
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
This commit is contained in:
George Shen
2023-05-26 10:04:30 -07:00
committed by Gerrit - the friendly Code Review server
parent f97eda6bba
commit df291cad83
3 changed files with 9 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#ifndef __H_CVP_CORE_HFI_H__ #ifndef __H_CVP_CORE_HFI_H__
@@ -280,6 +281,7 @@ struct iris_hfi_device {
}; };
irqreturn_t cvp_hfi_isr(int irq, void *dev); irqreturn_t cvp_hfi_isr(int irq, void *dev);
irqreturn_t iris_hfi_core_work_handler(int irq, void *data);
irqreturn_t iris_hfi_isr_wd(int irq, void *dev); irqreturn_t iris_hfi_isr_wd(int irq, void *dev);
void cvp_iris_hfi_delete_device(void *device); void cvp_iris_hfi_delete_device(void *device);

View File

@@ -3456,7 +3456,7 @@ exit:
return packet_count; return packet_count;
} }
static void iris_hfi_core_work_handler(struct work_struct *work) irqreturn_t iris_hfi_core_work_handler(int irq, void *data)
{ {
struct msm_cvp_core *core; struct msm_cvp_core *core;
struct iris_hfi_device *device; struct iris_hfi_device *device;
@@ -3468,11 +3468,9 @@ static void iris_hfi_core_work_handler(struct work_struct *work)
if (core) if (core)
device = core->device->hfi_device_data; device = core->device->hfi_device_data;
else else
return; return IRQ_HANDLED;
mutex_lock(&device->lock); mutex_lock(&device->lock);
if (!__core_in_valid_state(device)) { if (!__core_in_valid_state(device)) {
if (warning_on) { if (warning_on) {
dprintk(CVP_WARN, "%s Core not in init state\n", dprintk(CVP_WARN, "%s Core not in init state\n",
@@ -3531,21 +3529,13 @@ err_no_work:
if (!(intr_status & CVP_WRAPPER_INTR_STATUS_A2HWD_BMSK)) if (!(intr_status & CVP_WRAPPER_INTR_STATUS_A2HWD_BMSK))
enable_irq(device->cvp_hal_data->irq); enable_irq(device->cvp_hal_data->irq);
/* return IRQ_HANDLED;
* XXX: Don't add any code beyond here. Reacquiring locks after release
* it above doesn't guarantee the atomicity that we're aiming for.
*/
} }
static DECLARE_WORK(iris_hfi_work, iris_hfi_core_work_handler);
irqreturn_t cvp_hfi_isr(int irq, void *dev) irqreturn_t cvp_hfi_isr(int irq, void *dev)
{ {
struct iris_hfi_device *device = dev;
disable_irq_nosync(irq); disable_irq_nosync(irq);
queue_work(device->cvp_workq, &iris_hfi_work); return IRQ_WAKE_THREAD;
return IRQ_HANDLED;
} }
static void iris_hfi_wd_work_handler(struct work_struct *work) static void iris_hfi_wd_work_handler(struct work_struct *work)

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only /* SPDX-License-Identifier: GPL-2.0-only
* *
* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#include <asm/memory.h> #include <asm/memory.h>
#include <linux/coresight-stm.h> #include <linux/coresight-stm.h>
@@ -153,8 +153,8 @@ static int msm_cvp_vm_init_reg_and_irq(struct iris_hfi_device *device,
} }
device->cvp_hal_data = hal; device->cvp_hal_data = hal;
rc = request_irq(res->irq, cvp_hfi_isr, IRQF_TRIGGER_HIGH, rc = request_threaded_irq(res->irq, cvp_hfi_isr, iris_hfi_core_work_handler,
"msm_cvp", device); IRQF_TRIGGER_HIGH, "msm_cvp", device);
if (unlikely(rc)) { if (unlikely(rc)) {
dprintk(CVP_ERR, "%s: request_irq failed rc: %d\n", __func__, rc); dprintk(CVP_ERR, "%s: request_irq failed rc: %d\n", __func__, rc);
goto error_irq_fail; goto error_irq_fail;