drm/i915: Drop address size from ppgtt_type
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Mar 2019 22:38:37 +0000 (22:38 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 15 Mar 2019 09:04:54 +0000 (09:04 +0000)
With the introduction of the separate addressable bits into the device
info, we can remove the conflation of the ppgtt size from the ppgtt
type.

Based on a patch by Bob Paauwe.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Bob Paauwe <bob.j.paauwe@intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190314223839.28258-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_pci.c
drivers/gpu/drm/i915/intel_device_info.h
drivers/gpu/drm/i915/selftests/huge_pages.c

index df2a939eab5e2853f2293ade0a899699486c8470..707c3a0d1ed956543f270b168b747d2b90558265 100644 (file)
@@ -348,7 +348,7 @@ static int i915_getparam_ioctl(struct drm_device *dev, void *data,
                value = HAS_WT(dev_priv);
                break;
        case I915_PARAM_HAS_ALIASING_PPGTT:
-               value = min_t(int, INTEL_PPGTT(dev_priv), I915_GEM_PPGTT_FULL);
+               value = INTEL_PPGTT(dev_priv);
                break;
        case I915_PARAM_HAS_SEMAPHORES:
                value = !!(dev_priv->caps.scheduler & I915_SCHEDULER_CAP_SEMAPHORES);
index 4864a35ddacacdf584d318699740268d2538cfae..c65c2e6649df10ff650fd758df1e92fe9ad62df2 100644 (file)
@@ -2457,8 +2457,6 @@ static inline unsigned int i915_sg_segment_size(void)
        (INTEL_PPGTT(dev_priv) != INTEL_PPGTT_NONE)
 #define HAS_FULL_PPGTT(dev_priv) \
        (INTEL_PPGTT(dev_priv) >= INTEL_PPGTT_FULL)
-#define HAS_FULL_48BIT_PPGTT(dev_priv) \
-       (INTEL_PPGTT(dev_priv) >= INTEL_PPGTT_FULL_4LVL)
 
 #define HAS_PAGE_SIZES(dev_priv, sizes) ({ \
        GEM_BUG_ON((sizes) == 0); \
index a13ac0f3e528a2c830ec42bf064affd1dc6af97f..ef7410c492fd12f15eea4efbee9deece060fd18d 100644 (file)
@@ -498,7 +498,7 @@ static const struct intel_device_info intel_haswell_gt3_info = {
        .page_sizes = I915_GTT_PAGE_SIZE_4K | \
                      I915_GTT_PAGE_SIZE_2M, \
        .has_logical_ring_contexts = 1, \
-       .ppgtt_type = INTEL_PPGTT_FULL_4LVL, \
+       .ppgtt_type = INTEL_PPGTT_FULL, \
        .ppgtt_size = 48, \
        .has_64bit_reloc = 1, \
        .has_reset_engine = 1
@@ -621,7 +621,7 @@ static const struct intel_device_info intel_skylake_gt4_info = {
        .has_logical_ring_contexts = 1, \
        .has_logical_ring_preemption = 1, \
        .has_guc = 1, \
-       .ppgtt_type = INTEL_PPGTT_FULL_4LVL, \
+       .ppgtt_type = INTEL_PPGTT_FULL, \
        .ppgtt_size = 48, \
        .has_reset_engine = 1, \
        .has_snoop = true, \
index b57b34c96b3d4011e92216d6a294b4c4a95f3451..6234570a9b1796bf4dd93e1e361d204662d6fc3b 100644 (file)
@@ -80,7 +80,6 @@ enum intel_ppgtt_type {
        INTEL_PPGTT_NONE = I915_GEM_PPGTT_NONE,
        INTEL_PPGTT_ALIASING = I915_GEM_PPGTT_ALIASING,
        INTEL_PPGTT_FULL = I915_GEM_PPGTT_FULL,
-       INTEL_PPGTT_FULL_4LVL,
 };
 
 #define DEV_INFO_FOR_EACH_FLAG(func) \
index e8b3f417a122a4ebcac03a99442bdd9ab56cc51d..3ad7f041ae847aff1ac37bb17798a0a5269dae3b 100644 (file)
@@ -1709,7 +1709,7 @@ int i915_gem_huge_page_mock_selftests(void)
                return -ENOMEM;
 
        /* Pretend to be a device which supports the 48b PPGTT */
-       mkwrite_device_info(dev_priv)->ppgtt_type = INTEL_PPGTT_FULL_4LVL;
+       mkwrite_device_info(dev_priv)->ppgtt_type = INTEL_PPGTT_FULL;
        mkwrite_device_info(dev_priv)->ppgtt_size = 48;
 
        mutex_lock(&dev_priv->drm.struct_mutex);