* [Intel-gfx] [PATCH 1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it
@ 2020-04-14 0:08 José Roberto de Souza
2020-04-14 0:08 ` [Intel-gfx] [PATCH 2/2] Revert "rtc/cmos: Protect rtc_lock from interrupts" José Roberto de Souza
2020-04-14 22:33 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it Patchwork
0 siblings, 2 replies; 5+ messages in thread
From: José Roberto de Souza @ 2020-04-14 0:08 UTC (permalink / raw)
To: intel-gfx; +Cc: Lucas De Marchi
Right now dp.regs.dp_tp_ctl/status are only set during the encoder
pre_enable() hook, what is causing all reads and writes to those
registers to go to offset 0x0 before pre_enable() is executed.
So if i915 takes the BIOS state and don't do a modeset any following
link retraing will fail.
In the case that i915 needs to do a modeset, the DDI disable sequence
will write to a wrong register not disabling DP 'Transport Enable' in
DP_TP_CTL, making a HDMI modeset in the same port/transcoder to
not light up the monitor.
So here for GENs older than 12, that have those registers fixed at
port offset range it is loading at encoder/port init while for GEN12
it will keep setting it at encoder pre_enable() and during HW state
readout.
Fixes: 4444df6e205b ("drm/i915/tgl: move DP_TP_* to transcoder")
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
drivers/gpu/drm/i915/display/intel_ddi.c | 14 +++++++++++---
drivers/gpu/drm/i915/display/intel_dp.c | 5 ++---
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index be6c61bcbc9c..1aab93a94f40 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3252,9 +3252,6 @@ static void hsw_ddi_pre_enable_dp(struct intel_atomic_state *state,
intel_dp_set_link_params(intel_dp, crtc_state->port_clock,
crtc_state->lane_count, is_mst);
- intel_dp->regs.dp_tp_ctl = DP_TP_CTL(port);
- intel_dp->regs.dp_tp_status = DP_TP_STATUS(port);
-
intel_edp_panel_on(intel_dp);
intel_ddi_clk_select(encoder, crtc_state);
@@ -4061,12 +4058,18 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
enum transcoder cpu_transcoder = pipe_config->cpu_transcoder;
+ struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
u32 temp, flags = 0;
/* XXX: DSI transcoder paranoia */
if (drm_WARN_ON(&dev_priv->drm, transcoder_is_dsi(cpu_transcoder)))
return;
+ if (INTEL_GEN(dev_priv) >= 12) {
+ intel_dp->regs.dp_tp_ctl = TGL_DP_TP_CTL(cpu_transcoder);
+ intel_dp->regs.dp_tp_status = TGL_DP_TP_STATUS(cpu_transcoder);
+ }
+
intel_dsc_get_config(encoder, pipe_config);
temp = intel_de_read(dev_priv, TRANS_DDI_FUNC_CTL(cpu_transcoder));
@@ -4396,6 +4399,7 @@ static const struct drm_encoder_funcs intel_ddi_funcs = {
static struct intel_connector *
intel_ddi_init_dp_connector(struct intel_digital_port *intel_dig_port)
{
+ struct drm_i915_private *dev_priv = to_i915(intel_dig_port->base.base.dev);
struct intel_connector *connector;
enum port port = intel_dig_port->base.port;
@@ -4406,6 +4410,10 @@ intel_ddi_init_dp_connector(struct intel_digital_port *intel_dig_port)
intel_dig_port->dp.output_reg = DDI_BUF_CTL(port);
intel_dig_port->dp.prepare_link_retrain =
intel_ddi_prepare_link_retrain;
+ if (INTEL_GEN(dev_priv) < 12) {
+ intel_dig_port->dp.regs.dp_tp_ctl = DP_TP_CTL(port);
+ intel_dig_port->dp.regs.dp_tp_status = DP_TP_STATUS(port);
+ }
if (!intel_dp_init_connector(intel_dig_port, connector)) {
kfree(connector);
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index d4fcc9583869..03591ab76b0d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2671,9 +2671,6 @@ static void intel_dp_prepare(struct intel_encoder *encoder,
intel_crtc_has_type(pipe_config,
INTEL_OUTPUT_DP_MST));
- intel_dp->regs.dp_tp_ctl = DP_TP_CTL(port);
- intel_dp->regs.dp_tp_status = DP_TP_STATUS(port);
-
/*
* There are four kinds of DP registers:
*
@@ -8470,6 +8467,8 @@ bool intel_dp_init(struct drm_i915_private *dev_priv,
intel_dig_port->dp.output_reg = output_reg;
intel_dig_port->max_lanes = 4;
+ intel_dig_port->dp.regs.dp_tp_ctl = DP_TP_CTL(port);
+ intel_dig_port->dp.regs.dp_tp_status = DP_TP_STATUS(port);
intel_encoder->type = INTEL_OUTPUT_DP;
intel_encoder->power_domain = intel_port_to_power_domain(port);
--
2.26.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Intel-gfx] [PATCH 2/2] Revert "rtc/cmos: Protect rtc_lock from interrupts"
2020-04-14 0:08 [Intel-gfx] [PATCH 1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it José Roberto de Souza
@ 2020-04-14 0:08 ` José Roberto de Souza
2020-04-14 13:13 ` Rodrigo Vivi
2020-04-14 22:33 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it Patchwork
1 sibling, 1 reply; 5+ messages in thread
From: José Roberto de Souza @ 2020-04-14 0:08 UTC (permalink / raw)
To: intel-gfx
Fix build.
This reverts commit 5b39064d452ac9739d59c5183c8a7c90a5982acb.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
drivers/rtc/rtc-cmos.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index df5ff7e78a14..3718386a9f0e 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -652,9 +652,8 @@ static irqreturn_t cmos_interrupt(int irq, void *p)
unsigned long flags;
u8 irqstat;
u8 rtc_control;
- unsigned long flags;
- spin_lock_irqsave(&rtc_lock, flags);
+ spin_lock(&rtc_lock);
/* When the HPET interrupt handler calls us, the interrupt
* status is passed as arg1 instead of the irq number. But
@@ -688,7 +687,7 @@ static irqreturn_t cmos_interrupt(int irq, void *p)
hpet_mask_rtc_irq_bit(RTC_AIE);
CMOS_READ(RTC_INTR_FLAGS);
}
- spin_unlock_irqrestore(&rtc_lock, flags);
+ spin_unlock(&rtc_lock);
if (is_intr(irqstat)) {
rtc_update_irq(p, 1, irqstat);
--
2.26.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Intel-gfx] [PATCH 2/2] Revert "rtc/cmos: Protect rtc_lock from interrupts"
2020-04-14 0:08 ` [Intel-gfx] [PATCH 2/2] Revert "rtc/cmos: Protect rtc_lock from interrupts" José Roberto de Souza
@ 2020-04-14 13:13 ` Rodrigo Vivi
0 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Vivi @ 2020-04-14 13:13 UTC (permalink / raw)
To: José Roberto de Souza; +Cc: intel-gfx
On Mon, Apr 13, 2020 at 05:08:44PM -0700, José Roberto de Souza wrote:
> Fix build.
sorry, this was a silent merge conflict of topic/core-for-CI
when merging to create drm-tip.
I fixed last night with a drm-rerere/fixup. You shouldn't get
any build failure by now. Sorry for taking a long time to fix
this properly yesterday.
>
> This reverts commit 5b39064d452ac9739d59c5183c8a7c90a5982acb.
>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
> drivers/rtc/rtc-cmos.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
> index df5ff7e78a14..3718386a9f0e 100644
> --- a/drivers/rtc/rtc-cmos.c
> +++ b/drivers/rtc/rtc-cmos.c
> @@ -652,9 +652,8 @@ static irqreturn_t cmos_interrupt(int irq, void *p)
> unsigned long flags;
> u8 irqstat;
> u8 rtc_control;
> - unsigned long flags;
>
> - spin_lock_irqsave(&rtc_lock, flags);
> + spin_lock(&rtc_lock);
>
> /* When the HPET interrupt handler calls us, the interrupt
> * status is passed as arg1 instead of the irq number. But
> @@ -688,7 +687,7 @@ static irqreturn_t cmos_interrupt(int irq, void *p)
> hpet_mask_rtc_irq_bit(RTC_AIE);
> CMOS_READ(RTC_INTR_FLAGS);
> }
> - spin_unlock_irqrestore(&rtc_lock, flags);
> + spin_unlock(&rtc_lock);
>
> if (is_intr(irqstat)) {
> rtc_update_irq(p, 1, irqstat);
> --
> 2.26.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it
2020-04-14 0:08 [Intel-gfx] [PATCH 1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it José Roberto de Souza
2020-04-14 0:08 ` [Intel-gfx] [PATCH 2/2] Revert "rtc/cmos: Protect rtc_lock from interrupts" José Roberto de Souza
@ 2020-04-14 22:33 ` Patchwork
2020-04-14 23:03 ` Souza, Jose
1 sibling, 1 reply; 5+ messages in thread
From: Patchwork @ 2020-04-14 22:33 UTC (permalink / raw)
To: Souza, Jose; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it
URL : https://patchwork.freedesktop.org/series/75898/
State : failure
== Summary ==
Applying: drm/i915/display: Load DP_TP_CTL/STATUS offset before use it
Applying: Revert "rtc/cmos: Protect rtc_lock from interrupts"
error: sha1 information is lacking or useless (drivers/rtc/rtc-cmos.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Revert "rtc/cmos: Protect rtc_lock from interrupts"
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it
2020-04-14 22:33 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it Patchwork
@ 2020-04-14 23:03 ` Souza, Jose
0 siblings, 0 replies; 5+ messages in thread
From: Souza, Jose @ 2020-04-14 23:03 UTC (permalink / raw)
To: intel-gfx@lists.freedesktop.org
On Tue, 2020-04-14 at 22:33 +0000, Patchwork wrote:
> == Series Details ==
>
> Series: series starting with [1/2] drm/i915/display: Load
> DP_TP_CTL/STATUS offset before use it
> URL : https://patchwork.freedesktop.org/series/75898/
> State : failure
>
> == Summary ==
>
> Applying: drm/i915/display: Load DP_TP_CTL/STATUS offset before use
> it
> Applying: Revert "rtc/cmos: Protect rtc_lock from interrupts"
> error: sha1 information is lacking or useless (drivers/rtc/rtc-
> cmos.c).
> error: could not build fake ancestor
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> Patch failed at 0002 Revert "rtc/cmos: Protect rtc_lock from
> interrupts"
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --
> abort".
Resending without the build fix that was already applied.
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-14 23:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-14 0:08 [Intel-gfx] [PATCH 1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it José Roberto de Souza
2020-04-14 0:08 ` [Intel-gfx] [PATCH 2/2] Revert "rtc/cmos: Protect rtc_lock from interrupts" José Roberto de Souza
2020-04-14 13:13 ` Rodrigo Vivi
2020-04-14 22:33 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/2] drm/i915/display: Load DP_TP_CTL/STATUS offset before use it Patchwork
2020-04-14 23:03 ` Souza, Jose
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.