gpu: nvgpu: correct NUM_FBPAS

Although igpu does not have an FBPA unit, the hardware reports one, and
the ucode leaves space for one in the HWPM context save buffer. So
let NUM_FBPAS reflect this, so that registers that follow this section
in the context buffer are offset properly

JIRA EVLR-1716

Change-Id: I40105cf2ee7f92a44d1c7cc2d23a17276bbb9e84
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1535273
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Peter Daifuku
2017-08-08 15:41:32 -07:00
committed by mobile promotions
parent bc87e8989d
commit 2ea017da0d
2 changed files with 12 additions and 6 deletions

View File

@@ -130,11 +130,14 @@ static int gm20b_get_litter_value(struct gk20a *g, int value)
case GPU_LIT_LTS_STRIDE:
ret = proj_lts_stride_v();
break;
/* GM20B does not have a FBPA unit, despite what's listed in the
* hw headers or read back through NV_PTOP_SCAL_NUM_FBPAS,
* so hardcode all values to 0.
/* Even though GM20B doesn't have an FBPA unit, the HW reports one,
* and the microcode as a result leaves space in the context buffer
* for one, so make sure SW accounts for this also.
*/
case GPU_LIT_NUM_FBPAS:
ret = proj_scal_litter_num_fbpas_v();
break;
/* Hardcode FBPA values other than NUM_FBPAS to 0. */
case GPU_LIT_FBPA_STRIDE:
case GPU_LIT_FBPA_BASE:
case GPU_LIT_FBPA_SHARED_BASE:

View File

@@ -139,11 +139,14 @@ static int gp10b_get_litter_value(struct gk20a *g, int value)
case GPU_LIT_LTS_STRIDE:
ret = proj_lts_stride_v();
break;
/* GP10B does not have a FBPA unit, despite what's listed in the
* hw headers or read back through NV_PTOP_SCAL_NUM_FBPAS,
* so hardcode all values to 0.
/* Even though GP10B doesn't have an FBPA unit, the HW reports one,
* and the microcode as a result leaves space in the context buffer
* for one, so make sure SW accounts for this also.
*/
case GPU_LIT_NUM_FBPAS:
ret = proj_scal_litter_num_fbpas_v();
break;
/* Hardcode FBPA values other than NUM_FBPAS to 0. */
case GPU_LIT_FBPA_STRIDE:
case GPU_LIT_FBPA_BASE:
case GPU_LIT_FBPA_SHARED_BASE: