tree:   git://anongit.freedesktop.org/drm-intel drm-intel-next-queued
head:   1fe699e30113ed6f6e853ff44710d256072ea627
commit: 1fe699e30113ed6f6e853ff44710d256072ea627 [1/1] drm/i915/pmu: Fix sleep 
under atomic in RC6 readout
config: i386-randconfig-x019-201805 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 1fe699e30113ed6f6e853ff44710d256072ea627
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/i915/i915_pmu.c: In function 'get_rc6':
>> drivers/gpu//drm/i915/i915_pmu.c:473:18: error: 'struct dev_pm_info' has no 
>> member named 'suspended_jiffies'
          kdev->power.suspended_jiffies;
                     ^
   drivers/gpu//drm/i915/i915_pmu.c:475:20: error: 'struct dev_pm_info' has no 
member named 'suspended_jiffies'
      val = kdev->power.suspended_jiffies -
                       ^
>> drivers/gpu//drm/i915/i915_pmu.c:477:31: error: 'struct dev_pm_info' has no 
>> member named 'accounting_timestamp'
      val += jiffies - kdev->power.accounting_timestamp;
                                  ^

vim +473 drivers/gpu//drm/i915/i915_pmu.c

   417  
   418  static u64 get_rc6(struct drm_i915_private *i915, bool locked)
   419  {
   420          unsigned long flags;
   421          u64 val;
   422  
   423          if (intel_runtime_pm_get_if_in_use(i915)) {
   424                  val = intel_rc6_residency_ns(i915, IS_VALLEYVIEW(i915) ?
   425                                                     VLV_GT_RENDER_RC6 :
   426                                                     GEN6_GT_GFX_RC6);
   427  
   428                  if (HAS_RC6p(i915))
   429                          val += intel_rc6_residency_ns(i915, 
GEN6_GT_GFX_RC6p);
   430  
   431                  if (HAS_RC6pp(i915))
   432                          val += intel_rc6_residency_ns(i915, 
GEN6_GT_GFX_RC6pp);
   433  
   434                  intel_runtime_pm_put(i915);
   435  
   436                  /*
   437                   * If we are coming back from being runtime suspended 
we must
   438                   * be careful not to report a larger value than returned
   439                   * previously.
   440                   */
   441  
   442                  if (!locked)
   443                          spin_lock_irqsave(&i915->pmu.lock, flags);
   444  
   445                  if (val >= 
i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur) {
   446                          
i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur = 0;
   447                          i915->pmu.sample[__I915_SAMPLE_RC6].cur = val;
   448                  } else {
   449                          val = 
i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur;
   450                  }
   451  
   452                  if (!locked)
   453                          spin_unlock_irqrestore(&i915->pmu.lock, flags);
   454          } else {
   455                  struct pci_dev *pdev = i915->drm.pdev;
   456                  struct device *kdev = &pdev->dev;
   457                  unsigned long flags2;
   458  
   459                  /*
   460                   * We are runtime suspended.
   461                   *
   462                   * Report the delta from when the device was suspended 
to now,
   463                   * on top of the last known real value, as the 
approximated RC6
   464                   * counter value.
   465                   */
   466                  if (!locked)
   467                          spin_lock_irqsave(&i915->pmu.lock, flags);
   468  
   469                  spin_lock_irqsave(&kdev->power.lock, flags2);
   470  
   471                  if (!i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur)
   472                          i915->pmu.suspended_jiffies_last =
 > 473                                                  
 > kdev->power.suspended_jiffies;
   474  
   475                  val = kdev->power.suspended_jiffies -
   476                        i915->pmu.suspended_jiffies_last;
 > 477                  val += jiffies - kdev->power.accounting_timestamp;
   478  
   479                  spin_unlock_irqrestore(&kdev->power.lock, flags2);
   480  
   481                  val = jiffies_to_nsecs(val);
   482                  val += i915->pmu.sample[__I915_SAMPLE_RC6].cur;
   483                  i915->pmu.sample[__I915_SAMPLE_RC6_ESTIMATED].cur = val;
   484  
   485                  if (!locked)
   486                          spin_unlock_irqrestore(&i915->pmu.lock, flags);
   487          }
   488  
   489          return val;
   490  }
   491  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to