[Intel-gfx] [RFC 3/7] drm/i915: Move all runtime modified device info fields into runtime info

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Nov 13 09:13:47 UTC 2018


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;
         }

         /* 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;

         pdev = dev_priv->drm.pdev;
         dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(39));

?

Regards,

Tvrtko


More information about the Intel-gfx mailing list