drm/i915/uapi: expose GTT alignment
authorMatthew Auld <matthew.auld@intel.com>
Tue, 4 Oct 2022 11:49:15 +0000 (12:49 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Fri, 14 Oct 2022 17:08:07 +0000 (18:08 +0100)
commitd54576a074a29d4901d0a693cd84e1a89057f694
tree36d71aee6d9f3fc88e822751bca00eea30ea37d7
parent8133a6daad4e72748e239a02775a853ca7ed798b
drm/i915/uapi: expose GTT alignment

On some platforms we potentially have different alignment restrictions
depending on the memory type. We also now have different alignment
restrictions for the same region across different kernel versions.
Extend the region query to return the minimum required GTT alignment.

Testcase: igt@gem_create@create-ext-placement-alignment
Testcase: igt@i915_query@query-regions-sanity-check
Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Michal Mrozek <michal.mrozek@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Stuart Summers <stuart.summers@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Yang A Shi <yang.a.shi@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Cc: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221004114915.221708-2-matthew.auld@intel.com
drivers/gpu/drm/i915/i915_query.c
include/uapi/drm/i915_drm.h