drm/i915 fixes for v4.15

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEFWWmW3ewYy4RJOWc05gHnSar7m8FAloWlc0ACgkQ05gHnSar
 7m8OaA//atcYylzdlV5pdfEcJxTu3WmT8yVE2Vmkza5ydPfi6wEes749gk0pei0l
 9vBQA69QOertGfjpKyrSx+01lXdpnn8QN3s5FDZhwOlp6QHX+ak+XF0oNhemQfoL
 yGp+00LYGpTdGRoILMlvisr4hOoeUuxQOyPj5bpdloGbB42qXcbz6Ee5duUXQkxM
 JTavc0vm6uxmuU8+kukDJpzD+2if1kyROMyFj4yvswTwf3qqX3qSx+4WTMTnmOHg
 tlsYzyifZKk7igg6dxh3ufuXdhkW7HNXWIKHbUwYBEw5o7UEuOnKGsaaV1czmV6M
 sJapvjsmPdu4YNqfT2ydMgM3Xd/kUi5OarRkLakVzErz1D2YDMUMXJmkRw5B0K6+
 ZXPUv6qZOjN988g5swnZyexwzCgI06iGjqM/mmxqfzJTSXKWvQrWFemSxqPoMJuB
 PGQ6OVLYwCMZ8zXOr80c8Nd/P/hvZyj6iLd+lWWHfmgo7BSYuDMX7IEAT5zjXWrA
 qVHI9Ddy7zpqmNGZQeLA0fjrciAtG33FTY3SwJwbhsCh+WF8uxp+ttfA4NcsTj/G
 QFazWuVxccp1Eu/KuIFBCso6ppfEYVMijnc3ghViySbxPjfrFK3TC5PHBpQPW2H3
 Td4rPYMDolmTwIOICJkHC5bUMl6bLdrP50kcxd0jId9LyEwmbWM=
 =xo4D
 -----END PGP SIGNATURE-----

Merge tag 'drm-intel-next-fixes-2017-11-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

drm/i915 fixes for v4.15

* tag 'drm-intel-next-fixes-2017-11-23' of git://anongit.freedesktop.org/drm/drm-intel:
  drm/i915: Fix init_clock_gating for resume
  drm/i915: Mark the userptr invalidate workqueue as WQ_MEM_RECLAIM
  drm/i915: Clear breadcrumb node when cancelling signaling
  drm/i915/gvt: ensure -ve return value is handled correctly
  drm/i915: Re-register PMIC bus access notifier on runtime resume
  drm/i915: Fix false-positive assert_rpm_wakelock_held in i915_pmic_bus_access_notifier v2
This commit is contained in:
Dave Airlie 2017-11-24 11:33:12 +10:00
commit 0576178f50
6 changed files with 23 additions and 3 deletions

View File

@ -1628,7 +1628,7 @@ static int perform_bb_shadow(struct parser_exec_state *s)
struct intel_shadow_bb_entry *entry_obj;
struct intel_vgpu *vgpu = s->vgpu;
unsigned long gma = 0;
uint32_t bb_size;
int bb_size;
void *dst = NULL;
int ret = 0;

View File

@ -1714,6 +1714,7 @@ static int i915_drm_resume(struct drm_device *dev)
intel_guc_resume(dev_priv);
intel_modeset_init_hw(dev);
intel_init_clock_gating(dev_priv);
spin_lock_irq(&dev_priv->irq_lock);
if (dev_priv->display.hpd_irq_setup)
@ -2618,6 +2619,8 @@ static int intel_runtime_resume(struct device *kdev)
ret = vlv_resume_prepare(dev_priv, true);
}
intel_uncore_runtime_resume(dev_priv);
/*
* No point of rolling back things in case of an error, as the best
* we can do is to hope that things will still work (and disable RPM).

View File

@ -172,7 +172,9 @@ i915_mmu_notifier_create(struct mm_struct *mm)
spin_lock_init(&mn->lock);
mn->mn.ops = &i915_gem_userptr_notifier;
mn->objects = RB_ROOT_CACHED;
mn->wq = alloc_workqueue("i915-userptr-release", WQ_UNBOUND, 0);
mn->wq = alloc_workqueue("i915-userptr-release",
WQ_UNBOUND | WQ_MEM_RECLAIM,
0);
if (mn->wq == NULL) {
kfree(mn);
return ERR_PTR(-ENOMEM);
@ -827,7 +829,7 @@ int i915_gem_init_userptr(struct drm_i915_private *dev_priv)
dev_priv->mm.userptr_wq =
alloc_workqueue("i915-userptr-acquire",
WQ_HIGHPRI | WQ_MEM_RECLAIM,
WQ_HIGHPRI | WQ_UNBOUND,
0);
if (!dev_priv->mm.userptr_wq)
return -ENOMEM;

View File

@ -517,6 +517,7 @@ static void __intel_engine_remove_wait(struct intel_engine_cs *engine,
GEM_BUG_ON(RB_EMPTY_NODE(&wait->node));
rb_erase(&wait->node, &b->waiters);
RB_CLEAR_NODE(&wait->node);
out:
GEM_BUG_ON(b->irq_wait == wait);

View File

@ -434,6 +434,12 @@ void intel_uncore_resume_early(struct drm_i915_private *dev_priv)
i915_check_and_clear_faults(dev_priv);
}
void intel_uncore_runtime_resume(struct drm_i915_private *dev_priv)
{
iosf_mbi_register_pmic_bus_access_notifier(
&dev_priv->uncore.pmic_bus_access_nb);
}
void intel_uncore_sanitize(struct drm_i915_private *dev_priv)
{
i915_modparams.enable_rc6 =
@ -1240,8 +1246,15 @@ static int i915_pmic_bus_access_notifier(struct notifier_block *nb,
* bus, which will be busy after this notification, leading to:
* "render: timed out waiting for forcewake ack request."
* errors.
*
* The notifier is unregistered during intel_runtime_suspend(),
* so it's ok to access the HW here without holding a RPM
* wake reference -> disable wakeref asserts for the time of
* the access.
*/
disable_rpm_wakeref_asserts(dev_priv);
intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
enable_rpm_wakeref_asserts(dev_priv);
break;
case MBI_PMIC_BUS_ACCESS_END:
intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);

View File

@ -134,6 +134,7 @@ bool intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv
void intel_uncore_fini(struct drm_i915_private *dev_priv);
void intel_uncore_suspend(struct drm_i915_private *dev_priv);
void intel_uncore_resume_early(struct drm_i915_private *dev_priv);
void intel_uncore_runtime_resume(struct drm_i915_private *dev_priv);
u64 intel_uncore_edram_size(struct drm_i915_private *dev_priv);
void assert_forcewakes_inactive(struct drm_i915_private *dev_priv);