From: Ville Syrjälä ville.syrjala@linux.intel.com
Fix a pile of regression on older machines which just oops the driver on load.
Cc: Dave Airlie airlied@redhat.com Cc: Jani Nikula jani.nikula@intel.com Cc: Maarten Lankhorst maarten.lankhorst@linux.intel.com Cc: Thomas Hellström thomas.hellstrom@linux.intel.com Cc: Chris Wilson chris@chris-wilson.co.uk Cc: Mika Kuoppala mika.kuoppala@linux.intel.com
Ville Syrjälä (4): drm/i915: Replace the unconditional clflush with drm_clflush_virt_range() drm/i915: Convert unconditional clflush to drm_clflush_virt_range() drm/i915: Catch yet another unconditioal clflush drm/i915: Fix oops on platforms w/o hpd support
drivers/gpu/drm/i915/display/intel_hotplug.c | 3 ++- drivers/gpu/drm/i915/gt/intel_ring_submission.c | 2 +- drivers/gpu/drm/i915/gt/intel_timeline.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-)
From: Ville Syrjälä ville.syrjala@linux.intel.com
Not all machines have clflush, so don't go assuming they do. Not really sure why the clflush is even here since hwsp is supposed to get snooped I thought.
Although in my case we're talking about a i830 machine where render/blitter snooping is definitely busted. But it might work for the hswp perhaps. Haven't really reverse engineered that one fully.
Cc: stable@vger.kernel.org Cc: Chris Wilson chris@chris-wilson.co.uk Cc: Mika Kuoppala mika.kuoppala@linux.intel.com Fixes: b436a5f8b6c8 ("drm/i915/gt: Track all timelines created using the HWSP") Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com --- drivers/gpu/drm/i915/gt/intel_ring_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c index 593524195707..586dca1731ce 100644 --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c @@ -292,7 +292,7 @@ static void xcs_sanitize(struct intel_engine_cs *engine) sanitize_hwsp(engine);
/* And scrub the dirty cachelines for the HWSP */ - clflush_cache_range(engine->status_page.addr, PAGE_SIZE); + drm_clflush_virt_range(engine->status_page.addr, PAGE_SIZE);
intel_engine_reset_pinned_contexts(engine); }
From: Ville Syrjälä ville.syrjala@linux.intel.com
This one is apparently a "clflush for good measure", so bit more justification (if you can call it that) than some of the others. Convert to drm_clflush_virt_range() again so that machines without clflush will survive the ordeal.
Cc: stable@vger.kernel.org Cc: Maarten Lankhorst maarten.lankhorst@linux.intel.com Cc: Thomas Hellström thomas.hellstrom@intel.com #v1 Fixes: 12ca695d2c1e ("drm/i915: Do not share hwsp across contexts any more, v8.") Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com --- drivers/gpu/drm/i915/gt/intel_timeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c index 1257f4f11e66..23d7328892ed 100644 --- a/drivers/gpu/drm/i915/gt/intel_timeline.c +++ b/drivers/gpu/drm/i915/gt/intel_timeline.c @@ -225,7 +225,7 @@ void intel_timeline_reset_seqno(const struct intel_timeline *tl)
memset(hwsp_seqno + 1, 0, TIMELINE_SEQNO_BYTES - sizeof(*hwsp_seqno)); WRITE_ONCE(*hwsp_seqno, tl->seqno); - clflush(hwsp_seqno); + drm_clflush_virt_range(hwsp_seqno, TIMELINE_SEQNO_BYTES); }
void intel_timeline_enter(struct intel_timeline *tl)
From: Ville Syrjälä ville.syrjala@linux.intel.com
Replace the unconditional clflush() with drm_clflush_virt_range() which does the wbinvd() fallback when clflush is not available.
This time no justification is given for the clflush in the offending commit.
Cc: stable@vger.kernel.org Cc: Maarten Lankhorst maarten.lankhorst@linux.intel.com Cc: Thomas Hellström thomas.hellstrom@linux.intel.com Fixes: 2c8ab3339e39 ("drm/i915: Pin timeline map after first timeline pin, v4.") Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com --- drivers/gpu/drm/i915/gt/intel_timeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c index 23d7328892ed..438bbc7b8147 100644 --- a/drivers/gpu/drm/i915/gt/intel_timeline.c +++ b/drivers/gpu/drm/i915/gt/intel_timeline.c @@ -64,7 +64,7 @@ intel_timeline_pin_map(struct intel_timeline *timeline)
timeline->hwsp_map = vaddr; timeline->hwsp_seqno = memset(vaddr + ofs, 0, TIMELINE_SEQNO_BYTES); - clflush(vaddr + ofs); + drm_clflush_virt_range(vaddr + ofs, TIMELINE_SEQNO_BYTES);
return 0; }
From: Ville Syrjälä ville.syrjala@linux.intel.com
We don't have hpd support on i8xx/i915 which means hotplug_funcs==NULL. Let's not oops when loading the driver on one those machines.
Cc: Dave Airlie airlied@redhat.com Cc: Jani Nikula jani.nikula@intel.com Fixes: cd030c7c11a4 ("drm/i915: constify hotplug function vtable.") Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com --- drivers/gpu/drm/i915/display/intel_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c index 3c1cec953b42..0e949a258a22 100644 --- a/drivers/gpu/drm/i915/display/intel_hotplug.c +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c @@ -215,7 +215,8 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)
static void intel_hpd_irq_setup(struct drm_i915_private *i915) { - if (i915->display_irqs_enabled && i915->hotplug_funcs->hpd_irq_setup) + if (i915->display_irqs_enabled && + i915->hotplug_funcs && i915->hotplug_funcs->hpd_irq_setup) i915->hotplug_funcs->hpd_irq_setup(i915); }
On Thu, 14 Oct 2021, Ville Syrjala ville.syrjala@linux.intel.com wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We don't have hpd support on i8xx/i915 which means hotplug_funcs==NULL. Let's not oops when loading the driver on one those machines.
D'oh!
Lemme guess, CI just casually dropped the machines from the results because they didn't boot?
Reviewed-by: Jani Nikula jani.nikula@intel.com
Cc: Dave Airlie airlied@redhat.com Cc: Jani Nikula jani.nikula@intel.com Fixes: cd030c7c11a4 ("drm/i915: constify hotplug function vtable.") Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c index 3c1cec953b42..0e949a258a22 100644 --- a/drivers/gpu/drm/i915/display/intel_hotplug.c +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c @@ -215,7 +215,8 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)
static void intel_hpd_irq_setup(struct drm_i915_private *i915) {
- if (i915->display_irqs_enabled && i915->hotplug_funcs->hpd_irq_setup)
- if (i915->display_irqs_enabled &&
i915->hotplug_funcs->hpd_irq_setup(i915);i915->hotplug_funcs && i915->hotplug_funcs->hpd_irq_setup)
}
On Thu, 14 Oct 2021, Jani Nikula jani.nikula@intel.com wrote:
On Thu, 14 Oct 2021, Ville Syrjala ville.syrjala@linux.intel.com wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We don't have hpd support on i8xx/i915 which means hotplug_funcs==NULL. Let's not oops when loading the driver on one those machines.
D'oh!
Lemme guess, CI just casually dropped the machines from the results because they didn't boot?
Reviewed-by: Jani Nikula jani.nikula@intel.com
Cc: Dave Airlie airlied@redhat.com Cc: Jani Nikula jani.nikula@intel.com Fixes: cd030c7c11a4 ("drm/i915: constify hotplug function vtable.") Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c index 3c1cec953b42..0e949a258a22 100644 --- a/drivers/gpu/drm/i915/display/intel_hotplug.c +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c @@ -215,7 +215,8 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)
static void intel_hpd_irq_setup(struct drm_i915_private *i915) {
- if (i915->display_irqs_enabled && i915->hotplug_funcs->hpd_irq_setup)
- if (i915->display_irqs_enabled &&
i915->hotplug_funcs && i915->hotplug_funcs->hpd_irq_setup)
Btw i915->hotplug_funcs->hpd_irq_setup is always set if i915->hotplug_funcs is set, so that bit is a bit redundant.
Anyway, r-b stands either way you decide to go.
i915->hotplug_funcs->hpd_irq_setup(i915);
}
On Thu, Oct 14, 2021 at 12:20:24PM +0300, Jani Nikula wrote:
On Thu, 14 Oct 2021, Jani Nikula jani.nikula@intel.com wrote:
On Thu, 14 Oct 2021, Ville Syrjala ville.syrjala@linux.intel.com wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We don't have hpd support on i8xx/i915 which means hotplug_funcs==NULL. Let's not oops when loading the driver on one those machines.
D'oh!
Lemme guess, CI just casually dropped the machines from the results because they didn't boot?
Reviewed-by: Jani Nikula jani.nikula@intel.com
Cc: Dave Airlie airlied@redhat.com Cc: Jani Nikula jani.nikula@intel.com Fixes: cd030c7c11a4 ("drm/i915: constify hotplug function vtable.") Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c index 3c1cec953b42..0e949a258a22 100644 --- a/drivers/gpu/drm/i915/display/intel_hotplug.c +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c @@ -215,7 +215,8 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)
static void intel_hpd_irq_setup(struct drm_i915_private *i915) {
- if (i915->display_irqs_enabled && i915->hotplug_funcs->hpd_irq_setup)
- if (i915->display_irqs_enabled &&
i915->hotplug_funcs && i915->hotplug_funcs->hpd_irq_setup)
Btw i915->hotplug_funcs->hpd_irq_setup is always set if i915->hotplug_funcs is set, so that bit is a bit redundant.
Right. I'll drop the drop the belt, leaving just the suspenders.
Anyway, r-b stands either way you decide to go.
i915->hotplug_funcs->hpd_irq_setup(i915);
}
-- Jani Nikula, Intel Open Source Graphics Center
On Thu, Oct 14, 2021 at 12:18:23PM +0300, Jani Nikula wrote:
On Thu, 14 Oct 2021, Ville Syrjala ville.syrjala@linux.intel.com wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We don't have hpd support on i8xx/i915 which means hotplug_funcs==NULL. Let's not oops when loading the driver on one those machines.
D'oh!
Lemme guess, CI just casually dropped the machines from the results because they didn't boot?
Dunno where the gdg has gone actually. Tomi?
Reviewed-by: Jani Nikula jani.nikula@intel.com
Cc: Dave Airlie airlied@redhat.com Cc: Jani Nikula jani.nikula@intel.com Fixes: cd030c7c11a4 ("drm/i915: constify hotplug function vtable.") Signed-off-by: Ville Syrjälä ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c index 3c1cec953b42..0e949a258a22 100644 --- a/drivers/gpu/drm/i915/display/intel_hotplug.c +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c @@ -215,7 +215,8 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)
static void intel_hpd_irq_setup(struct drm_i915_private *i915) {
- if (i915->display_irqs_enabled && i915->hotplug_funcs->hpd_irq_setup)
- if (i915->display_irqs_enabled &&
i915->hotplug_funcs->hpd_irq_setup(i915);i915->hotplug_funcs && i915->hotplug_funcs->hpd_irq_setup)
}
-- Jani Nikula, Intel Open Source Graphics Center
From: Ville Syrjälä ville.syrjala@linux.intel.com On Thu, Oct 14, 2021 at 12:18:23PM +0300, Jani Nikula wrote:
On Thu, 14 Oct 2021, Ville Syrjala ville.syrjala@linux.intel.com wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We don't have hpd support on i8xx/i915 which means
hotplug_funcs==NULL.
Let's not oops when loading the driver on one those machines.
D'oh!
Lemme guess, CI just casually dropped the machines from the results because they didn't boot?
Dunno where the gdg has gone actually. Tomi?
Both GDGs are dead to old age (PSU / power delivery).
Tomi
On Thu, Oct 14, 2021 at 09:31:40AM +0000, Sarvela, Tomi P wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com On Thu, Oct 14, 2021 at 12:18:23PM +0300, Jani Nikula wrote:
On Thu, 14 Oct 2021, Ville Syrjala ville.syrjala@linux.intel.com wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We don't have hpd support on i8xx/i915 which means
hotplug_funcs==NULL.
Let's not oops when loading the driver on one those machines.
D'oh!
Lemme guess, CI just casually dropped the machines from the results because they didn't boot?
Dunno where the gdg has gone actually. Tomi?
Both GDGs are dead to old age (PSU / power delivery).
We don't have spare PSUs to throw at them? Or are the boards also semi-dead due to rotted caps etc.?
From: Ville Syrjälä ville.syrjala@linux.intel.com On Thu, Oct 14, 2021 at 09:31:40AM +0000, Sarvela, Tomi P wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com On Thu, Oct 14, 2021 at 12:18:23PM +0300, Jani Nikula wrote:
On Thu, 14 Oct 2021, Ville Syrjala ville.syrjala@linux.intel.com wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
We don't have hpd support on i8xx/i915 which means
hotplug_funcs==NULL.
Let's not oops when loading the driver on one those machines.
D'oh!
Lemme guess, CI just casually dropped the machines from the results because they didn't boot?
Dunno where the gdg has gone actually. Tomi?
Both GDGs are dead to old age (PSU / power delivery).
We don't have spare PSUs to throw at them? Or are the boards also semi-dead due to rotted caps etc.?
It could be MB caps, PSU caps, or PSU anything else. Nothing comes on when power is turned on, no fans, no leds, nothing. Same issue on both hosts. No surprises there, they're identical models. It could be CPU, but IIRC I already tried changing that.
The PSU part is vendor-specific. Standard PSU maybe could be retrofitted, but that'd need some dedicated time.
Tomi
On Thu, 14 Oct 2021 at 19:09, Ville Syrjala ville.syrjala@linux.intel.com wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
Fix a pile of regression on older machines which just oops the driver on load.
For all 4:
Reviewed-by: Dave Airlie airlied@redhat.com
though it would be nice if the clflushes has more justifications on initial patch submission/review, maybe something for gt team to keep an eye for patches coming out from internal.
Dave.
On Mon, Oct 18, 2021 at 09:54:59AM +1000, Dave Airlie wrote:
On Thu, 14 Oct 2021 at 19:09, Ville Syrjala ville.syrjala@linux.intel.com wrote:
From: Ville Syrjälä ville.syrjala@linux.intel.com
Fix a pile of regression on older machines which just oops the driver on load.
For all 4:
Reviewed-by: Dave Airlie airlied@redhat.com
though it would be nice if the clflushes has more justifications on initial patch submission/review, maybe something for gt team to keep an eye for patches coming out from internal.
Thanks. clflush fixes pushed to drm-intel-gt-next. The hpd fix I pushed to drm-intel-next already earlier.
dri-devel@lists.freedesktop.org