diff options
author | Achal Verma <achalv@nvidia.com> | 2021-09-22 04:39:04 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2021-10-06 11:56:11 -0400 |
commit | 867763ab335e8a7fb4dd838830a3f17ca67196db (patch) | |
tree | 26091d91dfb827f905ae9ac97f4cc224dcfaa400 | |
parent | 5c76bc33f8bdfc345b78d84e2e7f12025b59ec42 (diff) |
tegra-vic: Make pdata->falcon_data NULL.
In case firmware load failed 15340000.vic
for whatever reason, we need to reassign
pdata->falcon_data NULL else based on check
if (pdata->falcon_data), non NULL , code will
assume that firmware is loaded properly last time
and will go ahead submitting the job, which may result
in SMMU-fault. We need that when it tries next time
it sees pdata->falcon_data is NULL and does allocation
and firmware loading before job submission,
Bug 200764796
Change-Id: Ia949ceb19b6b07db94b8a310a6c00363f8e58a6d
Signed-off-by: Achal Verma <achalv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2598619
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dmitry Pervushin <dpervushin@nvidia.com>
Reviewed-by: Amrita Deshmukh <amritad@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2606002
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Phoenix Jung <pjung@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/video/tegra/host/flcn/flcn.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/tegra/host/flcn/flcn.c b/drivers/video/tegra/host/flcn/flcn.c index 9a11c4619..e7832fbec 100644 --- a/drivers/video/tegra/host/flcn/flcn.c +++ b/drivers/video/tegra/host/flcn/flcn.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Tegra flcn common driver | 2 | * Tegra flcn common driver |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2021, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -553,9 +553,11 @@ static int nvhost_flcn_init_sw(struct platform_device *dev) | |||
553 | set_flcn(dev, v); | 553 | set_flcn(dev, v); |
554 | nvhost_dbg_fn("primed dev:%p v:%p", dev, v); | 554 | nvhost_dbg_fn("primed dev:%p v:%p", dev, v); |
555 | err = flcn_read_ucode(dev, pdata->firmware_name, v); | 555 | err = flcn_read_ucode(dev, pdata->firmware_name, v); |
556 | if (err || !v->valid) | 556 | if (err || !v->valid) { |
557 | kfree(v); | ||
558 | set_flcn(dev, NULL); | ||
557 | goto clean_up; | 559 | goto clean_up; |
558 | 560 | } | |
559 | return 0; | 561 | return 0; |
560 | 562 | ||
561 | clean_up: | 563 | clean_up: |