mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
gpu: nvgpu: Pass struct gk20a to gk20a_wait_for_idle()
Pass struct gk20a pointer instead of struct device to gk20a_wait_for_idle(). The code is not Linux specific and does not need pointer to struct device. Change-Id: I2cafd6c7db019c9de76b6e68a1ae73f0b4cea37d Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1533173 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
2e07e06330
commit
192cf8c1f8
@@ -659,7 +659,7 @@ static void gk20a_pm_shutdown(struct platform_device *pdev)
|
||||
/* Prevent more requests by disabling Runtime PM */
|
||||
__pm_runtime_disable(&pdev->dev, false);
|
||||
|
||||
err = gk20a_wait_for_idle(&pdev->dev);
|
||||
err = gk20a_wait_for_idle(g);
|
||||
if (err) {
|
||||
nvgpu_err(g, "failed to idle GPU, err=%d", err);
|
||||
goto finish;
|
||||
@@ -844,7 +844,7 @@ void gk20a_driver_start_unload(struct gk20a *g)
|
||||
if (g->is_virtual)
|
||||
return;
|
||||
|
||||
gk20a_wait_for_idle(dev_from_gk20a(g));
|
||||
gk20a_wait_for_idle(g);
|
||||
|
||||
nvgpu_wait_for_deferred_interrupts(g);
|
||||
gk20a_channel_cancel_pending_sema_waits(g);
|
||||
|
||||
@@ -362,9 +362,8 @@ int gk20a_can_busy(struct gk20a *g)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int gk20a_wait_for_idle(struct device *dev)
|
||||
int gk20a_wait_for_idle(struct gk20a *g)
|
||||
{
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
int wait_length = 150; /* 3 second overall max wait. */
|
||||
int target_usage_count = 0;
|
||||
|
||||
|
||||
@@ -1455,7 +1455,7 @@ int __gk20a_do_idle(struct gk20a *g, bool force_reset);
|
||||
int __gk20a_do_unidle(struct gk20a *g);
|
||||
|
||||
int gk20a_can_busy(struct gk20a *g);
|
||||
int gk20a_wait_for_idle(struct device *dev);
|
||||
int gk20a_wait_for_idle(struct gk20a *g);
|
||||
|
||||
#define NVGPU_GPU_ARCHITECTURE_SHIFT 4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user