mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: add hal op to handle notify pending
The vserver variant for gr handle notify pending needs different functionality to send interrupt to VM. Add HAL operation to allow overriding vserver usecase. Jira VQRM-2982 Change-Id: I4cb88d4d769a5d5cb98a4ee6ac3fbb74245cb5f2 Signed-off-by: Aparna Das <aparnad@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1658255 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d6c6c6c483
commit
d654ab4863
@@ -445,6 +445,8 @@ struct gpu_ops {
|
||||
int (*handle_ssync_hww)(struct gk20a *g);
|
||||
void (*set_error_notifier)(struct gk20a *g,
|
||||
struct gr_gk20a_isr_data *isr_data, u32 error_notifier);
|
||||
int (*handle_notify_pending)(struct gk20a *g,
|
||||
struct gr_gk20a_isr_data *isr_data);
|
||||
} gr;
|
||||
struct {
|
||||
void (*init_hw)(struct gk20a *g);
|
||||
|
||||
@@ -5302,7 +5302,7 @@ static inline bool is_valid_cyclestats_bar0_offset_gk20a(struct gk20a *g,
|
||||
}
|
||||
#endif
|
||||
|
||||
static int gk20a_gr_handle_notify_pending(struct gk20a *g,
|
||||
int gk20a_gr_handle_notify_pending(struct gk20a *g,
|
||||
struct gr_gk20a_isr_data *isr_data)
|
||||
{
|
||||
struct fifo_gk20a *f = &g->fifo;
|
||||
@@ -5891,7 +5891,7 @@ int gk20a_gr_isr(struct gk20a *g)
|
||||
isr_data.sub_chan, isr_data.class_num);
|
||||
|
||||
if (gr_intr & gr_intr_notify_pending_f()) {
|
||||
gk20a_gr_handle_notify_pending(g, &isr_data);
|
||||
g->ops.gr.handle_notify_pending(g, &isr_data);
|
||||
gk20a_writel(g, gr_intr_r(),
|
||||
gr_intr_notify_reset_f());
|
||||
gr_intr &= ~gr_intr_notify_pending_f();
|
||||
|
||||
@@ -800,4 +800,6 @@ void gk20a_gr_init_ctxsw_hdr_data(struct gk20a *g,
|
||||
u32 gr_gk20a_get_patch_slots(struct gk20a *g);
|
||||
void gk20a_gr_set_error_notifier(struct gk20a *g,
|
||||
struct gr_gk20a_isr_data *isr_data, u32 error_notifier);
|
||||
int gk20a_gr_handle_notify_pending(struct gk20a *g,
|
||||
struct gr_gk20a_isr_data *isr_data);
|
||||
#endif /*__GR_GK20A_H__*/
|
||||
|
||||
@@ -312,6 +312,7 @@ static const struct gpu_ops gm20b_ops = {
|
||||
.init_ctxsw_hdr_data = gk20a_gr_init_ctxsw_hdr_data,
|
||||
.fecs_host_int_enable = gr_gk20a_fecs_host_int_enable,
|
||||
.set_error_notifier = gk20a_gr_set_error_notifier,
|
||||
.handle_notify_pending = gk20a_gr_handle_notify_pending,
|
||||
},
|
||||
.fb = {
|
||||
.reset = fb_gk20a_reset,
|
||||
|
||||
@@ -374,6 +374,7 @@ static const struct gpu_ops gp106_ops = {
|
||||
.load_ctxsw_ucode = gr_gm20b_load_ctxsw_ucode,
|
||||
.fecs_host_int_enable = gr_gk20a_fecs_host_int_enable,
|
||||
.set_error_notifier = gk20a_gr_set_error_notifier,
|
||||
.handle_notify_pending = gk20a_gr_handle_notify_pending,
|
||||
},
|
||||
.fb = {
|
||||
.reset = gp106_fb_reset,
|
||||
|
||||
@@ -342,6 +342,7 @@ static const struct gpu_ops gp10b_ops = {
|
||||
.dump_ctxsw_stats = gr_gp10b_dump_ctxsw_stats,
|
||||
.fecs_host_int_enable = gr_gk20a_fecs_host_int_enable,
|
||||
.set_error_notifier = gk20a_gr_set_error_notifier,
|
||||
.handle_notify_pending = gk20a_gr_handle_notify_pending,
|
||||
},
|
||||
.fb = {
|
||||
.reset = fb_gk20a_reset,
|
||||
|
||||
@@ -427,6 +427,7 @@ static const struct gpu_ops gv100_ops = {
|
||||
.fecs_host_int_enable = gr_gv11b_fecs_host_int_enable,
|
||||
.handle_ssync_hww = gr_gv11b_handle_ssync_hww,
|
||||
.set_error_notifier = gk20a_gr_set_error_notifier,
|
||||
.handle_notify_pending = gk20a_gr_handle_notify_pending,
|
||||
},
|
||||
.fb = {
|
||||
.reset = gv100_fb_reset,
|
||||
|
||||
@@ -394,6 +394,7 @@ static const struct gpu_ops gv11b_ops = {
|
||||
.fecs_host_int_enable = gr_gv11b_fecs_host_int_enable,
|
||||
.handle_ssync_hww = gr_gv11b_handle_ssync_hww,
|
||||
.set_error_notifier = gk20a_gr_set_error_notifier,
|
||||
.handle_notify_pending = gk20a_gr_handle_notify_pending,
|
||||
},
|
||||
.fb = {
|
||||
.reset = gv11b_fb_reset,
|
||||
|
||||
Reference in New Issue
Block a user