[igt-dev] [PATCH i-g-t] lib/igt_draw: Zero initalize the igt_bufs

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Jun 24 15:27:37 UTC 2019


On Mon, Jun 24, 2019 at 06:14:18PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> I missed these when sprinkling the memsets. Using stack garbage as the
> aux surface state isn't a good idea. Causes kms_front_buffer_tracking
> to fail on skl+.
> 
> Fixes: a4393c3951ec ("lib: Add aux surface state to igt_buf")
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

bash history fail. Please ignore.

> ---
>  lib/igt_draw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/igt_draw.c b/lib/igt_draw.c
> index ebae915113da..c7d5770dca28 100644
> --- a/lib/igt_draw.c
> +++ b/lib/igt_draw.c
> @@ -568,7 +568,7 @@ static void draw_rect_render(int fd, struct cmd_data *cmd_data,
>  	drm_intel_bo *src, *dst;
>  	uint32_t devid = intel_get_drm_devid(fd);
>  	igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
> -	struct igt_buf src_buf, dst_buf;
> +	struct igt_buf src_buf = {}, dst_buf = {};
>  	struct intel_batchbuffer *batch;
>  	uint32_t tiling, swizzle;
>  	struct buf_data tmp;
> -- 
> 2.16.4

-- 
Ville Syrjälä
Intel


More information about the igt-dev mailing list