panfrost: Rename bifrost_framebuffer->mali_framebuffer

(And bifrost_fb_extra to mali_framebuffer_extra, bifrost_render_target
to mali_render_target)

These structures are the norm on midgard t760+, drop the bifrost names,
it's silly... unrelated to the rest of the series but while I'm messing
with pandecode and cleaning up bifrost abstractions, might as well.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
This commit is contained in:
Alyssa Rosenzweig 2020-02-10 08:51:37 -05:00
parent 6dc105555b
commit 6d9ee3e65a
4 changed files with 36 additions and 36 deletions

View file

@ -155,7 +155,7 @@ panfrost_attach_vt_framebuffer(struct panfrost_context *ctx)
if (!batch->framebuffer.gpu) {
unsigned size = (screen->quirks & MIDGARD_SFBD) ?
sizeof(struct mali_single_framebuffer) :
sizeof(struct bifrost_framebuffer);
sizeof(struct mali_framebuffer);
batch->framebuffer = panfrost_allocate_transient(batch, size);

View file

@ -157,9 +157,9 @@ panfrost_mfbd_format(struct pipe_surface *surf)
static void
panfrost_mfbd_clear(
struct panfrost_batch *batch,
struct bifrost_framebuffer *fb,
struct bifrost_fb_extra *fbx,
struct bifrost_render_target *rts,
struct mali_framebuffer *fb,
struct mali_framebuffer_extra *fbx,
struct mali_render_target *rts,
unsigned rt_count)
{
for (unsigned i = 0; i < rt_count; ++i) {
@ -183,7 +183,7 @@ panfrost_mfbd_clear(
static void
panfrost_mfbd_set_cbuf(
struct bifrost_render_target *rt,
struct mali_render_target *rt,
struct pipe_surface *surf)
{
struct panfrost_resource *rsrc = pan_resource(surf->texture);
@ -228,8 +228,8 @@ panfrost_mfbd_set_cbuf(
static void
panfrost_mfbd_set_zsbuf(
struct bifrost_framebuffer *fb,
struct bifrost_fb_extra *fbx,
struct mali_framebuffer *fb,
struct mali_framebuffer_extra *fbx,
struct pipe_surface *surf)
{
struct panfrost_resource *rsrc = pan_resource(surf->texture);
@ -315,9 +315,9 @@ panfrost_mfbd_set_zsbuf(
static mali_ptr
panfrost_mfbd_upload(struct panfrost_batch *batch,
struct bifrost_framebuffer *fb,
struct bifrost_fb_extra *fbx,
struct bifrost_render_target *rts,
struct mali_framebuffer *fb,
struct mali_framebuffer_extra *fbx,
struct mali_render_target *rts,
unsigned rt_count)
{
off_t offset = 0;
@ -328,9 +328,9 @@ panfrost_mfbd_upload(struct panfrost_batch *batch,
/* Compute total size for transfer */
size_t total_sz =
sizeof(struct bifrost_framebuffer) +
(has_extra ? sizeof(struct bifrost_fb_extra) : 0) +
sizeof(struct bifrost_render_target) * 4;
sizeof(struct mali_framebuffer) +
(has_extra ? sizeof(struct mali_framebuffer_extra) : 0) +
sizeof(struct mali_render_target) * 4;
struct panfrost_transfer m_f_trans =
panfrost_allocate_transient(batch, total_sz);
@ -357,7 +357,7 @@ panfrost_mfbd_upload(struct panfrost_batch *batch,
#undef UPLOAD
static struct bifrost_framebuffer
static struct mali_framebuffer
panfrost_emit_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
{
struct panfrost_context *ctx = batch->ctx;
@ -369,7 +369,7 @@ panfrost_emit_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
unsigned shift = panfrost_get_stack_shift(batch->stack_size);
struct bifrost_framebuffer framebuffer = {
struct mali_framebuffer framebuffer = {
.width1 = MALI_POSITIVE(width),
.height1 = MALI_POSITIVE(height),
.width2 = MALI_POSITIVE(width),
@ -396,7 +396,7 @@ panfrost_emit_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
void
panfrost_attach_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
{
struct bifrost_framebuffer mfbd =
struct mali_framebuffer mfbd =
panfrost_emit_mfbd(batch, vertex_count);
memcpy(batch->framebuffer.cpu, &mfbd, sizeof(mfbd));
@ -407,9 +407,9 @@ panfrost_attach_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
mali_ptr
panfrost_mfbd_fragment(struct panfrost_batch *batch, bool has_draws)
{
struct bifrost_framebuffer fb = panfrost_emit_mfbd(batch, has_draws);
struct bifrost_fb_extra fbx = {0};
struct bifrost_render_target rts[4] = {0};
struct mali_framebuffer fb = panfrost_emit_mfbd(batch, has_draws);
struct mali_framebuffer_extra fbx = {0};
struct mali_render_target rts[4] = {0};
/* We always upload at least one dummy GL_NONE render target */

View file

@ -1584,7 +1584,7 @@ struct mali_rt_format {
unsigned no_preload : 1;
} __attribute__((packed));
struct bifrost_render_target {
struct mali_render_target {
struct mali_rt_format format;
u64 zero1;
@ -1617,7 +1617,7 @@ struct bifrost_render_target {
u32 clear_color_4; // always equal, but unclear function?
} __attribute__((packed));
/* An optional part of bifrost_framebuffer. It comes between the main structure
/* An optional part of mali_framebuffer. It comes between the main structure
* and the array of render targets. It must be included if any of these are
* enabled:
*
@ -1632,7 +1632,7 @@ struct bifrost_render_target {
/* flags_lo */
#define MALI_EXTRA_ZS (0x4)
struct bifrost_fb_extra {
struct mali_framebuffer_extra {
mali_ptr checksum;
/* Each tile has an 8 byte checksum, so the stride is "width in tiles * 8" */
u32 checksum_stride;
@ -1678,11 +1678,11 @@ struct bifrost_fb_extra {
#define MALI_MFBD_DEPTH_WRITE (1 << 10)
/* The MFBD contains the extra bifrost_fb_extra section */
/* The MFBD contains the extra mali_framebuffer_extra section */
#define MALI_MFBD_EXTRA (1 << 13)
struct bifrost_framebuffer {
struct mali_framebuffer {
struct mali_shared_memory shared_memory;
/* 0x20 */
@ -1701,8 +1701,8 @@ struct bifrost_framebuffer {
struct midgard_tiler_descriptor tiler;
/* optional: struct bifrost_fb_extra extra */
/* struct bifrost_render_target rts[] */
/* optional: struct mali_framebuffer_extra extra */
/* struct mali_render_target rts[] */
} __attribute__((packed));
#endif /* __PANFROST_JOB_H__ */

View file

@ -993,16 +993,16 @@ pandecode_rt_format(struct mali_rt_format format)
}
static void
pandecode_render_target(uint64_t gpu_va, unsigned job_no, const struct bifrost_framebuffer *fb)
pandecode_render_target(uint64_t gpu_va, unsigned job_no, const struct mali_framebuffer *fb)
{
pandecode_log("struct bifrost_render_target rts_list_%"PRIx64"_%d[] = {\n", gpu_va, job_no);
pandecode_log("struct mali_render_target rts_list_%"PRIx64"_%d[] = {\n", gpu_va, job_no);
pandecode_indent++;
for (int i = 0; i < (fb->rt_count_1 + 1); i++) {
mali_ptr rt_va = gpu_va + i * sizeof(struct bifrost_render_target);
mali_ptr rt_va = gpu_va + i * sizeof(struct mali_render_target);
struct pandecode_mapped_memory *mem =
pandecode_find_mapped_gpu_mem_containing(rt_va);
const struct bifrost_render_target *PANDECODE_PTR_VAR(rt, mem, (mali_ptr) rt_va);
const struct mali_render_target *PANDECODE_PTR_VAR(rt, mem, (mali_ptr) rt_va);
pandecode_log("{\n");
pandecode_indent++;
@ -1058,11 +1058,11 @@ static struct pandecode_fbd
pandecode_mfbd_bfr(uint64_t gpu_va, int job_no, bool is_fragment, bool is_compute)
{
struct pandecode_mapped_memory *mem = pandecode_find_mapped_gpu_mem_containing(gpu_va);
const struct bifrost_framebuffer *PANDECODE_PTR_VAR(fb, mem, (mali_ptr) gpu_va);
const struct mali_framebuffer *PANDECODE_PTR_VAR(fb, mem, (mali_ptr) gpu_va);
struct pandecode_fbd info;
pandecode_log("struct bifrost_framebuffer framebuffer_%"PRIx64"_%d = {\n", gpu_va, job_no);
pandecode_log("struct mali_framebuffer framebuffer_%"PRIx64"_%d = {\n", gpu_va, job_no);
pandecode_indent++;
pandecode_log(".shared_memory = {\n");
@ -1110,15 +1110,15 @@ pandecode_mfbd_bfr(uint64_t gpu_va, int job_no, bool is_fragment, bool is_comput
pandecode_indent--;
pandecode_log("};\n");
gpu_va += sizeof(struct bifrost_framebuffer);
gpu_va += sizeof(struct mali_framebuffer);
info.has_extra = (fb->mfbd_flags & MALI_MFBD_EXTRA) && is_fragment;
if (info.has_extra) {
mem = pandecode_find_mapped_gpu_mem_containing(gpu_va);
const struct bifrost_fb_extra *PANDECODE_PTR_VAR(fbx, mem, (mali_ptr) gpu_va);
const struct mali_framebuffer_extra *PANDECODE_PTR_VAR(fbx, mem, (mali_ptr) gpu_va);
pandecode_log("struct bifrost_fb_extra fb_extra_%"PRIx64"_%d = {\n", gpu_va, job_no);
pandecode_log("struct mali_framebuffer_extra fb_extra_%"PRIx64"_%d = {\n", gpu_va, job_no);
pandecode_indent++;
MEMORY_PROP(fbx, checksum);
@ -1202,7 +1202,7 @@ pandecode_mfbd_bfr(uint64_t gpu_va, int job_no, bool is_fragment, bool is_comput
pandecode_indent--;
pandecode_log("};\n");
gpu_va += sizeof(struct bifrost_fb_extra);
gpu_va += sizeof(struct mali_framebuffer_extra);
}
if (is_fragment)