[Intel-gfx] [RFC 3/7] drm/i915: Move all runtime modified device info fields into runtime info
Chris Wilson
chris at chris-wilson.co.uk
Tue Nov 13 09:42:00 UTC 2018
Quoting Tvrtko Ursulin (2018-11-13 09:13:47)
>
> On 12/11/2018 17:24, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2018-11-12 17:12:38)
> >> struct intel_device_info {
> >> - u16 device_id;
> >> u16 gen_mask;
> >>
> >> - u8 gen;
> >> + u8 __gen;
> >> u8 gt; /* GT number, 0 if undefined */
> >> - intel_ring_mask_t ring_mask; /* Rings supported by the HW */
> >> - u8 num_pipes;
> >> + intel_ring_mask_t __ring_mask; /* Rings supported by the HW */
> >> + u8 __num_pipes;
> >>
> >> enum intel_platform platform;
> >> u32 platform_mask;
> >>
> >> - enum intel_ppgtt ppgtt;
> >> - unsigned int page_sizes; /* page sizes supported by the HW */
> >> + enum intel_ppgtt __ppgtt;
> >
> > ppgtt mode is static.
>
> What about:
>
> @@ -868,7 +867,7 @@ void intel_device_info_runtime_init(struct
> drm_i915_private *dev_priv)
>
> if (IS_GEN6(dev_priv) && intel_vtd_active()) {
> DRM_INFO("Disabling ppGTT for VT-d support\n");
> - info->ppgtt = INTEL_PPGTT_NONE;
> + runtime_info->ppgtt = INTEL_PPGTT_NONE;
Cunning, you see I grepped the patch for the wrong thing (thinking it
was just the markup). We could make it static, but that would devalue the
information stored by ppgtt.
The alternative plan:
- move the disabling ppgtt into aliasing setup
- tag the PD offsets in the error state with [none, aliasing, full]
Advantage: we don't need to worry about runtime_info.pggtt
Disadvantage: extra code to generate equiv of runtime_info.ppgtt for
debugging.
> }
>
> /* Initialize command stream timestamp frequency */
>
> And:
>
> @@ -1711,7 +1711,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 = INTEL_PPGTT_FULL_4LVL;
> + dev_priv->runtime_info.ppgtt = INTEL_PPGTT_FULL_4LVL;
That can be made static, but drops out later anyway. And when we have
separate ppgtt mode and size, I think it should be static (certainly we
are unlikely to change the ppgtt_size at runtime).
-Chris
More information about the Intel-gfx
mailing list