ilo: remove intel_winsys_enable_reuse()

It should be an (winsys) implementation detail.
ilo: improve winsys documentation/comments

Document the interface, and add comments as to why some features are enabled
and why some checks are made.
ilo: fix DRM_API_HANDLE_TYPE_FD export

It can be exported by drm_intel_bo_gem_export_to_prime().  The code is already
in winsys, just not enabled.
ilo: add a wrapper to cast struct intel_bo

It is just drm_intel_bo, but having a wrapper makes the code cleaner.
ilo: rework winsys bo reloc functions

Rename

  intel_bo_emit_reloc() to intel_bo_add_reloc(),
  intel_bo_clear_relocs() to intel_bo_truncate_relocs(), and
  intel_bo_references() to intel_bo_has_reloc().

Besides, we need intel_bo_get_offset() only to get the presumed offset afer
adding a reloc entry.  Remove the function and make intel_bo_add_reloc()
return the presumed offset.  While at it, switch to gem_bo->offset64 from
gem_bo->offset.
ilo: remove intel_bo_get_virtual()

Make the map functions return the pointer directly.
ilo: remove intel_bo_get_size()

Commit bfa8d21759c5f2b5b0885c696842167bd4c64fee uses it to work around a
hardware limitation.  But there are other ways to do it without the need for
intel_bo_get_size().
ilo: replace bo alloc flags by initial domains

The only alloc flag is INTEL_ALLOC_FOR_RENDER, which can as well be expressed
by specifying the initial write domain.  The change makes it obvious that we
failed to set INTEL_ALLOC_FOR_RENDER in several places.
ilo: rework winsys batch buffer functions

Rename

  intel_winsys_check_aperture_size() to intel_winsys_can_submit_bo(),
  intel_bo_exec() to intel_winsys_submit_bo(), and
  intel_winsys_decode_commands() to intel_winsys_decode_bo().

Make a semantic change to ignore intel_context when the ring is not the render
ring.
ilo: PIPE_CAP_QUERY_TIMESTAMP may not be supported

Reading TIMESTAMP register may fail, depending on both kernel and hardware.
ilo: winsys may limit the batch buffer size

The maximum batch buffer size is determined at the time of
drm_intel_bufmgr_gem_init().  Make sure the pipe driver does not exceed the
limit.
ilo: move ring types to winsys

It results in less code despite that i915_drm.h specifies the ring type as
part of the execution flags.
ilo: set I915_EXEC_NO_RELOC when available

The winsys makes it clear that the pipe drivers should write presumed offsets.
We can always set I915_EXEC_NO_RELOC when the kernel supports it.
ilo: protect the decode context with a mutex

The decode context is not thread safe.
ilo: require hardware logical context support

The code paths are not tested for a while, and have some known issues.
ilo: print a warning when PPGTT is disabled

Despite what the PRMs say, the driver appears to work fine when PPGTT is
disabled.  But at least print a warning in that case.
ilo: set PIPE_CONTROL_GLOBAL_GTT_WRITE automatically

Set the flag automatically in gen6_emit_PIPE_CONTROL(), and set it only for
GEN6.
ilo: add some MI commands to GPE

We will need MI commands that load/store registers.
ilo: add ILO_3D_PIPELINE_WRITE_STATISTICS

The command writes statistics registers to the specified bo.
ilo: add support for PIPE_QUERY_PIPELINE_STATISTICS