Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux
Sagar Kamble b6d349dcf6 gpu: nvgpu: init all buffer compbits state members
User fence syncpt_id in the buffer compbits state was set to 0
on allocation through PREPARE_COMPRESSIBLE_READ ioctl or
MARK_COMPRESSIBLE_WRITE ioctl.

In case NVGPU_GPU_COMPBITS_GPU is requested through the ioctl
PREPARE_COMPRESSIBLE_READ, CDE conversion command is not
submitted and the output fence is cloned from the initial
state fence (with syncpt_id=0).

NvRmSyncWait on this fence from userspace lead to below error:
  13e40000.host1x: nvhost_syncpt_wait_timeout: invalid syncpoint id 0

Initialize the buffer compbits state user fence syncpt_id to
NVGPU_INVALID_SYNCPT_ID with nvgpu_user_sync_init() so that
the userspace skips the NvRmSyncWait on that fence.

While at it, initialize other uninitialized members, valid_compbits
and zbc_color.

Bug 3360675

Change-Id: Ie2a584546e1ed37841cbdc3472b598794f911e6f
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2631235
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-11-27 10:08:14 -08:00
..
2021-10-26 13:47:32 -07:00
2020-12-15 14:13:28 -06:00
2018-06-27 07:30:06 -07:00
2020-12-15 14:10:29 -06:00
2019-02-01 09:45:57 -08:00
2021-08-11 01:55:08 -07:00
2021-06-28 22:39:06 -07:00
2021-11-26 08:47:52 -08:00
2019-08-28 14:24:19 -07:00