drm/i915/guc: Use formalized struct definition for ads object
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 14 Mar 2017 13:33:09 +0000 (13:33 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Mar 2017 15:43:43 +0000 (15:43 +0000)
commit16f11f46964fda7c1f8ee0cd137689abea142365
tree04920fd2fb1b4f4ed0c4516e751fcaf0f796140b
parentb3420dde38d7458c5b0a37e909de6d2e015bfb67
drm/i915/guc: Use formalized struct definition for ads object

Manual pointer manipulation is error prone. Let compiler calculate
right offsets for us in case we need to change ads layout.

v2: don't call it object (Chris)
v3: restyle offset assignments (Chris)
v4: stylistic reductions

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Oscar Mateo <oscar.mateo@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170314133309.126432-1-michal.wajdeczko@intel.com
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_guc_submission.c
drivers/gpu/drm/i915/i915_utils.h