gpu: nvgpu: add NULL check for su/lg_coalesce

su_coalesce and lg_coalesce hals are chip specific and
not all the chips need to set su/lg. Add NULL check for
these hals.
Also add hooks for nvgpu-next fuse.

JIRA NVGPU-4868

Change-Id: Ic89d3fb7669f86dcdd6e36c7f832e64958cb9576
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2288652
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Seema Khowala
2020-02-01 12:38:58 -08:00
committed by Alex Waterman
parent aa20b36597
commit 57d6721ce3
2 changed files with 9 additions and 2 deletions

View File

@@ -264,8 +264,12 @@ static int gr_init_setup_hw(struct gk20a *g)
/*
* Disable both surface and LG coalesce.
*/
g->ops.gr.init.su_coalesce(g, 0);
g->ops.gr.init.lg_coalesce(g, 0);
if (g->ops.gr.init.su_coalesce != NULL) {
g->ops.gr.init.su_coalesce(g, 0);
}
if (g->ops.gr.init.lg_coalesce != NULL) {
g->ops.gr.init.lg_coalesce(g, 0);
}
#ifdef CONFIG_NVGPU_GRAPHICS
if (g->ops.gr.init.preemption_state != NULL) {

View File

@@ -189,6 +189,9 @@ struct gops_fuse {
int (*read_vin_cal_gain_offset_fuse)(struct gk20a *g,
u32 vin_id, s8 *gain,
s8 *offset);
#if defined(CONFIG_NVGPU_HAL_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
#include "include/nvgpu/nvgpu_next_gops_fuse.h"
#endif
/** @endcond DOXYGEN_SHOULD_SKIP_THIS */
};