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

Antonio Argenziano antonio.argenziano at intel.com
Fri Jul 6 16:45:45 UTC 2018



On 06/07/18 09:39, 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>

Reviewed-by: Antonio Argenziano <antonio.argenziano at intel.com>

> ---
>   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;
> 


More information about the igt-dev mailing list