Files
linux-nvgpu/drivers/gpu/nvgpu/common/linux
Peter Daifuku de399ccb00 gpu: nvgpu: fix patch buf count update for vidmem
gr_gk20a_ctx_patch_write_begin() updates the patch buffer data_count
when the associated graphics context memory buffer has been
CPU-mapped; it was doing so by looking for a non-null cpu_va.

However, if the graphics context has been allocated from vidmem,
cpu_va is always 0, so we can't tell if nvgpu_mem_begin() was called
for the context buffer or not.

Instead:
- add a cpu_accessible flag to the nvgpu_mem struct and set
  it in nvgpu_mem_begin()

- return the value of that flag in nvgpu_mem_cpu_accessible()

- gr_gk20a_ctx_patch_write_begin() now calls this new function
  instead of checking cpu_va.

Bug 2012077
JIRA ESRM-74

Change-Id: I8401699f30b4ae7154111721c25c7ec3ff95d329
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1587293
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-11-02 23:27:12 -07:00
..
2017-11-02 05:09:59 -07:00
2017-11-02 05:09:59 -07:00
2017-05-12 16:09:05 -07:00
2017-07-26 18:56:12 -07:00