r600_pipe_state_add_reg(rstate, R_008C00_SQ_CONFIG, tmp, 0xFFFFFFFF, NULL, 0);
/* enable dynamic GPR resource management */
- if (r600_get_minor_version(rctx->radeon) >= 7) {
+ if (rctx->screen->info.drm_minor >= 7) {
/* always set temp clauses */
r600_pipe_state_add_reg(rstate, R_008C04_SQ_GPR_RESOURCE_MGMT_1,
S_008C04_NUM_CLAUSE_TEMP_GPRS(num_temp_gprs), 0xFFFFFFFF, NULL, 0);
enum radeon_family r600_get_family(struct radeon *rw);
enum chip_class r600_get_family_class(struct radeon *radeon);
-unsigned r600_get_clock_crystal_freq(struct radeon *radeon);
-unsigned r600_get_minor_version(struct radeon *radeon);
-unsigned r600_get_num_backends(struct radeon *radeon);
-unsigned r600_get_num_tile_pipes(struct radeon *radeon);
-unsigned r600_get_backend_map(struct radeon *radeon);
/* r600_bo.c */
struct r600_bo;
else
return 14;
case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
- return r600_get_minor_version(rscreen->radeon) >= 9 ?
+ return rscreen->info.drm_minor >= 9 ?
(family >= CHIP_CEDAR ? 16384 : 8192) : 0;
case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS:
case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
/* Timer queries, present when the clock frequency is non zero. */
case PIPE_CAP_TIMER_QUERY:
- return r600_get_clock_crystal_freq(rscreen->radeon) != 0;
+ return rscreen->info.r600_clock_crystal_freq != 0;
case PIPE_CAP_MIN_TEXEL_OFFSET:
return -8;
rctx->context.end_query = r600_end_query;
rctx->context.get_query_result = r600_get_query_result;
- if (r600_get_num_backends(rctx->screen->radeon) > 0)
+ if (rctx->screen->info.r600_num_backends > 0)
rctx->context.render_condition = r600_render_condition;
}
struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
const struct pipe_resource *templ)
{
- struct radeon *radeon = ((struct r600_screen*)screen)->radeon;
+ struct r600_screen *rscreen = (struct r600_screen*)screen;
unsigned array_mode = 0;
if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) &&
array_mode = V_038000_ARRAY_1D_TILED_THIN1;
}
else if (debug_get_option_tiling_enabled() &&
- r600_get_minor_version(radeon) >= 9 &&
+ rscreen->info.drm_minor >= 9 &&
permit_hardware_blit(screen, templ)) {
array_mode = V_038000_ARRAY_2D_TILED_THIN1;
}
if (r600_enable_s3tc == -1) {
struct r600_screen *rscreen = (struct r600_screen *)screen;
- if (r600_get_minor_version(rscreen->radeon) >= 9)
+ if (rscreen->info.drm_minor >= 9)
r600_enable_s3tc = 1;
else
r600_enable_s3tc = debug_get_bool_option("R600_ENABLE_S3TC", FALSE);
}
/* add blocks */
- if (r600_get_family(radeon) == CHIP_CAYMAN)
+ if (radeon->family == CHIP_CAYMAN)
r = r600_context_add_block(ctx, cayman_config_reg_list,
Elements(cayman_config_reg_list), PKT3_SET_CONFIG_REG, EVERGREEN_CONFIG_REG_OFFSET);
else
Elements(evergreen_config_reg_list), PKT3_SET_CONFIG_REG, EVERGREEN_CONFIG_REG_OFFSET);
if (r)
goto out_err;
- if (r600_get_family(radeon) == CHIP_CAYMAN)
+ if (radeon->family == CHIP_CAYMAN)
r = r600_context_add_block(ctx, cayman_context_reg_list,
Elements(cayman_context_reg_list), PKT3_SET_CONTEXT_REG, EVERGREEN_CONTEXT_REG_OFFSET);
else
return radeon->chip_class;
}
-unsigned r600_get_clock_crystal_freq(struct radeon *radeon)
-{
- return radeon->info.r600_clock_crystal_freq;
-}
-
-unsigned r600_get_num_backends(struct radeon *radeon)
-{
- return radeon->info.r600_num_backends;
-}
-
-unsigned r600_get_num_tile_pipes(struct radeon *radeon)
-{
- return radeon->info.r600_num_tile_pipes;
-}
-
-unsigned r600_get_backend_map(struct radeon *radeon)
-{
- return radeon->info.r600_backend_map;
-}
-
-unsigned r600_get_minor_version(struct radeon *radeon)
-{
- return radeon->info.drm_minor;
-}
-
static unsigned radeon_family_from_device(unsigned device)
{
switch (device) {
{
struct r600_bo * buffer;
u32 * results;
- unsigned num_backends = r600_get_num_backends(ctx->radeon);
+ unsigned num_backends = ctx->radeon->info.r600_num_backends;
unsigned i, mask = 0;
/* if backend_map query is supported by the kernel */
if (ctx->radeon->info.r600_backend_map_valid) {
- unsigned num_tile_pipes = r600_get_num_tile_pipes(ctx->radeon);
- unsigned backend_map = r600_get_backend_map(ctx->radeon);
+ unsigned num_tile_pipes = ctx->radeon->info.r600_num_tile_pipes;
+ unsigned backend_map = ctx->radeon->info.r600_backend_map;
unsigned item_width, item_mask;
if (ctx->radeon->chip_class >= EVERGREEN) {
if (!r600_query_result(ctx, query, wait))
return FALSE;
if (query->type == PIPE_QUERY_TIME_ELAPSED)
- *result = (1000000*query->result)/r600_get_clock_crystal_freq(ctx->radeon);
+ *result = (1000000 * query->result) / ctx->radeon->info.r600_clock_crystal_freq;
else
*result = query->result;
query->result = 0;