[igt-dev] [PATCH i-g-t] lib/rendercopy: Assert that buffer dimensions/stride are acceptable

Chris Wilson chris at chris-wilson.co.uk
Thu Apr 4 07:43:38 UTC 2019


Quoting Ville Syrjala (2019-04-03 16:41:04)
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Sprinkle some asserts into rendercopy to make sure we don't try
> to exceed the render engine surface size/stride limitations.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> diff --git a/lib/rendercopy_gen6.c b/lib/rendercopy_gen6.c
> index f4c0105a80db..a6157cfc70f6 100644
> --- a/lib/rendercopy_gen6.c
> +++ b/lib/rendercopy_gen6.c
> @@ -79,6 +79,10 @@ gen6_bind_buf(struct intel_batchbuffer *batch, const struct igt_buf *buf,
>         uint32_t write_domain, read_domain;
>         int ret;
>  
> +       igt_assert_lte(buf->stride, 128*1024);
> +       igt_assert_lte(igt_buf_width(buf), 8192);
> +       igt_assert_lte(igt_buf_height(buf), 8192);

Indeed. I had it down as 256k, but the field seems to be only 17b and
not 18b as ivb+.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the igt-dev mailing list