[v3,23/25] panfrost: Remove uneeded add_bo() in initialize_surface()

Submitted by Boris Brezillon on Sept. 5, 2019, 7:41 p.m.

Details

Message ID 20190905194150.17608-24-boris.brezillon@collabora.com
State New
Headers show
Series "panfrost: Rework the batch pipelining logic" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Boris Brezillon Sept. 5, 2019, 7:41 p.m.
Should already be added in panfrost_draw_vbo() and panfrost_clear(),
no need to add it here too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 src/gallium/drivers/panfrost/pan_fragment.c | 3 ---
 1 file changed, 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/panfrost/pan_fragment.c b/src/gallium/drivers/panfrost/pan_fragment.c
index cbb95b79f52a..00ff363a1bba 100644
--- a/src/gallium/drivers/panfrost/pan_fragment.c
+++ b/src/gallium/drivers/panfrost/pan_fragment.c
@@ -42,9 +42,6 @@  panfrost_initialize_surface(
         struct panfrost_resource *rsrc = pan_resource(surf->texture);
 
         rsrc->slices[level].initialized = true;
-
-        assert(rsrc->bo);
-        panfrost_batch_add_bo(batch, rsrc->bo, PAN_SHARED_BO_RW);
 }
 
 /* Generate a fragment job. This should be called once per frame. (According to

Comments

Ah, ignore my previous comment. Could we squash this into the patch that
added the PAN_SHARED_BO_RW define?

On Thu, Sep 05, 2019 at 09:41:48PM +0200, Boris Brezillon wrote:
> Should already be added in panfrost_draw_vbo() and panfrost_clear(),
> no need to add it here too.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>  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/drivers/panfrost/pan_fragment.c
> index cbb95b79f52a..00ff363a1bba 100644
> --- a/src/gallium/drivers/panfrost/pan_fragment.c
> +++ b/src/gallium/drivers/panfrost/pan_fragment.c
> @@ -42,9 +42,6 @@ panfrost_initialize_surface(
>          struct panfrost_resource *rsrc = pan_resource(surf->texture);
>  
>          rsrc->slices[level].initialized = true;
> -
> -        assert(rsrc->bo);
> -        panfrost_batch_add_bo(batch, rsrc->bo, PAN_SHARED_BO_RW);
>  }
>  
>  /* Generate a fragment job. This should be called once per frame. (According to
> -- 
> 2.21.0
On Thu, 5 Sep 2019 19:28:04 -0400
Alyssa Rosenzweig <alyssa@rosenzweig.io> 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, Boris Brezillon wrote:
> > Should already be added in panfrost_draw_vbo() and panfrost_clear(),
> > no need to add it here too.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > ---
> >  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/drivers/panfrost/pan_fragment.c
> > index cbb95b79f52a..00ff363a1bba 100644
> > --- a/src/gallium/drivers/panfrost/pan_fragment.c
> > +++ b/src/gallium/drivers/panfrost/pan_fragment.c
> > @@ -42,9 +42,6 @@ panfrost_initialize_surface(
> >          struct panfrost_resource *rsrc = pan_resource(surf->texture);
> >  
> >          rsrc->slices[level].initialized = true;
> > -
> > -        assert(rsrc->bo);
> > -        panfrost_batch_add_bo(batch, rsrc->bo, PAN_SHARED_BO_RW);
> >  }
> >  
> >  /* Generate a fragment job. This should be called once per frame. (According to
> > -- 
> > 2.21.0