Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions drivers/media/pci/intel/ipu7/psys/ipu-psys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,9 @@ static long ipu_psys_task_request(struct ipu_psys_task_request *task,
return -EINVAL;
}

mutex_lock(&psys->adev->acquire_fw_task_buffer_lock);
mutex_lock(&psys->acquire_fw_task_buffer_lock);
tq = ipu7_psys_get_task_queue(fh->ip, task);
mutex_unlock(&psys->adev->acquire_fw_task_buffer_lock);
mutex_unlock(&psys->acquire_fw_task_buffer_lock);
if (!tq) {
dev_err(&psys->dev, "Failed to get task queue\n");
return -EINVAL;
Expand Down Expand Up @@ -1466,7 +1466,7 @@ static int ipu7_psys_probe(struct auxiliary_device *auxdev,
}

dev_set_drvdata(dev, psys);
adev->get_running_fw_task_count =
psys->get_running_fw_task_count =
ipu7_psys_get_running_fw_task_count;
mutex_unlock(&ipu7_psys_mutex);
#ifdef CONFIG_DEBUG_FS
Expand Down Expand Up @@ -1503,7 +1503,7 @@ static void ipu7_psys_remove(struct auxiliary_device *auxdev)
struct ipu7_psys *psys = dev_get_drvdata(&auxdev->dev);
struct device *dev = &auxdev->dev;

psys->adev->get_running_fw_task_count = NULL;
psys->get_running_fw_task_count = NULL;
#ifdef CONFIG_DEBUG_FS
if (psys->debugfsdir)
debugfs_remove_recursive(psys->debugfsdir);
Expand Down
5 changes: 5 additions & 0 deletions drivers/media/pci/intel/ipu7/psys/ipu7-psys.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ struct ipu7_psys {

struct ipu7_psys_config *subsys_config;
dma_addr_t subsys_config_dma_addr;
/* Serialize FW message buffer or task queue acquisition against
* TLB invalidation.
*/
struct mutex acquire_fw_task_buffer_lock;
unsigned int (*get_running_fw_task_count)(struct ipu7_bus_device *adev);
};

struct ipu7_psys_fh {
Expand Down