If the current FB matches the new one there's nothing to be done in
panfrost_set_framebuffer_state(). By bailing out early in that case we
avoid emitting new FB descriptors (the old ones are still valid).
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.c | 4 ++
This field is never set to anything but NULL, which means the test
done in panfrost_free_job() and panfrost_get_job_for_fbo() will always
evaluate to false. Let's get rid of this field.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.h | 3 +--
src/gallium/dr
Allows us to pass BOs without checking if they're NULL or not.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_resource.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/panfrost/pan_resource.c
b/src/gallium/drivers/pan
ready has a job running would actually get the old job object
and might start messing up with it. Not sure that's what we want.
>
> On Fri, Aug 02, 2019 at 12:12:50PM +0200, Boris Brezillon wrote:
> > This guarantees that new draws targetting the same framebuffer will
> > get
_free_job().
Don't know having a NULL polygon_list is valid case (I guess that's
possible for a job that does not involve the tiler) but I was facing
this problem when running the deqp testsuite.
>
> On Fri, Aug 02, 2019 at 12:12:56PM +0200, Boris Brezillon wrote:
> > Allows us
ething we want to have to avoid the search into the
hash table? If we do that, we should at least check that the keys match
before returning the current job.
>
> On Fri, Aug 02, 2019 at 12:12:49PM +0200, Boris Brezillon wrote:
> > This field is never set to anything but N
his patch series is not the right time to focus on pipelined
> performance (though I'd love if somebody gave it some love at some
> point). But I do want to caution from a code smell that will make
> whoever that someone is -- quite possibly you! -- quite grumpy when they
> wo
in the ->set_framebuffer_state()
path.
While at it, add extra assert()s to make sure ctx->job is consistent.
Fixes: 59c9623d0a75 ("panfrost: Import job data structures from v3d")
Signed-off-by: Boris Brezillon
Changes in v2:
* New patch (suggested by Alyssa)
---
src/galli
The only user of this function always passes true.
Signed-off-by: Boris Brezillon
Reviewed-by: Alyssa Rosenzweig
---
Changes in v2:
* Add Alyssa's R-b
---
src/gallium/drivers/panfrost/pan_context.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/dr
ful (to limit the number of hash lookups).
Regards,
Boris
Alyssa Rosenzweig (1):
panfrost: Allocate polygon lists on-demand
Boris Brezillon (8):
panfrost: Make ctx->job useful
panfrost: Remove job from ctx->jobs at submission time
panfrost: Delay FB descriptor allocation
panfr
If the current FB matches the new one there's nothing to be done in
panfrost_set_framebuffer_state(). By bailing out early in that case we
avoid emitting new FB descriptors (the old ones are still valid).
Signed-off-by: Boris Brezillon
Reviewed-by: Alyssa Rosenzweig
---
Changes in v2:
The FB desc will be emitted/attached on the first draw targetting
this new FB.
Signed-off-by: Boris Brezillon
Reviewed-by: Alyssa Rosenzweig
---
Changes in v2:
* Add Alyssa's R-b
---
src/gallium/drivers/panfrost/pan_context.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
Allows us to pass BOs without checking if they're NULL or not.
Signed-off-by: Boris Brezillon
Reviewed-by: Alyssa Rosenzweig
---
Changes in v2:
* Add Alyssa's R-b
---
src/gallium/drivers/panfrost/pan_resource.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff -
No need to emit SFBD/MFBD at frame invalidation. They can be emitted
when the framebuffer is attached, which saves us a potential FB desc
re-allocation if a new FB is bound after the swap.
Signed-off-by: Boris Brezillon
Reviewed-by: Alyssa Rosenzweig
---
Changes in v2:
* Add Alyssa'
py the new state into ctx->pipe_framebuffer and exit the function.
Signed-off-by: Boris Brezillon
Reviewed-by: Alyssa Rosenzweig
---
Changes in v2:
* Add Alyssa's R-b
---
src/gallium/drivers/panfrost/pan_context.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
This guarantees that new draws targetting the same framebuffer will
get a new job instance.
Signed-off-by: Boris Brezillon
Reviewed-by: Alyssa Rosenzweig
---
Changes in v2:
* Add Alyssa's R-b
---
src/gallium/drivers/panfrost/pan_job.c | 8
1 file changed, 8 insertions(+)
diff --
Signed-off-by: Boris Brezillon
---
Changes in v2:
* None
---
src/gallium/drivers/panfrost/pan_context.c| 8 ++-
src/gallium/drivers/panfrost/pan_context.h| 1 -
src/gallium/drivers/panfrost/pan_drm.c| 2 +-
src/gallium/drivers/panfrost/pan_job.c| 24 +
duced by a
previous commit. But it does not necessarily means "backport to stable"
in mind.
>
> On Thu, Aug 08, 2019 at 11:46:43AM +0200, Juan A. Suarez Romero wrote:
> > On Fri, 2019-08-02 at 19:18 +0200, Boris Brezillon wrote:
> > > ctx->job is supposed to se
of context,
rewritten description
Signed-off-by: Daniel Stone
Signed-off-by: Boris Brezillon
Acked-by: Alyssa Rosenzweig
Reviewed-by: Qiang Yu
Tested-by: Qiang Yu
---
Changes in v7:
* None
Changes in v6:
* Fix the doc
Changes in v5:
* Add Alyssa's a-b
* Add Daniel's SoB
---
Signed-off-by: Daniel Stone
Signed-off-by: Boris Brezillon
Reviewed-by: Alyssa Rosenzweig
---
Changes in v7:
* Add a missing FREE() in dri2_set_damage_region() (Reported by Qiang)
Changes in v6:
* Pass pipe_box objects instead ints
* Document the set_damage_region() hook
Changes in v5:
* Add Al
ssing FREE(boxes) call
in dri2_set_damage_region() and fixed an alignment issue in the
panfrost driver.
Regards,
Boris
[1]https://gitlab.freedesktop.org/mesa/mesa/merge_requests/227
[2]https://patchwork.freedesktop.org/series/45915/#rev2
*** BLURB HERE ***
Boris Brezillon (1):
panfrost: Add suppo
the left/right/top/bottom regions surrounding
the biggest damage rect).
We also do not try to reduce the number of draws by passing all quad
vertices to the blit request (would require extending u_blitter)
Signed-off-by: Boris Brezillon
Reviewed-by: Alyssa Rosenzweig
---
Changes in v7:
* Move
platfrom_*.c files.
Then upcomming patches add a new dri2 interface for the drivers to
implement
Signed-off-by: Harish Krupo
Reviewed-by: Daniel Stone
Signed-off-by: Boris Brezillon
Acked-by: Alyssa Rosenzweig
Reviewed-by: Qiang Yu
Tested-by: Qiang Yu
---
Changes in v7:
* None
Changes in v6
From: Harish Krupo
Use the DRI2 interface callback to pass the damage rects to
the driver.
Signed-off-by: Harish Krupo
Signed-off-by: Boris Brezillon
Acked-by: Alyssa Rosenzweig
Reviewed-by: Qiang Yu
Tested-by: Qiang Yu
---
Changes in v7:
* None
Changes in v6:
* None
Changes in v5:
* Add
On Tue, 6 Aug 2019 15:49:14 +0800
Qiang Yu wrote:
> >
> > Erik, Qiang, Marek,
> >
> > Any comment on this v5. Should I send a v6 adding the missing FREE()
> > call. Anything else you'd like me to change?
> >
> Hi Boris,
>
> There's no other change from my side. Use v5 way is just my suggestion
On Mon, 12 Aug 2019 12:07:03 +0200
Boris Brezillon wrote:
> This is an attempt at resurrecting Daniel's MR [1] which was already
> resurrecting Harish's EGL_KHR_partial_update series [2]. This version
> implements Marek's suggestion to pass the set_damage_region() d
On Fri, 9 Aug 2019 13:00:44 -0700
Alyssa Rosenzweig wrote:
> We're just going to compute them in the driver but let's get the
> structures setup to handle them. Implementation from v3d.
>
> Signed-off-by: Alyssa Rosenzweig
The whole patchset is
Reviewed-by: Boris Br
The !job test is done after dereferencing the job pointer, which means
it's either always false or we have a NULL pointer exception.
Replace that test by an assert() at the beginning of the function.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_job.c | 4 +---
1
mir_foreach_instr_in_block_safe() is only needed if the caller intend
to remove the current item from the list. Downgrade to
mir_foreach_instr_in_block() when this is not the case.
Signed-off-by: Boris Brezillon
---
src/panfrost/midgard/midgard_compile.c | 2 +-
src/panfrost/midgard
instruction by something else).
Let's implement our own iterators (still based on the existing list
helpers) to address this limitation.
Signed-off-by: Boris Brezillon
---
src/panfrost/midgard/compiler.h | 75 ++-
src/panfrost/midgard/midgard_compile.c| 2 +-
On Tue, 13 Aug 2019 12:59:03 -0700
Alyssa Rosenzweig wrote:
> Could you explain a little bit more why this is neded? What do these
> helpers do that the generic list.h helpers can't?
The _safe attribute in generic helpers is just about handling the case
where the current item is removed from the
On Tue, 13 Aug 2019 12:55:57 -0700
Alyssa Rosenzweig wrote:
> > +++ b/src/panfrost/midgard/midgard_opt_perspective.c
> > @@ -71,7 +71,7 @@ midgard_opt_combine_projection(compiler_context *ctx,
> > midgard_block *block)
> > unsigned frcp_component = 0;
> > unsign
On Tue, 13 Aug 2019 22:25:49 +0200
Boris Brezillon wrote:
> On Tue, 13 Aug 2019 12:59:03 -0700
> Alyssa Rosenzweig wrote:
>
> > Could you explain a little bit more why this is neded? What do these
> > helpers do that the generic list.h helpers can't?
>
>
list_for_each_entry() does not allow modifying the current item pointer.
Let's rework the skip-instructions logic in schedule_block() to not
break this rule.
Signed-off-by: Boris Brezillon
---
src/panfrost/midgard/midgard_schedule.c | 8
1 file changed, 4 insertions(+), 4 dele
To avoid memory leaks.
Signed-off-by: Boris Brezillon
---
src/panfrost/midgard/compiler.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h
index 099d108142b1..f9ba31b5959d 100644
--- a/src/panfrost/midgard/compiler.h
+++ b/src
Add an assert() in schedule_bundle() to make sure all instruction
pointers in bundle.instructions[] are valid.
Signed-off-by: Boris Brezillon
---
src/panfrost/midgard/midgard_schedule.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/panfrost/midgard/midgard_schedule.c
b/src/panfrost
loop and rework the code so that the removed instruction is always the
current one (which is what the list_for_each_entry_safe() API was
initially designed for).
While at it, we also get rid of the unecessary insert(ins)/remove(ins)
dance by simply moving the instruction around.
Signed-off-by:
Right now we're leaking all block and instruction objects allocated by
the compiler. Let's clean things up before leaving
midgard_compile_shader_nir().
Signed-off-by: Boris Brezillon
---
src/panfrost/midgard/compiler.h| 12
src/panfrost/midgard/midgard_compile.c |
On Tue, 13 Aug 2019 15:30:20 -0700
Alyssa Rosenzweig wrote:
> > I don't see any remove_ins()/insert_before() call in there. Do you see
> > any reason for using the _safe() variant here?
>
> Er, I think I meant the outer loop, which has a remove/insert pair at
> the bottom to change the current
On Tue, 27 Aug 2019 12:36:42 +0200
Boris Brezillon wrote:
> list_for_each_entry() does not allow modifying the current item pointer.
> Let's rework the skip-instructions logic in schedule_block() to not
> break this rule.
>
> Signed-off-by: Boris Brezillon
> ---
problem as part of this
full-rewrite then ;-).
>
> On Tue, Aug 27, 2019 at 12:36:40PM +0200, Boris Brezillon wrote:
> > To avoid memory leaks.
> >
> > Signed-off-by: Boris Brezillon
> > ---
> > src/panfrost/midgard/compiler.h | 1 +
> > 1 file change
On Tue, 27 Aug 2019 07:25:03 -0700
Alyssa Rosenzweig wrote:
> Assuming it passes CI, feel free to apply it :)
I guess that stands for a R-b :-).
>
> On Tue, Aug 27, 2019 at 12:40:08PM +0200, Boris Brezillon wrote:
> > On Tue, 13 Aug 2019 15:30:20 -0700
> > Aly
Instructions attached to blocks are never explicitly freed. Let's
use ralloc() to attach those objects to the compiler context so that
they are automatically freed when the ctx object is freed.
Signed-off-by: Boris Brezillon
---
src/panfrost/midgard/compiler.h
On Wed, 28 Aug 2019 07:08:18 -0700
Alyssa Rosenzweig wrote:
> Looks good, r-b.
>
> Is it tested?
Tested locally, and CI is green (this time I made sure the tests were
actually run). Sorry again for introducing a regression with the other
patch.
___
me
Reset the damage area in the resource_from_handle() path (as done in
panfrost_resource_create()).
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_resource.c | 23 +++--
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/gallium/drivers
3:15PM +0200, Boris Brezillon wrote:
> > Reset the damage area in the resource_from_handle() path (as done in
> > panfrost_resource_create()).
> >
> > Signed-off-by: Boris Brezillon
> > ---
> > src/gallium/drivers/panfrost/pan_resource.c | 23 +++---
So we can call st_validate_state() from dri2_set_damage_region() in
order to update the BACK_LEFT attachement before using it. If we don't
do that, the resource passed to pipe_screen->set_damage_region() might
be wrong.
Signed-off-by: Boris Brezillon
---
Hi,
I honestly don't know i
only gallium driver implementing ->set_damage_region() is patched
accordingly.
Signed-off-by: Boris Brezillon
---
include/GL/internal/dri_interface.h | 4
src/egl/drivers/dri2/egl_dri2.c | 24 -
src/gallium/drivers/panfrost/pan_context.c | 14 +
On Thu, 29 Aug 2019 14:51:52 +0200
Rohan Garg wrote:
> Jobs _must_ only be shared across the same context, having
> the last_job tracked in a screen causes use-after-free issues
> and memory corruptions.
You should probably also mention that transient-pool and bo-cache
related fields should be p
On Thu, 29 Aug 2019 14:53:10 +0200
Rohan Garg wrote:
> is_scanout is not used anywhere and can be inferred within
> panfrost_drm_submit_vs_fs_job if required.
Signed-off-by tag is missing. Looks good otherwise.
Reviewed-by: Boris Brezillon
> ---
> src/gallium/drivers/panfro
On Thu, 29 Aug 2019 13:54:15 +0200
Boris Brezillon wrote:
> dri2_set_damage_region() must call st_validate_state(UPDATE_FRAMEBUFFER)
> to make sure the BACK_LEFT attachment is up-to-date.
> Problem is, dri2_swap_buffers_xxx() functions are actually targeting
> the old backbuffer wh
On Thu, 29 Aug 2019 15:31:31 +0200
Rohan Garg wrote:
> On jueves, 29 de agosto de 2019 15:07:08 (CEST) Boris Brezillon wrote:
> > On Thu, 29 Aug 2019 14:53:10 +0200
> >
> > Rohan Garg wrote:
> > > is_scanout is not used anywhere and can be inferred within
>
ol
is never shrinked, and even if it was, we still control the lifetime of
the job, so there's no reason for this BO to be freed before the GPU is
done executing the batch. But it still make sense to add the BO for
debugging purpose.
Signed-off-by: Boris Brezillon
---
src/gallium/driver
The context can be retrieved from batch->ctx.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.c | 6 +++---
src/gallium/drivers/panfrost/pan_drm.c | 2 +-
src/gallium/drivers/panfrost/pan_job.c | 24 ++
src/gallium/drivers/panfr
about shrinking the number of args passed
to some functions when information can be retrieved from other args.
Regards,
Boris
Boris Brezillon (4):
panfrost: Add transient BOs to job batches
panfrost: s/job/batch/
panfrost: Pass a batch to panfrost_drm_submit_vs_fs_batch()
panfrost: Stop p
Given the function name it makes more sense to pass it a job batch
directly.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_drm.c| 13 ++---
src/gallium/drivers/panfrost/pan_job.c| 2 +-
src/gallium/drivers/panfrost/pan_screen.h | 2 +-
3 files changed, 8
What we currently call a job is actually a batch containing several jobs
all attached to a rendering operation targeting a specific FBO.
Let's rename structs, functions, variables and fields to reflect this
fact.
Suggested-by: Alyssa Rosenzweig
Signed-off-by: Boris Brezillon
---
src/ga
On Fri, 30 Aug 2019 18:43:59 +0200
Michel Dänzer wrote:
> On 2019-08-29 1:54 p.m., Boris Brezillon wrote:
> > So we can call st_validate_state() from dri2_set_damage_region() in
> > order to update the BACK_LEFT attachement before using it. If we don't
> > do th
On Fri, 30 Aug 2019 18:56:52 +0200
Michel Dänzer wrote:
> On 2019-08-30 6:52 p.m., Boris Brezillon wrote:
> > On Fri, 30 Aug 2019 18:43:59 +0200
> > Michel Dänzer wrote:
> >
> >>> diff --git a/include/GL/internal/dri_interface.h
> >>> b/in
On Fri, 30 Aug 2019 18:00:12 +0200
Rohan Garg wrote:
> Jobs _must_ only be shared across the same context, having
> the last_job tracked in a screen causes use-after-free issues
> and memory corruptions.
>
> Signed-off-by: Rohan Garg
Reviewed-by: Boris Brezillon
> ---
>
the screen (loaning them out to the batch). Dynamic array
> * container of panfrost_bo */
> @@ -113,6 +115,8 @@ struct panfrost_screen {
> /* Set of free transient BOs */
> BITSET_DECLARE(free_transient, MAX_TRANSIENT_SLABS);
>
> + pthread_
On Fri, 30 Aug 2019 10:35:57 -0700
Alyssa Rosenzweig wrote:
> > +struct panfrost_job_batch *batch =
> > panfrost_job_get_batch_for_fbo(ctx);
>
> This is verbose. Could we do across this patch:
>
> s/panfrost_job_batch/panfrost_batch/g
> s/panfrost_job_get_batch_for_fbo/panfrost_get_b
The context can be retrieved from batch->ctx.
Signed-off-by: Boris Brezillon
---
Changes in v2:
* s/panfrost_job_get_batch_for_fbo/panfrost_get_batch_for_fbo/
* s/panfrost_job_batch/panfrost_batch/g
---
src/gallium/drivers/panfrost/pan_context.c | 6 +++---
src/gallium/drivers/panfr
Given the function name it makes more sense to pass it a job batch
directly.
Signed-off-by: Boris Brezillon
---
Changes in v2:
* s/panfrost_job_get_batch_for_fbo/panfrost_get_batch_for_fbo/
* s/panfrost_job_batch/panfrost_batch/g
---
src/gallium/drivers/panfrost/pan_drm.c| 13
What we currently call a job is actually a batch containing several jobs
all attached to a rendering operation targeting a specific FBO.
Let's rename structs, functions, variables and fields to reflect this
fact.
Suggested-by: Alyssa Rosenzweig
Signed-off-by: Boris Brezillon
---
Changes
Right now, the transient memory allocator implements its own BO caching
mechanism, which is not really needed since we already have a generic
BO cache. Let's simplify things a bit.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_allocate.c | 80 -
On Sat, 31 Aug 2019 17:12:33 +0100
Daniel Stone wrote:
> Hi Boris,
>
> On Sat, 31 Aug 2019 at 08:53, Boris Brezillon
> wrote:
> > @@ -123,8 +123,7 @@ struct panfrost_batch *
> > panfrost_job_create_batch(struct panfrost_context *ctx);
> >
> > void
On Sat, 31 Aug 2019 17:10:47 +0100
Daniel Stone wrote:
> Hi Boris,
>
> On Sat, 31 Aug 2019 at 11:47, Boris Brezillon
> wrote:
> > Right now, the transient memory allocator implements its own BO caching
> > mechanism, which is not really needed since we already hav
On Sat, 31 Aug 2019 19:21:04 +0200
Boris Brezillon wrote:
> On Sat, 31 Aug 2019 17:10:47 +0100
> Daniel Stone wrote:
>
> > Hi Boris,
> >
> > On Sat, 31 Aug 2019 at 11:47, Boris Brezillon
> > wrote:
> > > Right now, the transient memo
On Sat, 31 Aug 2019 17:06:30 +0100
Daniel Stone wrote:
> Hi Rohan,
>
> On Fri, 30 Aug 2019 at 17:00, Rohan Garg wrote:
> > Both the BO cache and the transient pool are shared across
> > context's. Protect access to these with mutexes.
>
> These fixes seem right to me, and (minus the issues B
implementation.
Regards,
Boris
Boris Brezillon (25):
panfrost: s/job/batch/
panfrost: Pass a batch to panfrost_drm_submit_vs_fs_batch()
panfrost: Stop passing a ctx to functions being passed a batch
panfrost: Make transient allocation rely on the BO cache
panfrost: Convert ctx->{scratch
What we currently call a job is actually a batch containing several jobs
all attached to a rendering operation targeting a specific FBO.
Let's rename structs, functions, variables and fields to reflect this
fact.
Suggested-by: Alyssa Rosenzweig
Signed-off-by: Boris Brezillon
---
Changes
Given the function name it makes more sense to pass it a job batch
directly.
Signed-off-by: Boris Brezillon
Alyssa Rosenzweig
Reviewed-by: Daniel Stone
---
Changes in v3:
* Collect R-bs
Changes in v2:
* s/panfrost_job_get_batch_for_fbo/panfrost_get_batch_for_fbo/
* s/panfrost_job_batch
The context can be retrieved from batch->ctx.
Signed-off-by: Boris Brezillon
Alyssa Rosenzweig
Reviewed-by: Daniel Stone
---
Changes in v3:
* Collect R-bs
Changes in v2:
* s/panfrost_job_get_batch_for_fbo/panfrost_get_batch_for_fbo/
* s/panfrost_job_batch/panfrost_batch/g
---
src/gall
This way we have all the fb_state information directly attached to a
batch and can pass only the batch to functions emitting CMDs, which is
needed if we want to be able to queue CMDs to a batch that's not
currently bound to the context.
Signed-off-by: Boris Brezillon
---
src/gallium/dr
This is needed if we want to free the panfrost_batch object at submit
time in order to not have to GC the batch on the next job submission.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_bo.c | 68 ++-
src/gallium/drivers/panfrost/pan_bo.h | 2 +
2
ctx->{scratchpad,tiler_heap,tiler_dummy} are allocated using
panfrost_drm_allocate_slab() but they never any of the SLAB-based
allocation logic. Let's convert those fields to plain BOs.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_contex
Some fields in panfrost_context are unused (probably leftovers from
previous refactor). Let's get rid of them.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.h | 4
1 file changed, 4 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.h
Right now, the transient memory allocator implements its own BO caching
mechanism, which is not really needed since we already have a generic
BO cache. Let's simplify things a bit.
Signed-off-by: Boris Brezillon
Alyssa Rosenzweig
---
Changes in v3:
* Collect R-b
Changes in v2:
* None
---
So we can move all the BO logic into this file instead of having it
spread over pan_resource.c, pan_drm.c and pan_bo_cache.c.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/meson.build | 2 +-
src/gallium/drivers/panfrost/{pan_bo_cache.c => pan_bo.c} | 0
Will be replaced by something similar but using a BOs as keys instead
of resources.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.h | 3 --
src/gallium/drivers/panfrost/pan_job.c | 38 --
src/gallium/drivers/panfrost/pan_job.h | 8
The last users have been converted to use plain BOs. Let's get rid of
this abstraction. We can always consider adding it back if we need it
at some point.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_allocate.h | 13
src/gallium/drivers/panfrost/pan_
Rename panfrost_is_scanout() into panfrost_batch_is_scanout(), pass it
a batch instead of a context and move the code to pan_job.c.
With this in place, we can now test if a batch is targeting a scanout
FB even if this batch is not bound to the context.
Signed-off-by: Boris Brezillon
---
src
ted functions are
prefixed with panfrost_bo_)
* release functions are no longer exposed, existing users are converted
to use panfrost_bo_unreference() instead
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_allocate.c | 5 +-
src/gallium/drivers/panfrost/pan_allocate.h |
-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_compute.c | 2 +-
src/gallium/drivers/panfrost/pan_context.c | 145 +---
src/gallium/drivers/panfrost/pan_job.c | 15 +-
src/gallium/drivers/panfrost/pan_resource.c | 26 ++--
4 files changed, 115 insertions
panfrost_draw_vbo() Might call the primeconvert/without_prim_restart
helpers which will enter the ->draw_vbo() again. Let's delay
payloads[].offset_start initialization so we don't initialize them
twice.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.c
e it by an unconditional wait at the end of
panfrost_batch_submit(). A new pipeline logic will be introduced later
on.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.c | 145 +
src/gallium/drivers/panfrost/pan_context.h | 9 +-
src/gallium/driver
So we can emit such jobs to a batch that's not currently bound to the
context.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.c | 36 ++---
src/gallium/drivers/panfrost/pan_context.h | 10 +++---
src/gallium/drivers/panfrost/pan_drm.c
So we can emit SET_VALUE jobs for a batch that's not currently bound
to the context.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_scoreboard.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_scoreboard.c
ff-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_allocate.c | 10 ++--
src/gallium/drivers/panfrost/pan_allocate.h | 7 +--
src/gallium/drivers/panfrost/pan_compute.c| 10 ++--
src/gallium/drivers/panfrost/pan_context.c| 51 +++
src/gallium/drivers/pan
We'll soon be able to flush a batch that's not currently bound to the
context, which means ctx->pipe_framebuffer will not necessarily be the
FBO targeted by the wallpaper draw. Let's prepare for this case and
use ctx->wallpaper_batch in panfrost_blit_wallpaper().
Signed-of
-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.c | 17 +
src/gallium/drivers/panfrost/pan_job.h | 3 +++
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c
b/src/gallium/drivers/panfrost/pan_context.c
in
Should already be added in panfrost_draw_vbo() and panfrost_clear(),
no need to add it here too.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_fragment.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_fragment.c
b/src/gallium
backed by BOs, and
given we might want to describe dependencies on BOs that are not
exposed as resources, we decided to use BOs as keys on our hash tables.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_allocate.c | 2 +-
src/gallium/drivers/panfrost/pan_blend_cso.c | 2
panfrost_flush() is about to be reworked to flush all pending batches,
but we want the fence to block on the last one. Let's move the fence
creation logic in panfrost_flush() to prepare for this situation.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/pan_context.c
All dEQP-GLES2.functional.fbo.render.texsubimage.* tests are now
passing.
Signed-off-by: Boris Brezillon
---
src/gallium/drivers/panfrost/ci/expected-failures.txt | 4
1 file changed, 4 deletions(-)
diff --git a/src/gallium/drivers/panfrost/ci/expected-failures.txt
b/src/gallium/drivers
On Thu, 5 Sep 2019 16:31:04 -0400
Alyssa Rosenzweig wrote:
> > +static struct panfrost_bo *
> > +panfrost_bo_alloc(struct panfrost_screen *screen, size_t size,
> > + uint32_t flags)
> > +{
> ...
> > +ret = drmIoctl(screen->fd, DRM_IOCTL_PANFROST_CREATE_BO,
> > &create_
On Thu, 5 Sep 2019 16:43:23 -0400
Alyssa Rosenzweig wrote:
> > +bool
> > +panfrost_bo_wait(struct panfrost_bo *bo, int64_t timeout_ns)
> > +{
> > +struct drm_panfrost_wait_bo req = {
> > +.handle = bo->gem_handle,
> > + .timeout_ns = timeout_ns,
> > +};
>
On Thu, 5 Sep 2019 19:28:04 -0400
Alyssa Rosenzweig wrote:
> Ah, ignore my previous comment. Could we squash this into the patch that
> added the PAN_SHARED_BO_RW define?
Absolutely (I don't know why I did that separately).
>
> On Thu, Sep 05, 2019 at 09:41:48PM +0200, Bori
On Thu, 5 Sep 2019 19:26:45 -0400
Alyssa Rosenzweig wrote:
> > --- a/src/gallium/drivers/panfrost/pan_fragment.c
> > +++ b/src/gallium/drivers/panfrost/pan_fragment.c
> > @@ -44,7 +44,7 @@ panfrost_initialize_surface(
> > rsrc->slices[level].initialized = true;
> >
> > assert(
101 - 200 of 332 matches
Mail list logo