mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
drm/i915: hide VLV PUNIT IOSF sideband qos handling better
The sideband latency qos request is only used for VLV PUNIT access. Abstract it better, and also add the request for VLV only. Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/92632f64c1256bfafe7ebf49c1ad0618157d9484.1730193891.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
a72e1c1391
commit
ec70912110
|
|
@ -236,7 +236,6 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
|
|||
intel_sbi_init(dev_priv);
|
||||
vlv_iosf_sb_init(dev_priv);
|
||||
mutex_init(&dev_priv->sb_lock);
|
||||
cpu_latency_qos_add_request(&dev_priv->sb_qos, PM_QOS_DEFAULT_VALUE);
|
||||
|
||||
i915_memcpy_init_early(dev_priv);
|
||||
intel_runtime_pm_init_early(&dev_priv->runtime_pm);
|
||||
|
|
@ -294,7 +293,6 @@ static void i915_driver_late_release(struct drm_i915_private *dev_priv)
|
|||
vlv_suspend_cleanup(dev_priv);
|
||||
i915_workqueues_cleanup(dev_priv);
|
||||
|
||||
cpu_latency_qos_remove_request(&dev_priv->sb_qos);
|
||||
mutex_destroy(&dev_priv->sb_lock);
|
||||
vlv_iosf_sb_fini(dev_priv);
|
||||
intel_sbi_fini(dev_priv);
|
||||
|
|
|
|||
|
|
@ -242,11 +242,11 @@ struct drm_i915_private {
|
|||
/* VLV/CHV IOSF sideband */
|
||||
struct {
|
||||
struct mutex lock; /* protect sideband access */
|
||||
struct pm_qos_request qos;
|
||||
} vlv_iosf_sb;
|
||||
|
||||
/* Sideband mailbox protection */
|
||||
struct mutex sb_lock;
|
||||
struct pm_qos_request sb_qos;
|
||||
|
||||
/** Cached value of IMR to avoid reads in updating the bitfield */
|
||||
u32 irq_mask;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ static void __vlv_punit_get(struct drm_i915_private *i915)
|
|||
* to the Valleyview P-unit and not all sideband communications.
|
||||
*/
|
||||
if (IS_VALLEYVIEW(i915)) {
|
||||
cpu_latency_qos_update_request(&i915->sb_qos, 0);
|
||||
cpu_latency_qos_update_request(&i915->vlv_iosf_sb.qos, 0);
|
||||
on_each_cpu(ping, NULL, 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ static void __vlv_punit_get(struct drm_i915_private *i915)
|
|||
static void __vlv_punit_put(struct drm_i915_private *i915)
|
||||
{
|
||||
if (IS_VALLEYVIEW(i915))
|
||||
cpu_latency_qos_update_request(&i915->sb_qos,
|
||||
cpu_latency_qos_update_request(&i915->vlv_iosf_sb.qos,
|
||||
PM_QOS_DEFAULT_VALUE);
|
||||
|
||||
iosf_mbi_punit_release();
|
||||
|
|
@ -254,10 +254,16 @@ void vlv_iosf_sb_init(struct drm_i915_private *i915)
|
|||
{
|
||||
if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915))
|
||||
mutex_init(&i915->vlv_iosf_sb.lock);
|
||||
|
||||
if (IS_VALLEYVIEW(i915))
|
||||
cpu_latency_qos_add_request(&i915->vlv_iosf_sb.qos, PM_QOS_DEFAULT_VALUE);
|
||||
}
|
||||
|
||||
void vlv_iosf_sb_fini(struct drm_i915_private *i915)
|
||||
{
|
||||
if (IS_VALLEYVIEW(i915))
|
||||
cpu_latency_qos_remove_request(&i915->vlv_iosf_sb.qos);
|
||||
|
||||
if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915))
|
||||
mutex_destroy(&i915->vlv_iosf_sb.lock);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user