mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: Syncpoint invalid value to ~0.
As qnx syncpoint's invalid value is ~0, change the code to handle this. Bug 200603716 Change-Id: I5ec79688cd9e60066725781f1effe57692ec0c27 Signed-off-by: Dinesh <dt@nvidia.com> (cherry picked from commit 705260565a75bc90683841c4c08e4c857bda39f0) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2331208 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -88,7 +88,13 @@ nvgpu_channel_user_syncpt_create(struct nvgpu_channel *ch)
|
||||
s->syncpt_id = nvgpu_nvhost_get_syncpt_client_managed(s->nvhost,
|
||||
syncpt_name);
|
||||
|
||||
if (s->syncpt_id == 0U) {
|
||||
/**
|
||||
* This is a WAR to handle invalid value of a syncpt.
|
||||
* Once nvhost update the return value as NVGPU_INVALID_SYNCPT_ID,
|
||||
* we can remove the zero check.
|
||||
*/
|
||||
if ((s->syncpt_id == 0U) ||
|
||||
(s->syncpt_id == NVGPU_INVALID_SYNCPT_ID)) {
|
||||
nvgpu_err(g, "failed to get free syncpt");
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user