Skip to content

Commit 4948738

Browse files
surajk8uma-intel
authored andcommitted
drm/i915/hotplug: Reduce SHPD_FILTER to 250us
On TGP, the RTC (always running) was reduced from 3MHz to 32KHz. As a result of this change, when HPD active going low pulse or HPD IRQ is presented and the refclk (19.2MHz) is not toggling already toggling, there is a 60 to 90us synchronization delay which effectively reduces the duration of the IRQ pulse to less than the programmed 500us filter value and the hot plug interrupt is NOT registered. Solution was to Reduce SHPD_FILTER to 250us for ADL and above. This solution was derived when the below patch was floated. [1]https://patchwork.freedesktop.org/patch/532187 and after some internal discussion Ville's suggestion made sense. Bspec: 68970 Cc: Uma Shankar <[email protected]> Cc: Ville Syrjala <[email protected]> Suggested-by: Ville Syrjala <[email protected]> Signed-off-by: Suraj Kandpal <[email protected]> Reviewed-by: Uma Shankar <[email protected]> Signed-off-by: Uma Shankar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent b364f3c commit 4948738

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/gpu/drm/i915/display/intel_hotplug_irq.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,8 @@ static void icp_hpd_irq_setup(struct drm_i915_private *dev_priv)
842842

843843
if (INTEL_PCH_TYPE(dev_priv) <= PCH_TGP)
844844
intel_uncore_write(&dev_priv->uncore, SHPD_FILTER_CNT, SHPD_FILTER_CNT_500_ADJ);
845+
else
846+
intel_uncore_write(&dev_priv->uncore, SHPD_FILTER_CNT, SHPD_FILTER_CNT_250);
845847

846848
ibx_display_interrupt_update(dev_priv, hotplug_irqs, enabled_irqs);
847849

@@ -1049,7 +1051,7 @@ static void mtp_hpd_irq_setup(struct drm_i915_private *i915)
10491051
enabled_irqs = intel_hpd_enabled_irqs(i915, i915->display.hotplug.pch_hpd);
10501052
hotplug_irqs = intel_hpd_hotplug_irqs(i915, i915->display.hotplug.pch_hpd);
10511053

1052-
intel_de_write(i915, SHPD_FILTER_CNT, SHPD_FILTER_CNT_500_ADJ);
1054+
intel_de_write(i915, SHPD_FILTER_CNT, SHPD_FILTER_CNT_250);
10531055

10541056
mtp_hpd_invert(i915);
10551057
ibx_display_interrupt_update(i915, hotplug_irqs, enabled_irqs);

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4917,6 +4917,7 @@
49174917

49184918
#define SHPD_FILTER_CNT _MMIO(0xc4038)
49194919
#define SHPD_FILTER_CNT_500_ADJ 0x001D9
4920+
#define SHPD_FILTER_CNT_250 0x000F8
49204921

49214922
#define _PCH_DPLL_A 0xc6014
49224923
#define _PCH_DPLL_B 0xc6018

0 commit comments

Comments
 (0)