From 914bb78a7dc0687b349310cc28613ea4a4c0be33 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Thu, 6 Apr 2017 17:56:08 -0700 Subject: gpu: nvgpu: vgpu: move TEGRA_VGPU_ATTRIB_PREEMPT_CTX_SIZE to constants Also removed deprecated TEGRA_VGPU_ATTRIB_*, but leave a place holder in case someone wants to use this command in future. Jira VFND-3796 Change-Id: Ic36a59db238d276b0e3dd68a9d8ec5834a04333d Signed-off-by: Richard Zhao Reviewed-on: http://git-master/r/1457497 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c') diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c index cac1db29..234d8a69 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c @@ -309,6 +309,7 @@ static int vgpu_gr_gp10b_set_preemption_mode(struct channel_gk20a *ch, static int vgpu_gr_gp10b_init_ctx_state(struct gk20a *g) { + struct vgpu_priv_data *priv = vgpu_get_priv_data(g); int err; gk20a_dbg_fn(""); @@ -317,11 +318,10 @@ static int vgpu_gr_gp10b_init_ctx_state(struct gk20a *g) if (err) return err; - vgpu_get_attribute(vgpu_get_handle(g), - TEGRA_VGPU_ATTRIB_PREEMPT_CTX_SIZE, - &g->gr.t18x.ctx_vars.preempt_image_size); + g->gr.t18x.ctx_vars.preempt_image_size = + priv->constants.preempt_ctx_size; if (!g->gr.t18x.ctx_vars.preempt_image_size) - return -ENXIO; + return -EINVAL; return 0; } -- cgit v1.2.2