File tree Expand file tree Collapse file tree 3 files changed +23
-13
lines changed Expand file tree Collapse file tree 3 files changed +23
-13
lines changed Original file line number Diff line number Diff line change @@ -434,20 +434,28 @@ i915_gem_object_wait_reservation(struct reservation_object *resv,
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
*/
Original file line number Diff line number Diff line change @@ -304,8 +304,9 @@ static ssize_t gt_boost_freq_mhz_store(struct device *kdev,
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 )
@@ -317,8 +318,13 @@ static ssize_t gt_boost_freq_mhz_store(struct device *kdev,
317
318
return - EINVAL ;
318
319
319
320
mutex_lock (& dev_priv -> pcu_lock );
320
- rps -> boost_freq = val ;
321
+ if (val != rps -> boost_freq ) {
322
+ rps -> boost_freq = val ;
323
+ boost = atomic_read (& rps -> num_waiters );
324
+ }
321
325
mutex_unlock (& dev_priv -> pcu_lock );
326
+ if (boost )
327
+ schedule_work (& rps -> work );
322
328
323
329
return count ;
324
330
}
Original file line number Diff line number Diff line change @@ -620,19 +620,15 @@ static int
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
@@ -642,7 +638,7 @@ bxt_power_sequencer_idx(struct intel_dp *intel_dp)
642
638
*/
643
639
intel_dp_init_panel_power_sequencer_registers (intel_dp , false);
644
640
645
- return 0 ;
641
+ return backlight_controller ;
646
642
}
647
643
648
644
typedef bool (* vlv_pipe_check )(struct drm_i915_private * dev_priv ,
You can’t perform that action at this time.
0 commit comments