Skip to content

Commit

Permalink
gdev: Kepler support
Browse files Browse the repository at this point in the history
  • Loading branch information
yk-fujii committed Jul 15, 2013
1 parent 4b88be3 commit a645fdd
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 152 deletions.
22 changes: 1 addition & 21 deletions common/gdev_nvidia.h
Expand Up @@ -172,7 +172,7 @@ struct gdev_ctx {
void *bo;
uint32_t *map;
uint32_t addr;
} desc; /* compute desc struct */
} desc; /* compute desc struct. But really, need to structure for each launch grid */
};

/**
Expand Down Expand Up @@ -249,25 +249,6 @@ int gdev_raw_write(struct gdev_mem *mem, uint64_t addr, const void *buf, uint32_

static inline void __gdev_fire_ring(struct gdev_ctx *ctx)
{
#if 0 /* orig *//* axe */
if (ctx->fifo.pb_pos != ctx->fifo.pb_put) {
if (ctx->fifo.pb_pos > ctx->fifo.pb_put) {
uint64_t base = ctx->fifo.pb_base + ctx->fifo.pb_put;
uint32_t len = ctx->fifo.pb_pos - ctx->fifo.pb_put;
ctx->fifo.push(ctx, base, len, 0);
}
else {
uint64_t base = ctx->fifo.pb_base + ctx->fifo.pb_put;
uint32_t len = ctx->fifo.pb_size - ctx->fifo.pb_put;
ctx->fifo.push(ctx, base, len, 0);
/* why need this? */
if (ctx->fifo.pb_pos) {
ctx->fifo.push(ctx, ctx->fifo.pb_base, ctx->fifo.pb_pos, 0);
}
}
ctx->fifo.pb_put = ctx->fifo.pb_pos;
}
#else
if (ctx->fifo.pb_pos != ctx->fifo.pb_put) {
uint64_t base = ctx->fifo.pb_base + ctx->fifo.pb_put;
uint32_t len;
Expand All @@ -283,7 +264,6 @@ static inline void __gdev_fire_ring(struct gdev_ctx *ctx)
ctx->fifo.push(ctx, base, len, 0);
ctx->fifo.pb_put = ctx->fifo.pb_pos;
}
#endif
}

static inline void __gdev_out_ring(struct gdev_ctx *ctx, uint32_t word)
Expand Down

0 comments on commit a645fdd

Please sign in to comment.