[igt-dev] [PATCH i-g-t v5 1/6] lib/igt_kms: Add writeback support

Brian Starkey Brian.Starkey at arm.com
Mon Feb 4 13:31:35 UTC 2019


Hi Liviu,

On Tue, Jan 15, 2019 at 05:47:42PM +0000, Liviu Dudau wrote:
> From: Brian Starkey <brian.starkey at arm.com>

[snip]

>  
> +/**
> + * igt_output_set_writeback_fb:
> + * @output: Target output
> + * @fb: Target framebuffer
> + *
> + * This function sets the given @fb to be used as the target framebuffer for the
> + * writeback engine at the next atomic commit. It will also request a writeback
> + * out fence that will contain the fd number of the out fence created by KMS if
> + * the given @fb is valid.
> + */
> +void igt_output_set_writeback_fb(igt_output_t *output, struct igt_fb *fb)
> +{
> +	igt_display_t *display = output->display;
> +
> +	LOG(display, "%s: output_set_writeback_fb(%d)\n", output->name, fb ? fb->fb_id : 0);
> +
> +	igt_output_set_prop_value(output, IGT_CONNECTOR_WRITEBACK_FB_ID, fb ? fb->fb_id : 0);
> +	/* only request a writeback out fence if the framebuffer is valid */
> +	if (fb)
> +		igt_output_set_prop_value(output, IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR,
> +					  (ptrdiff_t)&output->writeback_out_fence_fd);

I'm still not sure (ptrdiff_t) is the right type here, (uintptr_t)
seems better.

Thanks,
-Brian


More information about the igt-dev mailing list