mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: Use nvgpu_thread for VGPU interrupts
Use nvgpu_thread for launching the thread for polling VGPU interrupts. JIRA NVGPU-14 Change-Id: I7114336bb37c407ee7365c4442e1826d80575771 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1469650 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Richard Zhao <rizhao@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
72ded89101
commit
3d9b7847d9
@@ -13,7 +13,6 @@
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
@@ -134,6 +133,7 @@ static void vgpu_handle_channel_event(struct gk20a *g,
|
||||
static int vgpu_intr_thread(void *dev_id)
|
||||
{
|
||||
struct gk20a *g = dev_id;
|
||||
struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
|
||||
|
||||
while (true) {
|
||||
struct tegra_vgpu_intr_msg *msg;
|
||||
@@ -188,7 +188,7 @@ static int vgpu_intr_thread(void *dev_id)
|
||||
tegra_gr_comm_release(handle);
|
||||
}
|
||||
|
||||
while (!kthread_should_stop())
|
||||
while (!nvgpu_thread_should_stop(&priv->intr_handler))
|
||||
msleep(10);
|
||||
return 0;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ static void vgpu_remove_support(struct gk20a *g)
|
||||
TEGRA_GR_COMM_ID_SELF, TEGRA_VGPU_QUEUE_INTR,
|
||||
&msg, sizeof(msg));
|
||||
WARN_ON(err);
|
||||
kthread_stop(priv->intr_handler);
|
||||
nvgpu_thread_stop(&priv->intr_handler);
|
||||
|
||||
/* free mappings to registers, etc*/
|
||||
|
||||
@@ -650,9 +650,10 @@ int vgpu_probe(struct platform_device *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
priv->intr_handler = kthread_run(vgpu_intr_thread, gk20a, "gk20a");
|
||||
if (IS_ERR(priv->intr_handler))
|
||||
return -ENOMEM;
|
||||
err = nvgpu_thread_create(&priv->intr_handler, gk20a,
|
||||
vgpu_intr_thread, "gk20a");
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
gk20a_debug_init(dev, "gpu.0");
|
||||
|
||||
|
||||
@@ -20,11 +20,13 @@
|
||||
#include <linux/tegra_vgpu.h>
|
||||
#include "gk20a/gk20a.h"
|
||||
|
||||
#include <nvgpu/thread.h>
|
||||
|
||||
#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
|
||||
|
||||
struct vgpu_priv_data {
|
||||
u64 virt_handle;
|
||||
struct task_struct *intr_handler;
|
||||
struct nvgpu_thread intr_handler;
|
||||
struct tegra_vgpu_constants_params constants;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user