etnaviv: submit full struct drm_etnaviv_gem_submit

It is safe to submit the full struct even on older kernels as such
kernels do not process the full struct. Without this change it
becomes quite challenging to extned the submit struct.

Freedreno has no special treatment too. See git commits
- freedreno: sync uapi header
- freedreno: add fence fd support

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
main
Christian Gmeiner 2017-06-09 12:27:34 +02:00
parent 68da7812fc
commit 2393acd144
1 changed files with 1 additions and 7 deletions

View File

@ -203,14 +203,8 @@ static void flush(struct etna_cmd_stream *stream, int in_fence_fd,
if (out_fence_fd)
req.flags |= ETNA_SUBMIT_FENCE_FD_OUT;
/*
* Pass the complete submit structure only if flags are set. Otherwise,
* only pass the fields up to, but not including the flags field for
* backwards compatiblity with older kernels.
*/
ret = drmCommandWriteRead(gpu->dev->fd, DRM_ETNAVIV_GEM_SUBMIT,
&req, req.flags ? sizeof(req) :
offsetof(struct drm_etnaviv_gem_submit, flags));
&req, sizeof(req));
if (ret)
ERROR_MSG("submit failed: %d (%s)", ret, strerror(errno));