intel/eu: Use descriptor constructors for dataport untyped surface messages.

v2: Use SET_BITS macro instead of left shift (Ken).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Francisco Jerez
2018-06-07 15:22:58 -07:00
parent 8e707fc2af
commit 2a9605d610
2 changed files with 52 additions and 50 deletions

View File

@@ -350,6 +350,20 @@ brw_dp_write_desc(const struct gen_device_info *devinfo,
SET_BITS(send_commit_msg, 15, 15));
}
/**
* Construct a message descriptor immediate with the specified dataport
* surface function controls.
*/
static inline uint32_t
brw_dp_surface_desc(const struct gen_device_info *devinfo,
unsigned msg_type,
unsigned msg_control)
{
assert(devinfo->gen >= 7);
return (SET_BITS(msg_control, 13, 8) |
SET_BITS(msg_type, 17, 14));
}
/**
* Construct a message descriptor immediate with the specified pixel
* interpolator function controls.