* [PATCH v6 0/4] Fixes for HPD
[not found] <1466804762-14526-1-git-send-email-cpaul@redhat.com>
@ 2016-06-24 21:45 ` Lyude
[not found] ` <1466804762-14526-3-git-send-email-cpaul-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
[not found] ` <1466804762-14526-1-git-send-email-cpaul-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-24 21:46 ` [PATCH v6 2/4] drm/i915/vlv: Reset the ADPA in vlv_display_power_well_init() Lyude
2 siblings, 1 reply; 4+ messages in thread
From: Lyude @ 2016-06-24 21:45 UTC (permalink / raw)
To: xorg-driver-ati, amd-gfx
Cc: Nils Wallménius, David Airlie,
open list:INTEL DRM DRIVERS excluding Poulsbo, Moorestow...,
open list, open list:RADEON and AMDGPU DRM DRIVERS, Arindam Nath,
Alex Deucher, Daniel Vetter, Christian König
Latest version of:
https://lists.freedesktop.org/archives/intel-gfx/2016-June/098787.html
The only patch that's changed here is 4/4, the rest are just being sent so that
they can be in one thread to make things easier for reviewers
Lyude (4):
drm/i915/vlv: Make intel_crt_reset() per-encoder
drm/i915/vlv: Reset the ADPA in vlv_display_power_well_init()
drm/i915/vlv: Disable HPD in valleyview_crt_detect_hotplug()
drm/i915: Enable polling when we don't have hpd
drivers/gpu/drm/i915/i915_drv.c | 3 +
drivers/gpu/drm/i915/i915_drv.h | 5 ++
drivers/gpu/drm/i915/intel_crt.c | 28 ++++++--
drivers/gpu/drm/i915/intel_drv.h | 4 +-
drivers/gpu/drm/i915/intel_hotplug.c | 117 ++++++++++++++++++++++++++++----
drivers/gpu/drm/i915/intel_runtime_pm.c | 9 +++
6 files changed, 148 insertions(+), 18 deletions(-)
--
2.5.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v6 1/4] drm/i915/vlv: Make intel_crt_reset() per-encoder
[not found] ` <1466804762-14526-1-git-send-email-cpaul-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-06-24 21:45 ` Lyude
0 siblings, 0 replies; 4+ messages in thread
From: Lyude @ 2016-06-24 21:45 UTC (permalink / raw)
To: xorg-driver-ati-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: David Airlie,
open list:INTEL DRM DRIVERS excluding Poulsbo, Moorestow..., dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org open list:INTEL DRM DRIVERS excluding Poulsbo, Moorestow..., linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org open list,
Jani Nikula, stable-u79uwXL29TY76Z2rM5mHXA, Daniel Vetter,
Ville Syrjälä
This lets call intel_crt_reset() in contexts where IRQs are disabled and
as such, can't hold the locks required to work with the connectors.
Cc: stable@vger.kernel.org
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Lyude <cpaul@redhat.com>
---
drivers/gpu/drm/i915/intel_crt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index e115bcc..dfcd718 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -713,11 +713,11 @@ static int intel_crt_set_property(struct drm_connector *connector,
return 0;
}
-static void intel_crt_reset(struct drm_connector *connector)
+static void intel_crt_reset(struct drm_encoder *encoder)
{
- struct drm_device *dev = connector->dev;
+ struct drm_device *dev = encoder->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
- struct intel_crt *crt = intel_attached_crt(connector);
+ struct intel_crt *crt = intel_encoder_to_crt(to_intel_encoder(encoder));
if (INTEL_INFO(dev)->gen >= 5) {
u32 adpa;
@@ -739,7 +739,6 @@ static void intel_crt_reset(struct drm_connector *connector)
*/
static const struct drm_connector_funcs intel_crt_connector_funcs = {
- .reset = intel_crt_reset,
.dpms = drm_atomic_helper_connector_dpms,
.detect = intel_crt_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
@@ -757,6 +756,7 @@ static const struct drm_connector_helper_funcs intel_crt_connector_helper_funcs
};
static const struct drm_encoder_funcs intel_crt_enc_funcs = {
+ .reset = intel_crt_reset,
.destroy = intel_encoder_destroy,
};
@@ -901,5 +901,5 @@ void intel_crt_init(struct drm_device *dev)
dev_priv->fdi_rx_config = I915_READ(FDI_RX_CTL(PIPE_A)) & fdi_config;
}
- intel_crt_reset(connector);
+ intel_crt_reset(&crt->base.base);
}
--
2.5.5
_______________________________________________
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
https://lists.x.org/mailman/listinfo/xorg-driver-ati
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v6 2/4] drm/i915/vlv: Reset the ADPA in vlv_display_power_well_init()
[not found] <1466804762-14526-1-git-send-email-cpaul@redhat.com>
2016-06-24 21:45 ` [PATCH v6 0/4] Fixes for HPD Lyude
[not found] ` <1466804762-14526-1-git-send-email-cpaul-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-06-24 21:46 ` Lyude
2 siblings, 0 replies; 4+ messages in thread
From: Lyude @ 2016-06-24 21:46 UTC (permalink / raw)
To: xorg-driver-ati, amd-gfx
Cc: David Airlie,
open list:INTEL DRM DRIVERS excluding Poulsbo, Moorestow..., dri-devel@lists.freedesktop.org open list:INTEL DRM DRIVERS excluding Poulsbo, Moorestow..., linux-kernel@vger.kernel.org open list,
stable, Daniel Vetter
While VGA hotplugging worked(ish) before, it looks like that was mainly
because we'd unintentionally enable it in
valleyview_crt_detect_hotplug() when we did a force trigger. This
doesn't work reliably enough because whenever the display powerwell on
vlv gets disabled, the values set in VLV_ADPA get cleared and
consequently VGA hotplugging gets disabled. This causes bugs such as one
we found on an Intel NUC, where doing the following sequence of
hotplugs:
- Disconnect all monitors
- Connect VGA
- Disconnect VGA
- Connect HDMI
Would result in VGA hotplugging becoming disabled, due to the powerwells
getting toggled in the process of connecting HDMI.
Changes since v3:
- Expose intel_crt_reset() through intel_drv.h and call that in
vlv_display_power_well_init() instead of
encoder->base.funcs->reset(&encoder->base);
Changes since v2:
- Use intel_encoder structs instead of drm_encoder structs
Changes since v1:
- Instead of handling the register writes ourself, we just reuse
intel_crt_detect()
- Instead of resetting the ADPA during display IRQ installation, we now
reset them in vlv_display_power_well_init()
Cc: stable@vger.kernel.org
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Lyude <cpaul@redhat.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_crt.c | 2 +-
drivers/gpu/drm/i915/intel_drv.h | 2 +-
drivers/gpu/drm/i915/intel_runtime_pm.c | 7 +++++++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index dfcd718..220be7a 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -713,7 +713,7 @@ static int intel_crt_set_property(struct drm_connector *connector,
return 0;
}
-static void intel_crt_reset(struct drm_encoder *encoder)
+void intel_crt_reset(struct drm_encoder *encoder)
{
struct drm_device *dev = encoder->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 496c962..dcbfdde 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1075,7 +1075,7 @@ void gen8_irq_power_well_pre_disable(struct drm_i915_private *dev_priv,
/* intel_crt.c */
void intel_crt_init(struct drm_device *dev);
-
+void intel_crt_reset(struct drm_encoder *encoder);
/* intel_ddi.c */
void intel_ddi_clk_select(struct intel_encoder *encoder,
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index e856d49..f88ef76 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -1065,6 +1065,7 @@ static void vlv_init_display_clock_gating(struct drm_i915_private *dev_priv)
static void vlv_display_power_well_init(struct drm_i915_private *dev_priv)
{
+ struct intel_encoder *encoder;
enum pipe pipe;
/*
@@ -1100,6 +1101,12 @@ static void vlv_display_power_well_init(struct drm_i915_private *dev_priv)
intel_hpd_init(dev_priv);
+ /* Re-enable the ADPA, if we have one */
+ for_each_intel_encoder(dev_priv->dev, encoder) {
+ if (encoder->type == INTEL_OUTPUT_ANALOG)
+ intel_crt_reset(&encoder->base);
+ }
+
i915_redisable_vga_power_on(dev_priv->dev);
}
--
2.5.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Ignore these, sorry!
[not found] ` <1466804762-14526-3-git-send-email-cpaul-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-06-24 22:01 ` Lyude
0 siblings, 0 replies; 4+ messages in thread
From: Lyude @ 2016-06-24 22:01 UTC (permalink / raw)
To: xorg-driver-ati-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Nils Wallménius, David Airlie,
open list:INTEL DRM DRIVERS (excluding Poulsbo, Moorestow...),
open list, Jani Nikula, Arindam Nath, Daniel Vetter
Sorry about that; I accidentally did a git send-email with some older
patches leftover in my patch folder. Just ignore this thread
On Fri, 2016-06-24 at 17:45 -0400, Lyude wrote:
> Latest version of:
>
> https://lists.freedesktop.org/archives/intel-gfx/2016-June/098787.htm
> l
>
> The only patch that's changed here is 4/4, the rest are just being
> sent so that
> they can be in one thread to make things easier for reviewers
>
> Lyude (4):
> drm/i915/vlv: Make intel_crt_reset() per-encoder
> drm/i915/vlv: Reset the ADPA in vlv_display_power_well_init()
> drm/i915/vlv: Disable HPD in valleyview_crt_detect_hotplug()
> drm/i915: Enable polling when we don't have hpd
>
> drivers/gpu/drm/i915/i915_drv.c | 3 +
> drivers/gpu/drm/i915/i915_drv.h | 5 ++
> drivers/gpu/drm/i915/intel_crt.c | 28 ++++++--
> drivers/gpu/drm/i915/intel_drv.h | 4 +-
> drivers/gpu/drm/i915/intel_hotplug.c | 117
> ++++++++++++++++++++++++++++----
> drivers/gpu/drm/i915/intel_runtime_pm.c | 9 +++
> 6 files changed, 148 insertions(+), 18 deletions(-)
>
--
Cheers,
Lyude
_______________________________________________
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
https://lists.x.org/mailman/listinfo/xorg-driver-ati
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-24 22:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1466804762-14526-1-git-send-email-cpaul@redhat.com>
2016-06-24 21:45 ` [PATCH v6 0/4] Fixes for HPD Lyude
[not found] ` <1466804762-14526-3-git-send-email-cpaul-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-24 22:01 ` Ignore these, sorry! Lyude
[not found] ` <1466804762-14526-1-git-send-email-cpaul-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-24 21:45 ` [PATCH v6 1/4] drm/i915/vlv: Make intel_crt_reset() per-encoder Lyude
2016-06-24 21:46 ` [PATCH v6 2/4] drm/i915/vlv: Reset the ADPA in vlv_display_power_well_init() Lyude
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox