Skip to content

Commit

Permalink
radv/amdgpu: Remove ctx_query_reset_status
Browse files Browse the repository at this point in the history
We don't use this anymore, it is all dead code.

Signed-off-by: Joshua Ashton <[email protected]>

Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Friedrich Vock <[email protected]>
  • Loading branch information
misyltoad committed Jan 18, 2024
1 parent c55ac77 commit f424d08
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
8 changes: 0 additions & 8 deletions src/amd/vulkan/radv_radeon_winsys.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ enum radeon_value_id {
RADEON_CURRENT_MCLK,
};

enum radv_reset_status {
RADV_NO_RESET,
RADV_GUILTY_CONTEXT_RESET,
RADV_INNOCENT_CONTEXT_RESET,
};

struct radeon_cmdbuf {
/* These are uint64_t to tell the compiler that buf can't alias them.
* If they're uint32_t the generated code needs to redundantly
Expand Down Expand Up @@ -272,8 +266,6 @@ struct radeon_winsys {

int (*ctx_set_pstate)(struct radeon_winsys_ctx *ctx, uint32_t pstate);

enum radv_reset_status (*ctx_query_reset_status)(struct radeon_winsys_ctx *rwctx);

enum radeon_bo_domain (*cs_domain)(const struct radeon_winsys *ws);

struct radeon_cmdbuf *(*cs_create)(struct radeon_winsys *ws, enum amd_ip_type amd_ip_type, bool is_secondary);
Expand Down
27 changes: 0 additions & 27 deletions src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,32 +1487,6 @@ radv_amdgpu_ctx_wait_idle(struct radeon_winsys_ctx *rwctx, enum amd_ip_type ip_t
return true;
}

static enum radv_reset_status
radv_amdgpu_ctx_query_reset_status(struct radeon_winsys_ctx *rwctx)
{
int ret;
struct radv_amdgpu_ctx *ctx = (struct radv_amdgpu_ctx *)rwctx;
uint64_t flags;

ret = amdgpu_cs_query_reset_state2(ctx->ctx, &flags);
if (ret) {
fprintf(stderr, "radv/amdgpu: amdgpu_cs_query_reset_state2 failed. (%i)\n", ret);
return RADV_NO_RESET;
}

if (flags & AMDGPU_CTX_QUERY2_FLAGS_RESET) {
if (flags & AMDGPU_CTX_QUERY2_FLAGS_GUILTY) {
/* Some job from this context once caused a GPU hang */
return RADV_GUILTY_CONTEXT_RESET;
} else {
/* Some job from other context caused a GPU hang */
return RADV_INNOCENT_CONTEXT_RESET;
}
}

return RADV_NO_RESET;
}

static uint32_t
radv_to_amdgpu_pstate(enum radeon_ctx_pstate radv_pstate)
{
Expand Down Expand Up @@ -1793,7 +1767,6 @@ radv_amdgpu_cs_init_functions(struct radv_amdgpu_winsys *ws)
ws->base.ctx_destroy = radv_amdgpu_ctx_destroy;
ws->base.ctx_wait_idle = radv_amdgpu_ctx_wait_idle;
ws->base.ctx_set_pstate = radv_amdgpu_ctx_set_pstate;
ws->base.ctx_query_reset_status = radv_amdgpu_ctx_query_reset_status;
ws->base.cs_domain = radv_amdgpu_cs_domain;
ws->base.cs_create = radv_amdgpu_cs_create;
ws->base.cs_destroy = radv_amdgpu_cs_destroy;
Expand Down

0 comments on commit f424d08

Please sign in to comment.