mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: add enable flag for gpu emulate mode
Introduce enable flag NVGPU_SUPPORT_EMULATE_MODE, and bring emulate mode feature under this flag. At present, gpu emulate mode is only support on ga10b. Jira NVGPU-8120 Change-Id: I85269992926c3cf8f2d1dd70882979e1c4656984 Signed-off-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2681613 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7df16ee9c4
commit
40231858a5
@@ -19,6 +19,7 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <nvgpu/enabled.h>
|
||||
#include <nvgpu/errata.h>
|
||||
#include <nvgpu/kmem.h>
|
||||
#include <nvgpu/nvhost.h>
|
||||
@@ -1302,6 +1303,10 @@ static ssize_t emulate_mode_store(struct device *dev,
|
||||
if (kstrtoul(buf, 10, &val) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (!nvgpu_is_enabled(g, NVGPU_SUPPORT_EMULATE_MODE)) {
|
||||
nvgpu_err(g, "Emulate mode not supported");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (nvgpu_is_powered_on(g)) {
|
||||
nvgpu_err(g, "GPU is powered on already, emulate mode "
|
||||
"cannot be enabled");
|
||||
|
||||
Reference in New Issue
Block a user