Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'drm-intel-fixes-2018-03-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes

- 1 display fix for bxt
- 1 gem fix for fences
- 1 gem/pm fix for rps freq

* tag 'drm-intel-fixes-2018-03-14' of git://anongit.freedesktop.org/drm/drm-intel:
drm/i915: Kick the rps worker when changing the boost frequency
drm/i915: Only prune fences after wait-for-all
drm/i915: Enable VBT based BL control for DP

+23 -13
+12 -4
drivers/gpu/drm/i915/i915_gem.c
··· 434 434 dma_fence_put(shared[i]); 435 435 kfree(shared); 436 436 437 + /* 438 + * If both shared fences and an exclusive fence exist, 439 + * then by construction the shared fences must be later 440 + * than the exclusive fence. If we successfully wait for 441 + * all the shared fences, we know that the exclusive fence 442 + * must all be signaled. If all the shared fences are 443 + * signaled, we can prune the array and recover the 444 + * floating references on the fences/requests. 445 + */ 437 446 prune_fences = count && timeout >= 0; 438 447 } else { 439 448 excl = reservation_object_get_excl_rcu(resv); 440 449 } 441 450 442 - if (excl && timeout >= 0) { 451 + if (excl && timeout >= 0) 443 452 timeout = i915_gem_object_wait_fence(excl, flags, timeout, 444 453 rps_client); 445 - prune_fences = timeout >= 0; 446 - } 447 454 448 455 dma_fence_put(excl); 449 456 450 - /* Oportunistically prune the fences iff we know they have *all* been 457 + /* 458 + * Opportunistically prune the fences iff we know they have *all* been 451 459 * signaled and that the reservation object has not been changed (i.e. 452 460 * no new fences have been added). 453 461 */
+8 -2
drivers/gpu/drm/i915/i915_sysfs.c
··· 304 304 { 305 305 struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev); 306 306 struct intel_rps *rps = &dev_priv->gt_pm.rps; 307 - u32 val; 307 + bool boost = false; 308 308 ssize_t ret; 309 + u32 val; 309 310 310 311 ret = kstrtou32(buf, 0, &val); 311 312 if (ret) ··· 318 317 return -EINVAL; 319 318 320 319 mutex_lock(&dev_priv->pcu_lock); 321 - rps->boost_freq = val; 320 + if (val != rps->boost_freq) { 321 + rps->boost_freq = val; 322 + boost = atomic_read(&rps->num_waiters); 323 + } 322 324 mutex_unlock(&dev_priv->pcu_lock); 325 + if (boost) 326 + schedule_work(&rps->work); 323 327 324 328 return count; 325 329 }
+3 -7
drivers/gpu/drm/i915/intel_dp.c
··· 620 620 bxt_power_sequencer_idx(struct intel_dp *intel_dp) 621 621 { 622 622 struct drm_i915_private *dev_priv = to_i915(intel_dp_to_dev(intel_dp)); 623 + int backlight_controller = dev_priv->vbt.backlight.controller; 623 624 624 625 lockdep_assert_held(&dev_priv->pps_mutex); 625 626 626 627 /* We should never land here with regular DP ports */ 627 628 WARN_ON(!intel_dp_is_edp(intel_dp)); 628 629 629 - /* 630 - * TODO: BXT has 2 PPS instances. The correct port->PPS instance 631 - * mapping needs to be retrieved from VBT, for now just hard-code to 632 - * use instance #0 always. 633 - */ 634 630 if (!intel_dp->pps_reset) 635 - return 0; 631 + return backlight_controller; 636 632 637 633 intel_dp->pps_reset = false; 638 634 ··· 638 642 */ 639 643 intel_dp_init_panel_power_sequencer_registers(intel_dp, false); 640 644 641 - return 0; 645 + return backlight_controller; 642 646 } 643 647 644 648 typedef bool (*vlv_pipe_check)(struct drm_i915_private *dev_priv,