From 8fe7abebbbbfdc8b1acedd41aa8ac1926a24dc93 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Fri, 6 Feb 2015 12:39:05 -0800 Subject: gpu: nvgpu: gp10b: Add replayable pagefault buffer Add support for replayable fault buffer and enable it. Bug 1587836 Change-Id: Iee4ba42ab175c0d72d2c041fdb3ac9d845358847 Signed-off-by: Seshendra Gadagottu Reviewed-on: http://git-master/r/661668 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/rpfb_gp10b.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 drivers/gpu/nvgpu/gp10b/rpfb_gp10b.h (limited to 'drivers/gpu/nvgpu/gp10b/rpfb_gp10b.h') diff --git a/drivers/gpu/nvgpu/gp10b/rpfb_gp10b.h b/drivers/gpu/nvgpu/gp10b/rpfb_gp10b.h new file mode 100644 index 00000000..965c9573 --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/rpfb_gp10b.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ + +#ifndef RPFB_GP20B_H +#define RPFB_GP20B_H +struct gk20a; + +#define NV_UVM_FAULT_BUF_SIZE 32 + +int gp10b_replayable_pagefault_buffer_init(struct gk20a *g); +u32 gp10b_replayable_pagefault_buffer_get_index(struct gk20a *g); +u32 gp10b_replayable_pagefault_buffer_put_index(struct gk20a *g); +bool gp10b_replayable_pagefault_buffer_is_empty(struct gk20a *g); +bool gp10b_replayable_pagefault_buffer_is_full(struct gk20a *g); +bool gp10b_replayable_pagefault_buffer_is_overflow(struct gk20a *g); +void gp10b_replayable_pagefault_buffer_clear_overflow(struct gk20a *g); +void gp10b_replayable_pagefault_buffer_info(struct gk20a *g); +void gp10b_replayable_pagefault_buffer_deinit(struct gk20a *g); + +#endif -- cgit v1.2.2