diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2021-06-04 13:39:22 -0700 |
---|---|---|
committer | Matt Roper <matthew.d.roper@intel.com> | 2021-06-07 19:36:57 -0700 |
commit | afaa6eee9d959c7e9be27f8c838b9019456e7e9f (patch) | |
tree | e843ce03540c76e0834c81079fdeed369738d574 /lib/igt_gt.c | |
parent | adb9ee4ed7206725cfe3589bf49f47f9dcf661f2 (diff) |
lib/i915: Split 'gen' into graphics version and display version
Going forward, platforms may have separate architecture versions for
graphics and display and should no longer utilize a single 'gen'
version.
While doing this, let's change the versions to raw version values rather
than BIT(v) as we were doing in the past. It looks like some of the
existing uses of devinfo->gen were already misinterpreting this field
and failing to pass the value through ffs(), so this change may also fix
some bugs.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'lib/igt_gt.c')
-rw-r--r-- | lib/igt_gt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/igt_gt.c b/lib/igt_gt.c index f601d726..b1415178 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -552,18 +552,18 @@ bool gem_class_can_store_dword(int fd, int class) { uint16_t devid = intel_get_drm_devid(fd); const struct intel_device_info *info = intel_get_device_info(devid); - const int gen = ffs(info->gen); + const int ver = info->graphics_ver; - if (info->gen == 0) /* unknown, assume it just works */ + if (ver == 0) /* unknown, assume it just works */ return true; - if (gen <= 2) /* requires physical addresses */ + if (ver <= 2) /* requires physical addresses */ return false; - if (gen == 3 && (info->is_grantsdale || info->is_alviso)) + if (ver == 3 && (info->is_grantsdale || info->is_alviso)) return false; /* only supports physical addresses */ - if (gen == 6 && class == I915_ENGINE_CLASS_VIDEO) + if (ver == 6 && class == I915_ENGINE_CLASS_VIDEO) return false; /* broken, unbelievably broken */ if (info->is_broadwater) |