panfrost: Remove the perf counters interface
The DRM backend has a dummy implementation and the non-DRM backend is gone, so let's remove this perf counter interface. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
0bcbccf887
commit
e8257f3de8
|
@ -47,9 +47,6 @@
|
|||
#include "pan_util.h"
|
||||
#include "pan_tiler.h"
|
||||
|
||||
static int performance_counter_number = 0;
|
||||
extern const char *pan_counters_base;
|
||||
|
||||
/* Do not actually send anything to the GPU; merely generate the cmdstream as fast as possible. Disables framebuffer writes */
|
||||
//#define DRY_RUN
|
||||
|
||||
|
@ -1384,17 +1381,6 @@ panfrost_submit_frame(struct panfrost_context *ctx, bool flush_immediate,
|
|||
/* If readback, flush now (hurts the pipelined performance) */
|
||||
if (flush_immediate)
|
||||
screen->driver->force_flush_fragment(ctx, fence);
|
||||
|
||||
if (screen->driver->dump_counters && pan_counters_base) {
|
||||
screen->driver->dump_counters(screen);
|
||||
|
||||
char filename[128];
|
||||
snprintf(filename, sizeof(filename), "%s/frame%d.mdgprf", pan_counters_base, ++performance_counter_number);
|
||||
FILE *fp = fopen(filename, "wb");
|
||||
fwrite(screen->perf_counters.cpu, 4096, sizeof(uint32_t), fp);
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -323,18 +323,6 @@ panfrost_drm_force_flush_fragment(struct panfrost_context *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
panfrost_drm_enable_counters(struct panfrost_screen *screen)
|
||||
{
|
||||
fprintf(stderr, "unimplemented: %s\n", __func__);
|
||||
}
|
||||
|
||||
static void
|
||||
panfrost_drm_dump_counters(struct panfrost_screen *screen)
|
||||
{
|
||||
fprintf(stderr, "unimplemented: %s\n", __func__);
|
||||
}
|
||||
|
||||
static unsigned
|
||||
panfrost_drm_query_gpu_version(struct panfrost_screen *screen)
|
||||
{
|
||||
|
@ -425,12 +413,10 @@ panfrost_create_drm_driver(int fd)
|
|||
driver->base.force_flush_fragment = panfrost_drm_force_flush_fragment;
|
||||
driver->base.allocate_slab = panfrost_drm_allocate_slab;
|
||||
driver->base.free_slab = panfrost_drm_free_slab;
|
||||
driver->base.enable_counters = panfrost_drm_enable_counters;
|
||||
driver->base.query_gpu_version = panfrost_drm_query_gpu_version;
|
||||
driver->base.init_context = panfrost_drm_init_context;
|
||||
driver->base.fence_reference = panfrost_drm_fence_reference;
|
||||
driver->base.fence_finish = panfrost_drm_fence_finish;
|
||||
driver->base.dump_counters = panfrost_drm_dump_counters;
|
||||
|
||||
return &driver->base;
|
||||
}
|
||||
|
|
|
@ -66,8 +66,6 @@ int pan_debug = 0;
|
|||
|
||||
struct panfrost_driver *panfrost_create_drm_driver(int fd);
|
||||
|
||||
const char *pan_counters_base = NULL;
|
||||
|
||||
static const char *
|
||||
panfrost_get_name(struct pipe_screen *screen)
|
||||
{
|
||||
|
@ -585,14 +583,6 @@ panfrost_create_screen(int fd, struct renderonly *ro)
|
|||
|
||||
screen->driver = panfrost_create_drm_driver(fd);
|
||||
|
||||
/* Dump performance counters iff asked for in the environment */
|
||||
pan_counters_base = getenv("PANCOUNTERS_BASE");
|
||||
|
||||
if (pan_counters_base) {
|
||||
screen->driver->allocate_slab(screen, &screen->perf_counters, 64, true, 0, 0, 0);
|
||||
screen->driver->enable_counters(screen);
|
||||
}
|
||||
|
||||
if (pan_debug & PAN_DBG_TRACE)
|
||||
pandecode_initialize();
|
||||
|
||||
|
|
|
@ -64,8 +64,6 @@ struct panfrost_driver {
|
|||
struct panfrost_memory *mem);
|
||||
void (*free_imported_bo) (struct panfrost_screen *screen,
|
||||
struct panfrost_bo *bo);
|
||||
void (*enable_counters) (struct panfrost_screen *screen);
|
||||
void (*dump_counters) (struct panfrost_screen *screen);
|
||||
unsigned (*query_gpu_version) (struct panfrost_screen *screen);
|
||||
int (*init_context) (struct panfrost_context *ctx);
|
||||
void (*fence_reference) (struct pipe_screen *screen,
|
||||
|
@ -83,8 +81,6 @@ struct panfrost_screen {
|
|||
struct renderonly *ro;
|
||||
struct panfrost_driver *driver;
|
||||
|
||||
struct panfrost_memory perf_counters;
|
||||
|
||||
/* Memory management is based on subdividing slabs with AMD's allocator */
|
||||
struct pb_slabs slabs;
|
||||
|
||||
|
|
Loading…
Reference in New Issue