mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
This change improves the aggressive sync creation & destruction logic to avoid lock contention in the submit path. It does the following: 1) Removes the global sync destruction (channel) threshold, and adds a per-platform parameter. 2) Avoids lock contention in the clean-up/submit path when aggressive sync destruction is disabled. 3) Creates sync object at gpfifo allocation time (as long as we are not in aggressive sync destroy mode), to enable faster first submits Bug 1795076 Change-Id: Ifdb680100b08d00f37338063355bb2123ceb1b9f Signed-off-by: Sachit Kadle <skadle@nvidia.com> Reviewed-on: http://git-master/r/1202425 (cherry picked from commit ac0978711943a59c6f28c98c76b10759e0bff610) Reviewed-on: http://git-master/r/1202427 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
68 lines
1.8 KiB
C
68 lines
1.8 KiB
C
/*
|
|
* Tegra Virtualized GPU Platform Interface
|
|
*
|
|
* Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*/
|
|
|
|
#include <linux/of_platform.h>
|
|
|
|
#include "gk20a.h"
|
|
#include "hal_gk20a.h"
|
|
#include "platform_gk20a.h"
|
|
|
|
static int gk20a_tegra_probe(struct device *dev)
|
|
{
|
|
struct gk20a_platform *platform = dev_get_drvdata(dev);
|
|
struct device_node *np = dev->of_node;
|
|
const __be32 *host1x_ptr;
|
|
struct platform_device *host1x_pdev = NULL;
|
|
|
|
host1x_ptr = of_get_property(np, "nvidia,host1x", NULL);
|
|
if (host1x_ptr) {
|
|
struct device_node *host1x_node =
|
|
of_find_node_by_phandle(be32_to_cpup(host1x_ptr));
|
|
|
|
host1x_pdev = of_find_device_by_node(host1x_node);
|
|
if (!host1x_pdev) {
|
|
dev_warn(dev, "host1x device not available");
|
|
return -EPROBE_DEFER;
|
|
}
|
|
|
|
} else {
|
|
host1x_pdev = to_platform_device(dev->parent);
|
|
dev_warn(dev, "host1x reference not found. assuming host1x to be parent");
|
|
}
|
|
|
|
platform->g->host1x_dev = host1x_pdev;
|
|
|
|
return 0;
|
|
}
|
|
|
|
struct gk20a_platform vgpu_tegra_platform = {
|
|
.has_syncpoints = true,
|
|
.aggressive_sync_destroy_thresh = 64,
|
|
|
|
/* power management configuration */
|
|
.can_railgate = false,
|
|
.can_elpg = false,
|
|
.enable_slcg = false,
|
|
.enable_blcg = false,
|
|
.enable_elcg = false,
|
|
.enable_elpg = false,
|
|
.enable_aelpg = false,
|
|
|
|
.probe = gk20a_tegra_probe,
|
|
.default_big_page_size = SZ_128K,
|
|
|
|
.virtual_dev = true,
|
|
};
|