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
---
src/gallium/drivers/panfrost/pan_context.c | 10 +-
src/gallium/drivers/panfrost/pan_context.h | 6 ++
src
Both the BO cache and the transient pool are shared across
context's. Protect access to these with mutexes.
Signed-off-by: Rohan Garg
---
src/gallium/drivers/panfrost/pan_allocate.c | 2 ++
src/gallium/drivers/panfrost/pan_bo_cache.c | 16 +++-
src/gallium/drivers/pan
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
> > panfrost_drm_submit_vs_fs_job if required.
>
> Signed-off-by tag is mi
is_scanout is not used anywhere and can be inferred within
panfrost_drm_submit_vs_fs_job if required.
---
src/gallium/drivers/panfrost/pan_drm.c| 2 +-
src/gallium/drivers/panfrost/pan_job.c| 3 +--
src/gallium/drivers/panfrost/pan_screen.h | 3 +--
3 files changed, 3 insertions(+), 5 dele
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
---
src/gallium/drivers/panfrost/pan_allocate.c | 2 ++
src/gallium/drivers/panfrost/pan_bo_cache.c | 16
glDrawElementsBaseVertex
call and then supply a additional offset_bias_correction to the hardware.
Changes for v2:
* Renamed the draw_start and negative_start variables to something
more appropriate.
Signed-off-by: Rohan Garg
---
src/gallium/drivers/panfrost/pan_context.c | 17 -
src
Make sure we adjust draw_start and vertex_count in order to
take into account a index_bias as required by a glDrawElementsBaseVertex
call
Signed-off-by: Rohan Garg
---
src/gallium/drivers/panfrost/pan_context.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src
Maintain a list of panfrost supported GPU's and exit early when
running on a unsupported GPU.
Signed-off-by: Rohan Garg
---
src/gallium/drivers/panfrost/pan_screen.c | 15 +++
src/gallium/drivers/panfrost/pan_screen.h | 6 ++
2 files changed, 21 insertions(+)
diff --git
> I think assertions should be limited to the most basic of sanity checks,
> and the other asserts replaced by proper error handling.
So, should I leave it as is and let us hit assertions that we fix?
Cheers
Rohan Garg
signature.asc
Description: This is a digitally signed messag
; +
> +/* We compute no_incoming by traversing the batch. */
> +
> +for (unsigned i = 0; i < node_count; ++i) {
> +struct mali_job_descriptor_header *node =
> DESCRIPTOR_FOR_NODE(i); +
> +unsigned dep_1 = node->job_dependency_index_1;
> +unsigned dep_2 = node->job_dependency_index_2;
> +
> +if (!(dep_1 || dep_2))
> +BITSET_SET(no_incoming, i);
> +}
> +
> +/* No next_job fields are set at the beginning, so L is implciitly
> the + * empty set. As next_job fields are filled, L is implicitly
> set. Tail + * is the tail of L, however. */
> +
> +struct mali_job_descriptor_header *tail = NULL;
> +
> +/* We iterate, popping off elements of S. A simple foreach won't
> do, + * since we mutate S as we go (even adding elements) */
> +
> +unsigned arr_size = BITSET_WORDS(node_count);
> +
> +for (unsigned node_n_1 = __bitset_ffs(no_incoming, arr_size);
> +(node_n_1 != 0);
> +node_n_1 = __bitset_ffs(no_incoming, arr_size)) {
> +
> +unsigned node_n = node_n_1 - 1;
> +
> +/* We've got a node n, pop it off */
> +BITSET_CLEAR(no_incoming, node_n);
> +
> +/* Add it to the list */
> +struct mali_job_descriptor_header *n =
> +DESCRIPTOR_FOR_NODE(node_n);
> +
> +mali_ptr addr = GPU_ADDRESS_FOR_NODE(node_n);
> +
> +if (tail) {
> +/* Link us to the last node */
> +panfrost_set_job_next(tail, addr);
> +} else {
> +/* We are the first/last node */
> +batch->first_job.cpu = (uint8_t *) n;
> +batch->first_job.gpu = addr;
> +}
> +
> +tail = n;
> +
> +/* Scan dependencies */
> +for (unsigned node_m = 0; node_m < node_count; ++node_m) {
> +struct mali_job_descriptor_header *m =
> +DESCRIPTOR_FOR_NODE(node_m);
> +
> +/* Get the deps, accounting for removal */
> +unsigned dep_1 = m->job_dependency_index_1;
> +unsigned dep_2 = m->job_dependency_index_2;
> +
> +if (BITSET_TEST(edge_removal_1, node_m))
> +dep_1 = 0;
> +
> +if (BITSET_TEST(edge_removal_2, node_m))
> +dep_2 = 0;
> +
> +/* Pretend to remove edges */
> +if (dep_1 == node_n_1) {
> +BITSET_SET(edge_removal_1, node_m);
> +dep_1 = 0;
> +} else if (dep_2 == node_n_1) {
> +BITSET_SET(edge_removal_2, node_m);
> +dep_2 = 0;
> +} else {
> +/* This node has no relevant dependencies
> */ +continue;
> +}
> +
> +/* Are there edges left? If not, add us to S */
> +bool has_edges = dep_1 || dep_2;
> +
> +if (!has_edges)
> +BITSET_SET(no_incoming, node_m);
> +}
> +}
> +
> +}
Awesome stuff \o/
R-b :)
Cheers
Rohan Garg
signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Use the _safe version as asserted by gallium
Signed-off-by: Rohan Garg
---
src/gallium/drivers/panfrost/midgard/midgard_schedule.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_schedule.c
b/src/gallium/drivers/panfrost/midgard
On Friday, 21 June 2019 07:40:02 CEST Tomeu Vizoso wrote:
> On 6/20/19 6:33 PM, Rohan Garg wrote:
> >> Not sure I understand how this works. Isn't this going to cause
> >> unnecessary container builds?
> >>
> >> And, why cannot developers just add whate
Hey
> Good stuff, but isn't this change making us hit assertions?
Hm, I thought it only enabled debugging symbols. Do you have a recommendation
on how to enable debug symbols but not enabling assertions?
Cheers
Rohan Garg
___
mesa-dev mail
s for someone working in a branch to
( if the need be ) customize their containers for their branch.
To that extent, I've simply enabled the CI to auto generate a DEBIAN_TAG
which depends on the branch name so that a developer doesn't have to change
the DEBIAN_TAG themselves.
Ch
On Thursday, 20 June 2019 16:06:57 CEST you wrote:
> Right now we are doing it at a moment when we don't have all the
> information we need.
>
> Signed-off-by: Tomeu Vizoso
> Suggested-by: Alyssa Rosenzweig
> Cc: Rohan Garg
> Fixes: bfca21b622df ("panfrost:
Change to /artifacts in order to potentially fix
debootstrap failiures.
---
src/gallium/drivers/panfrost/ci/debian-install.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/drivers/panfrost/ci/debian-install.sh
b/src/gallium/drivers/panfrost/ci/debian-install.sh
index 8a8b4ec9a47
This enables developers to add packages to the container
when working on their own branches by creating
a container tag which features the branch name.
Dropped the IMAGE_LOCAL variable since I did not see it being
used anywhere.
---
src/gallium/drivers/panfrost/ci/gitlab-ci.yml | 6 +++---
1 file
---
src/gallium/drivers/panfrost/ci/create-rootfs.sh | 2 +-
src/gallium/drivers/panfrost/ci/deqp-runner.sh | 6 ++
src/gallium/drivers/panfrost/ci/gitlab-ci.yml| 4 ++--
src/gallium/drivers/panfrost/ci/lava-deqp.yml.jinja2 | 3 +++
4 files changed, 12 insertions(+), 3 deleti
I've made a few improvements to make the CI a bit
more robust.
Rohan Garg (3):
panfrost: Print a backtrace if there is one
panfrost: Make the gitlab-ci.yml file more robust
panfrost: The working dir is deleted right before
src/gallium/drivers/panfrost/ci/create-rootfs.sh | 2 +-
Refactor code to use draw_counts from a panfrost_job
---
src/gallium/drivers/panfrost/pan_context.c | 31 --
src/gallium/drivers/panfrost/pan_context.h | 2 --
src/gallium/drivers/panfrost/pan_job.c | 4 +--
src/gallium/drivers/panfrost/pan_job.h | 2 ++
4 files chan
These are not required anymore since mali jobs are
now linked lists i.e. u_vertex_jobs and u_tiler_jobs
---
src/gallium/drivers/panfrost/pan_context.c | 5 -
src/gallium/drivers/panfrost/pan_context.h | 2 --
src/gallium/drivers/panfrost/pan_wallpaper.c | 1 -
3 files changed, 8 deletions(
---
src/gallium/drivers/panfrost/pan_context.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c
b/src/gallium/drivers/panfrost/pan_context.c
index 66762a010f8..eaceaa8725e 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/driver
---
src/gallium/drivers/panfrost/pan_context.c | 49 +-
src/gallium/drivers/panfrost/pan_job.c | 59 ++
src/gallium/drivers/panfrost/pan_job.h | 8 +++
3 files changed, 68 insertions(+), 48 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_con
Make sure we link the last vertex job to the first tiler job.
---
src/gallium/drivers/panfrost/pan_context.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/panfrost/pan_context.c
b/src/gallium/drivers/panfrost/pan_context.c
index 00acb464bc6..caa914e33cb 100644
---
Move panfrost_job_set_requirements into panfrost_get_job_for_fbo,
requirements should be set when acquiring a job from a context.
---
src/gallium/drivers/panfrost/pan_context.c | 2 --
src/gallium/drivers/panfrost/pan_job.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/s
Start fleshing out panfrost_job
---
src/gallium/drivers/panfrost/pan_context.c | 3 +--
src/gallium/drivers/panfrost/pan_job.c | 20
src/gallium/drivers/panfrost/pan_job.h | 2 ++
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/pan
Refactor pan_context to separate out responsibilities between
pan_context and pan_job.
Rohan Garg (9):
panfrost/midgard: Initial implementation of panfrost_job_submit
panfrost/midgard: Reset job counters once the job is submitted
panfrost/midgard: Figure out job requirements in pan_job.c
Move the reset out of frame invalidation into job submission
---
src/gallium/drivers/panfrost/pan_context.c | 5 -
src/gallium/drivers/panfrost/pan_job.c | 4
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_context.c
b/src/gallium/drive
Requirements for a job should be figured out in pan_job.c
---
src/gallium/drivers/panfrost/pan_context.c | 8 +---
src/gallium/drivers/panfrost/pan_job.c | 11 +++
src/gallium/drivers/panfrost/pan_job.h | 4
3 files changed, 16 insertions(+), 7 deletions(-)
diff --git a
29 matches
Mail list logo