All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu: host1x: check relocs after all gathers are consumed
@ 2013-10-04 20:18 ` Erik Faye-Lund
  0 siblings, 0 replies; 8+ messages in thread
From: Erik Faye-Lund @ 2013-10-04 20:18 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA
  Cc: Thierry Reding, Terje Bergstrom,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

The num_relocs count are passed to the kernel per job, not per gather.

For multi-gather jobs, we would previously fail if there were relocs in
other gathers aside from the first one.

Fix this by simply moving the check until all gathers have been
consumed.

Signed-off-by: Erik Faye-Lund <kusmabite-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/gpu/host1x/job.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index c4e1050..c9ddff8 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -436,10 +436,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)
 		}
 	}
 
-	/* No relocs should remain at this point */
-	if (fw->num_relocs)
-		err = -EINVAL;
-
 out:
 	return err;
 }
@@ -493,6 +489,10 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
 		offset += g->words * sizeof(u32);
 	}
 
+	/* No relocs should remain at this point */
+	if (fw.num_relocs)
+		return -EINVAL;
+
 	return 0;
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] gpu: host1x: check relocs after all gathers are consumed
@ 2013-10-04 20:18 ` Erik Faye-Lund
  0 siblings, 0 replies; 8+ messages in thread
From: Erik Faye-Lund @ 2013-10-04 20:18 UTC (permalink / raw)
  To: linux-tegra; +Cc: Thierry Reding, Terje Bergstrom, dri-devel, linux-kernel

The num_relocs count are passed to the kernel per job, not per gather.

For multi-gather jobs, we would previously fail if there were relocs in
other gathers aside from the first one.

Fix this by simply moving the check until all gathers have been
consumed.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
---
 drivers/gpu/host1x/job.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index c4e1050..c9ddff8 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -436,10 +436,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)
 		}
 	}
 
-	/* No relocs should remain at this point */
-	if (fw->num_relocs)
-		err = -EINVAL;
-
 out:
 	return err;
 }
@@ -493,6 +489,10 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
 		offset += g->words * sizeof(u32);
 	}
 
+	/* No relocs should remain at this point */
+	if (fw.num_relocs)
+		return -EINVAL;
+
 	return 0;
 }
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gpu: host1x: check relocs after all gathers are consumed
  2013-10-04 20:18 ` Erik Faye-Lund
@ 2013-10-08  5:22     ` Arto Merilainen
  -1 siblings, 0 replies; 8+ messages in thread
From: Arto Merilainen @ 2013-10-08  5:22 UTC (permalink / raw)
  To: Erik Faye-Lund
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Thierry Reding,
	Terje Bergstrom, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 10/04/2013 11:18 PM, Erik Faye-Lund wrote:
> The num_relocs count are passed to the kernel per job, not per gather.
>
> For multi-gather jobs, we would previously fail if there were relocs in
> other gathers aside from the first one.
>
> Fix this by simply moving the check until all gathers have been
> consumed.
>
> Signed-off-by: Erik Faye-Lund <kusmabite-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Reviewed-by: Arto Merilainen <amerilainen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

- Arto

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gpu: host1x: check relocs after all gathers are consumed
@ 2013-10-08  5:22     ` Arto Merilainen
  0 siblings, 0 replies; 8+ messages in thread
From: Arto Merilainen @ 2013-10-08  5:22 UTC (permalink / raw)
  To: Erik Faye-Lund
  Cc: linux-tegra, Thierry Reding, Terje Bergstrom, dri-devel, linux-kernel

On 10/04/2013 11:18 PM, Erik Faye-Lund wrote:
> The num_relocs count are passed to the kernel per job, not per gather.
>
> For multi-gather jobs, we would previously fail if there were relocs in
> other gathers aside from the first one.
>
> Fix this by simply moving the check until all gathers have been
> consumed.
>
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>

Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>

- Arto

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gpu: host1x: check relocs after all gathers are consumed
  2013-10-04 20:18 ` Erik Faye-Lund
@ 2013-10-08 10:57     ` Terje Bergström
  -1 siblings, 0 replies; 8+ messages in thread
From: Terje Bergström @ 2013-10-08 10:57 UTC (permalink / raw)
  To: Erik Faye-Lund, linux-tegra-u79uwXL29TY76Z2rM5mHXA
  Cc: Thierry Reding, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 04.10.2013 23:18, Erik Faye-Lund wrote:
> The num_relocs count are passed to the kernel per job, not per gather.
> 
> For multi-gather jobs, we would previously fail if there were relocs in
> other gathers aside from the first one.
> 
> Fix this by simply moving the check until all gathers have been
> consumed.
> 
> Signed-off-by: Erik Faye-Lund <kusmabite-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/gpu/host1x/job.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
> index c4e1050..c9ddff8 100644
> --- a/drivers/gpu/host1x/job.c
> +++ b/drivers/gpu/host1x/job.c
> @@ -436,10 +436,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)
>  		}
>  	}
>  
> -	/* No relocs should remain at this point */
> -	if (fw->num_relocs)
> -		err = -EINVAL;
> -
>  out:
>  	return err;
>  }
> @@ -493,6 +489,10 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
>  		offset += g->words * sizeof(u32);
>  	}
>  
> +	/* No relocs should remain at this point */
> +	if (fw.num_relocs)
> +		return -EINVAL;
> +
>  	return 0;
>  }

Good catch.

Acked-By: Terje Bergstrom <tbergstrom-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Terje

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gpu: host1x: check relocs after all gathers are consumed
@ 2013-10-08 10:57     ` Terje Bergström
  0 siblings, 0 replies; 8+ messages in thread
From: Terje Bergström @ 2013-10-08 10:57 UTC (permalink / raw)
  To: Erik Faye-Lund, linux-tegra; +Cc: Thierry Reding, dri-devel, linux-kernel

On 04.10.2013 23:18, Erik Faye-Lund wrote:
> The num_relocs count are passed to the kernel per job, not per gather.
> 
> For multi-gather jobs, we would previously fail if there were relocs in
> other gathers aside from the first one.
> 
> Fix this by simply moving the check until all gathers have been
> consumed.
> 
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
> ---
>  drivers/gpu/host1x/job.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
> index c4e1050..c9ddff8 100644
> --- a/drivers/gpu/host1x/job.c
> +++ b/drivers/gpu/host1x/job.c
> @@ -436,10 +436,6 @@ static int validate(struct host1x_firewall *fw, struct host1x_job_gather *g)
>  		}
>  	}
>  
> -	/* No relocs should remain at this point */
> -	if (fw->num_relocs)
> -		err = -EINVAL;
> -
>  out:
>  	return err;
>  }
> @@ -493,6 +489,10 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
>  		offset += g->words * sizeof(u32);
>  	}
>  
> +	/* No relocs should remain at this point */
> +	if (fw.num_relocs)
> +		return -EINVAL;
> +
>  	return 0;
>  }

Good catch.

Acked-By: Terje Bergstrom <tbergstrom@nvidia.com>

Terje


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gpu: host1x: check relocs after all gathers are consumed
  2013-10-04 20:18 ` Erik Faye-Lund
@ 2013-10-08 11:32   ` Thierry Reding
  -1 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2013-10-08 11:32 UTC (permalink / raw)
  To: Erik Faye-Lund; +Cc: linux-tegra, Terje Bergstrom, linux-kernel, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 539 bytes --]

On Fri, Oct 04, 2013 at 08:18:33PM +0000, Erik Faye-Lund wrote:
> The num_relocs count are passed to the kernel per job, not per gather.
> 
> For multi-gather jobs, we would previously fail if there were relocs in
> other gathers aside from the first one.
> 
> Fix this by simply moving the check until all gathers have been
> consumed.
> 
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
> ---
>  drivers/gpu/host1x/job.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

Thierry

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gpu: host1x: check relocs after all gathers are consumed
@ 2013-10-08 11:32   ` Thierry Reding
  0 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2013-10-08 11:32 UTC (permalink / raw)
  To: Erik Faye-Lund; +Cc: linux-tegra, Terje Bergstrom, dri-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

On Fri, Oct 04, 2013 at 08:18:33PM +0000, Erik Faye-Lund wrote:
> The num_relocs count are passed to the kernel per job, not per gather.
> 
> For multi-gather jobs, we would previously fail if there were relocs in
> other gathers aside from the first one.
> 
> Fix this by simply moving the check until all gathers have been
> consumed.
> 
> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
> ---
>  drivers/gpu/host1x/job.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-10-08 11:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-04 20:18 [PATCH] gpu: host1x: check relocs after all gathers are consumed Erik Faye-Lund
2013-10-04 20:18 ` Erik Faye-Lund
     [not found] ` <1380917913-20482-1-git-send-email-kusmabite-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-08  5:22   ` Arto Merilainen
2013-10-08  5:22     ` Arto Merilainen
2013-10-08 10:57   ` Terje Bergström
2013-10-08 10:57     ` Terje Bergström
2013-10-08 11:32 ` Thierry Reding
2013-10-08 11:32   ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.