Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1444643 > unrolled thread

Re: [PATCH 3/7] drm/vc4: Add a bitmap of branch targets during shader validation.

Started byEric Anholt <eric@anholt.net>
First post2016-07-16 00:30 +0200
Last post2016-07-16 00:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/7] drm/vc4: Add a bitmap of branch targets during shader validation. Eric Anholt <eric@anholt.net> - 2016-07-16 00:30 +0200

#1444643 — Re: [PATCH 3/7] drm/vc4: Add a bitmap of branch targets during shader validation.

FromEric Anholt <eric@anholt.net>
Date2016-07-16 00:30 +0200
SubjectRe: [PATCH 3/7] drm/vc4: Add a bitmap of branch targets during shader validation.
Message-ID<rVjMm-47e-9@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Eric Anholt <eric@anholt.net> writes:

> This isn't used yet, it's just a first step toward loop validation.
> During the main parsing of instructions, we need to know when we hit a
> new basic block so that we can reset validated state.
>
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
>  drivers/gpu/drm/vc4/vc4_qpu_defines.h      |  12 +++
>  drivers/gpu/drm/vc4/vc4_validate_shaders.c | 114 ++++++++++++++++++++++++++++-
>  2 files changed, 124 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_qpu_defines.h b/drivers/gpu/drm/vc4/vc4_qpu_defines.h
> index d5c2f3c85ebb..82ef0e525d55 100644
> --- a/drivers/gpu/drm/vc4/vc4_qpu_defines.h
> +++ b/drivers/gpu/drm/vc4/vc4_qpu_defines.h

> +		/* The actual branch target is the instruction after the delay
> +		 * slots, plus whatever byte offset is in the low 32 bits of
> +		 * the instruction.  Make sure we're not branching beyond the
> +		 * end of the shader object.
> +		 */
> +		if (branch_imm % sizeof(inst) != 0) {
> +			DRM_ERROR("branch target not aligned\n");
> +			return false;
> +		};

Last change before pull request: I dropped the stray ';' that kbuild
test robot caught.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web