drm/i915/execlists: Refactor out can_merge_rq()
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Feb 2019 23:51:08 +0000 (23:51 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 9 Feb 2019 00:31:41 +0000 (00:31 +0000)
commitc10c78ade57afe36fe290f79e466fcd5304e2f20
tree75e444f6fa2bf1fe20b92648b6d05205faba7cc4
parent21182b3c4cbbf57f11fd10ab8832f15767d906b2
drm/i915/execlists: Refactor out can_merge_rq()

In the next patch, we add another user that wants to check whether
requests can be merge into a single HW execution, and in the future we
want to add more conditions under which requests from the same context
cannot be merge. In preparation, extract out can_merge_rq().

v2: Reorder tests to decide if we can continue filling ELSP and bonus
comments.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190208235108.23127-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_lrc.c