drm/i915: Add MIPI_IO WA
Subsystems (2)
PATCH 10/14 drm/i915: Add MIPI_IO WA
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++ 2 files changed, 12 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -8301,6 +8301,9 @@ enum {#define _BXT_MIPIC_PORT_CTRL 0x6B8C0#define BXT_MIPI_PORT_CTRL (tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL) +#define BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR _MMIO(0x138090) +#define MIPIO_RST_CTRL (1 << 2) +#define DPI_ENABLE (1 << 31)/* A + C */ #define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf << 27)
drivers/gpu/drm/i915/intel_dsi.c +9 -0
@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)DRM_DEBUG_KMS ("\n" ); +/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val |MIPIO_RST_CTRL ); +/* Enable MIPI PHY transparent latch */ for_each_dsi_port (port, intel_dsi->ports) { val =I915_READ (BXT_MIPI_PORT_CTRL (port));
@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,drm_panel_power_off (intel_dsi->panel);msleep (intel_dsi->panel_off_delay); + val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val & ~MIPIO_RST_CTRL ); +intel_disable_dsi_pll (encoder);/* Panel Disable over CRC PMIC */
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
This is definitely needed to pass igt test on bxt
'gem_exec_suspend --run-subtest basic-S3'
Quoted 39 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL 0x6B8C0 #define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL)
+#defineBXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR_MMIO(0
x138090)
+#define MIPIO_RST_CTRL (1 <<
2)
+
#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)
DRM_DEBUG_KMS("\n");
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder) · line 373
Quoted 5 lines
drivers/gpu/drm/i915/intel_dsi.c +5
-0+/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val |MIPIO_RST_CTRL ); +
Should we move this WA to intel_dsi_pre_enable() as the counterpart of this WA is defined intel_dsi_post_disable()?
Quoted 15 lines
/* Enable MIPI PHY transparent latch */
for_each_dsi_port(port, intel_dsi->ports){ val = I915_READ(BXT_MIPI_PORT_CTRL(port));drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(structintel_encoder *encoder, drm_panel_power_off(intel_dsi->panel); msleep(intel_dsi->panel_off_delay);drivers/gpu/drm/i915/intel_dsi.c +4
-0+ val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val & ~MIPIO_RST_CTRL ); +
intel_disable_dsi_pll(encoder);
/* Panel Disable over CRC PMIC */
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 17 lines · Mika Kahola
This is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 10 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)
Quoted 12 lines
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL 0x6B8C0 #define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL)Quoted 3 lines
+#defineBXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR_MMIO(0
x138090)
Observe that this register is already defined as BXT_P_CR_GT_DISP_PWRON, and already used in intel_dpio_phy.c. It seems to me changing the bits in this register should be hooked at the dpio level.
Imre?
Quoted 16 lines
Quoted 16 lines
+#define MIPIO_RST_CTRL (1 <<
2)
+
#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)
DRM_DEBUG_KMS("\n");
Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder) · line 373
Quoted 6 lines
drivers/gpu/drm/i915/intel_dsi.c +5
-0+/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val |MIPIO_RST_CTRL ); +Should we move this WA to
intel_dsi_pre_enable()as the counterpart of this WA is definedintel_dsi_post_disable()?
As I said, this should probably be managed in intel_dpio_phy.c.
And if not, this is BXT specific, and this hunk runs it on everything else too.
BR,
Jani.
Quoted 16 lines
Quoted 16 lines
/* Enable MIPI PHY transparent latch */
for_each_dsi_port(port, intel_dsi->ports){ val = I915_READ(BXT_MIPI_PORT_CTRL(port));drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(structintel_encoder *encoder, drm_panel_power_off(intel_dsi->panel); msleep(intel_dsi->panel_off_delay);drivers/gpu/drm/i915/intel_dsi.c +4
-0+ val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val & ~MIPIO_RST_CTRL ); +
intel_disable_dsi_pll(encoder);
/* Panel Disable over CRC PMIC */
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 20 lines · Jani Nikula
Quoted 19 lines · Mika Kahola
This is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 11 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)
Quoted 15 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +0
-1--- a/drivers/gpu/drm/i915/i915_reg.hQuoted 8 lines
Quoted 8 lines
+++
b/drivers/gpu/drm/i915/i915_reg.hdrivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL 0x6B8C0 #define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL)
+#defineBXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR_MMIO(0
x138090)Observe that this register is already defined as
BXT_P_CR_GT_DISP_PWRON, and already used inintel_dpio_phy.c. It seems to me changing the bits in this register should be hooked at the dpio level.
AFAIK this is an uncore register and not exactly part of DPIO. The DPIO phy bits are power requests that go to the P-Unit, so somewhat similar to power well enabling. The DSI usage seems orthogonal to the DPIO phys, so I don't think it makes a lot of sense to do it in intel_dpio_phy.c.
Ander
Quoted 41 lines
Imre?
Quoted 18 lines
Quoted 18 lines
+#define MIPIO_RST_CTRL (1 <<
2)
+
#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)
DRM_DEBUG_KMS("\n");Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder) · line 373
Quoted 6 lines
drivers/gpu/drm/i915/intel_dsi.c +5
-0+/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val |MIPIO_RST_CTRL ); +Should we move this WA to
intel_dsi_pre_enable()as the counterpart of this WA is definedintel_dsi_post_disable()?As I said, this should probably be managed in
intel_dpio_phy.c.And if not, this is BXT specific, and this hunk runs it on everything else too.
BR,
Jani.Quoted 3 lines
Quoted 3 lines
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
/* Enable MIPI PHY transparent latch */
for_each_dsi_port(port, intel_dsi->ports){ val = I915_READ(BXT_MIPI_PORT_CTRL(port));drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(structintel_encoder *encoder, drm_panel_power_off(intel_dsi->panel); msleep(intel_dsi->panel_off_delay);Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c +4
-0+ val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val & ~MIPIO_RST_CTRL ); +
intel_disable_dsi_pll(encoder);
/* Panel Disable over CRC PMIC */
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 35 lines · Jani Nikula
Quoted 17 lines · Mika Kahola
This is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 10 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)Quoted 12 lines
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL 0x6B8C0 #define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL)Quoted 3 lines
+#defineBXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR_MMIO(0
x138090)Observe that this register is already defined as
BXT_P_CR_GT_DISP_PWRON, and already used inintel_dpio_phy.c. It seems to me changing the bits in this register should be hooked at the dpio level.
Quoted 1 line
Imre?
At least the RMW access for this register would need locking against a concurrent access via the DDI encoder enable/disable code?
We should also make sure the IO is turned off during booting/resuming if DSI won't be used (and so the DSI disable hook won't be called), see the BSpec "Broxton Sequences to Initialize Display". We could do this by enabling/disabling the IO via the power well code which would solve the locking issue too. This would mean using POWER_DOMAIN_PORT_DSI, or adding a new power domain if diverging from the BSpec sequence is a problem (would be worth checking with HW people, since AFAICS we've been doing this so far).
Btw, what about the 0x160020, 0x160054 regs? According to BSpec we need to program these too in the same sequence.
--Imre
Quoted 35 lines
Quoted 16 lines
Quoted 16 lines
+#define MIPIO_RST_CTRL (1 <<
2)
+
#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)
DRM_DEBUG_KMS("\n");Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder) · line 373
Quoted 6 lines
drivers/gpu/drm/i915/intel_dsi.c +5
-0+/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val |MIPIO_RST_CTRL ); +Should we move this WA to
intel_dsi_pre_enable()as the counterpart of this WA is definedintel_dsi_post_disable()?As I said, this should probably be managed in
intel_dpio_phy.c.And if not, this is BXT specific, and this hunk runs it on everything else too.
BR,
Jani.Quoted 1 line
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
/* Enable MIPI PHY transparent latch */
for_each_dsi_port(port, intel_dsi->ports){ val = I915_READ(BXT_MIPI_PORT_CTRL(port));drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(structintel_encoder *encoder, drm_panel_power_off(intel_dsi->panel); msleep(intel_dsi->panel_off_delay);Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c +4
-0+ val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val & ~MIPIO_RST_CTRL ); +
intel_disable_dsi_pll(encoder);
/* Panel Disable over CRC PMIC */
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 36 lines · Imre Deak
Quoted 35 lines · Jani Nikula
Quoted 17 lines · Mika Kahola
This is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 10 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)Quoted 12 lines
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL 0x6B8C0 #define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL)Quoted 3 lines
+#defineBXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR_MMIO(0
x138090)Observe that this register is already defined as
BXT_P_CR_GT_DISP_PWRON, and already used inintel_dpio_phy.c. It seems to me changing the bits in this register should be hooked at the dpio level.
Quoted 4 lines
Quoted 1 line
Imre?
At least the RMW access for this register would need locking against a concurrent access via the DDI encoder enable/disable code?
Full modesets should be serialized by connection_mutex, or perhaps by some other thing with async modesets. Although I have a feeling that if we're doing async modeset commits without locks half the driveer is going to be on fire. Not sure what people are doing/have planned there.
Quoted 66 lines
We should also make sure the IO is turned off during booting/resuming if DSI won't be used (and so the DSI disable hook won't be called), see the BSpec "Broxton Sequences to Initialize Display". We could do this by enabling/disabling the IO via the power well code which would solve the locking issue too. This would mean using POWER_DOMAIN_PORT_DSI, or adding a new power domain if diverging from the BSpec sequence is a problem (would be worth checking with HW people, since AFAICS we've been doing this so far).
Btw, what about the 0x160020, 0x160054 regs? According to BSpec we need to program these too in the same sequence.
--Imre
Quoted 51 lines
Quoted 16 lines
Quoted 16 lines
+#define MIPIO_RST_CTRL (1 <<
2)
+
#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)
DRM_DEBUG_KMS("\n");Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder) · line 373
Quoted 6 lines
drivers/gpu/drm/i915/intel_dsi.c +5
-0+/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val |MIPIO_RST_CTRL ); +Should we move this WA to
intel_dsi_pre_enable()as the counterpart of this WA is definedintel_dsi_post_disable()?As I said, this should probably be managed in
intel_dpio_phy.c.And if not, this is BXT specific, and this hunk runs it on everything else too.
BR,
Jani.Quoted 16 lines
Quoted 16 lines
/* Enable MIPI PHY transparent latch */
for_each_dsi_port(port, intel_dsi->ports){ val = I915_READ(BXT_MIPI_PORT_CTRL(port));drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(structintel_encoder *encoder, drm_panel_power_off(intel_dsi->panel); msleep(intel_dsi->panel_off_delay);drivers/gpu/drm/i915/intel_dsi.c +4
-0+ val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val & ~MIPIO_RST_CTRL ); +
intel_disable_dsi_pll(encoder);
/* Panel Disable over CRC PMIC */
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 53 lines
-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Friday, January 13, 2017 9:02 PM
To: Deak, Imre <[email protected]>
Cc: Jani Nikula <[email protected]>; Kahola, Mika <[email protected]>; Srinivas, Vidya <[email protected]>; intel- [email protected]; Conselvan De Oliveira, Ander <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH 10/14] drm/i915: AddMIPI_IOWAQuoted 19 lines · Imre Deak
Quoted 18 lines · Jani Nikula
Quoted 17 lines · Mika Kahola
This is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 10 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 8301
Quoted 6 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex 71b978a..b9d7e98 100644drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL0x6B8C0Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 8305
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0#define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL) +#define BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR _MMIO(0Quoted 5 lines
Quoted 5 lines
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h enum { · line 8306
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0
-0x138090)Observe that this register is already defined as
BXT_P_CR_GT_DISP_PWRON, and already used inintel_dpio_phy.c. It seems to me changing the bits in this register should be hooked at thedpio level.
Quoted 3 lines
Quoted 2 lines
Imre?
Quoted 7 lines
Quoted 2 lines
At least the RMW access for this register would need locking against a concurrent access via the DDI encoder enable/disable code?
Full modesets should be serialized by
connection_mutex, or perhaps by some other thing with async modesets. Although I have a feeling that if we're doing async modeset commits without locks half the driveer is going to be on fire. Not sure what people are doing/have planned there.
I hope, with the current design, writing to this register from DSI path should be okay and we don't need to take any explicit locks. Is this understanding correct ?
Quoted 11 lines
Quoted 8 lines
We should also make sure the IO is turned off during booting/resuming if DSI won't be used (and so the DSI disable hook won't be called), see the BSpec "Broxton Sequences to Initialize Display". We could do this by enabling/disabling the IO via the power well code which would solve the locking issue too. This would mean using
POWER_DOMAIN_PORT_DSI, or adding a new power domain if divergingfrom
Quoted 2 lines
the BSpec sequence is a problem (would be worth checking with HW people, since AFAICS we've been doing this so far).
AFAIK, this will be taken care in BIOS itself if there is no DSI connected. If DSI is connected, this can be controlled in DSI disable/enable sequence.
Quoted 3 lines
Quoted 3 lines
Btw, what about the 0x160020, 0x160054 regs? According to BSpec we need to program these too in the same sequence.
Yes, this is needed. We have a patch for this. Will float the same for review. Thanks for the input.
Quoted 57 lines
Quoted 10 lines
--Imre
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define MIPIO_RST_CTRL (1 << 2) +#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder)
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c +2
-0DRM_DEBUG_KMS("\n"); +/* Add MIPI IO reset programming for modeset */ + val =
I915_READ(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR);Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct · line 372
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c +1
-0+I915_WRITE(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR,Quoted 23 lines
Quoted 23 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder) · line 373
Quoted 2 lines
drivers/gpu/drm/i915/intel_dsi.c +2
-0+ val | MIPIO_RST_CTRL); +Should we move this WA to
intel_dsi_pre_enable()as the counterpart of this WA is definedintel_dsi_post_disable()?As I said, this should probably be managed in
intel_dpio_phy.c.And if not, this is BXT specific, and this hunk runs it on everything else too.
BR,
Jani.Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/intel_dsi.c +0
-0/* Enable MIPI PHY transparent latch */ for_each_dsi_port(port, intel_dsi->ports) {val = I915_READ(BXT_MIPI_PORT_CTRL(port));
drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(structintel_encoder *encoder, drm_panel_power_off(intel_dsi->panel); msleep(intel_dsi->panel_off_delay);Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c static void intel_dsi_post_disable(struct · line 766
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c +1
-0+ val =
I915_READ(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR);Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c static void intel_dsi_post_disable(struct · line 767
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c +1
-0+I915_WRITE(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR,Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c +2
-0+ val & ~MIPIO_RST_CTRL); + intel_disable_dsi_pll(encoder);
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
/* Panel Disable over CRC PMIC */
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 72 lines · Vidya
Quoted 51 lines
-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Friday, January 13, 2017 9:02 PM
To: Deak, Imre <[email protected]>
Cc: Jani Nikula <[email protected]>; Kahola, Mika <[email protected]>; Srinivas, Vidya <[email protected]>; intel- [email protected]; Conselvan De Oliveira, Ander <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH 10/14] drm/i915: AddMIPI_IOWAQuoted 19 lines · Imre Deak
Quoted 18 lines · Jani Nikula
Quoted 17 lines · Mika Kahola
This is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 10 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 8301
Quoted 6 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex 71b978a..b9d7e98 100644drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL0x6B8C0Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 8305
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0#define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL) +#define BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR _MMIO(0Quoted 5 lines
Quoted 5 lines
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h enum { · line 8306
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0
-0x138090)Observe that this register is already defined as
BXT_P_CR_GT_DISP_PWRON, and already used inintel_dpio_phy.c. It seems to me changing the bits in this register should be hooked at thedpio level.
Quoted 3 lines
Quoted 2 lines
Imre?
Quoted 7 lines
Quoted 2 lines
At least the RMW access for this register would need locking against a concurrent access via the DDI encoder enable/disable code?
Full modesets should be serialized by
connection_mutex, or perhaps by some other thing with async modesets. Although I have a feeling that if we're doing async modeset commits without locks half the driveer is going to be on fire. Not sure what people are doing/have planned there.I hope, with the current design, writing to this register from DSI path should be okay and we don't need to take any explicit locks. Is this understanding correct ?
Quoted 11 lines
Quoted 8 lines
We should also make sure the IO is turned off during booting/resuming if DSI won't be used (and so the DSI disable hook won't be called), see the BSpec "Broxton Sequences to Initialize Display". We could do this by enabling/disabling the IO via the power well code which would solve the locking issue too. This would mean using
POWER_DOMAIN_PORT_DSI, or adding a new power domain if divergingfrom
Quoted 2 lines
the BSpec sequence is a problem (would be worth checking with HW people, since AFAICS we've been doing this so far).
Quoted 7 lines
AFAIK, this will be taken care in BIOS itself if there is no DSI connected. If DSI is connected, this can be controlled in DSI disable/enable sequence.
Quoted 3 lines
Quoted 3 lines
Btw, what about the 0x160020, 0x160054 regs? According to BSpec we need to program these too in the same sequence.
Yes, this is needed. We have a patch for this. Will float the same for review. Thanks for the input.
When you do, please reorder your patch series to have fixes in front.
BR,
Jani.
Quoted 63 lines
Quoted 63 lines
Quoted 10 lines
--Imre
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define MIPIO_RST_CTRL (1 << 2) +#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder)
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c +2
-0DRM_DEBUG_KMS("\n"); +/* Add MIPI IO reset programming for modeset */ + val =
I915_READ(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR);Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct · line 372
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c +1
-0+I915_WRITE(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR,Quoted 23 lines
Quoted 23 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder) · line 373
Quoted 2 lines
drivers/gpu/drm/i915/intel_dsi.c +2
-0+ val | MIPIO_RST_CTRL); +Should we move this WA to
intel_dsi_pre_enable()as the counterpart of this WA is definedintel_dsi_post_disable()?As I said, this should probably be managed in
intel_dpio_phy.c.And if not, this is BXT specific, and this hunk runs it on everything else too.
BR,
Jani.Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/intel_dsi.c +0
-0/* Enable MIPI PHY transparent latch */ for_each_dsi_port(port, intel_dsi->ports) {val = I915_READ(BXT_MIPI_PORT_CTRL(port));
drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(structintel_encoder *encoder, drm_panel_power_off(intel_dsi->panel); msleep(intel_dsi->panel_off_delay);Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c static void intel_dsi_post_disable(struct · line 766
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c +1
-0+ val =
I915_READ(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR);Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c static void intel_dsi_post_disable(struct · line 767
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c +1
-0+I915_WRITE(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR,Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_dsi.c +2
-0+ val & ~MIPIO_RST_CTRL); + intel_disable_dsi_pll(encoder);/* Panel Disable over CRC PMIC */
--
Ville Syrjälä
Intel OTC
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 93 lines
-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Wednesday, January 18, 2017 3:08 PM
To: Srinivas, Vidya <[email protected]>; Ville Syrjälä <[email protected]>; Deak, Imre <[email protected]>
Cc: Kahola, Mika <[email protected]>; [email protected]; Conselvan De Oliveira, Ander <[email protected]>; [email protected]
Subject: RE: [Intel-gfx] [PATCH 10/14] drm/i915: AddMIPI_IOWAQuoted 53 lines · Vidya
Quoted 53 lines
-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Friday, January 13, 2017 9:02 PM
To: Deak, Imre <[email protected]>
Cc: Jani Nikula <[email protected]>; Kahola, Mika <[email protected]>; Srinivas, Vidya <[email protected]>; intel- [email protected]; Conselvan De Oliveira, Ander <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH 10/14] drm/i915: AddMIPI_IOWAQuoted 19 lines · Imre Deak
Quoted 18 lines · Jani Nikula
Quoted 17 lines · Mika Kahola
This is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 10 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 8301
Quoted 7 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex 71b978a..b9d7e98 100644drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL0x6B8C0Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 8305
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0#define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL) +#define BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR _MMIO(0Quoted 6 lines
Quoted 6 lines
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h enum { · line 8306
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0
-0x138090)Observe that this register is already defined as
BXT_P_CR_GT_DISP_PWRON, and already used inintel_dpio_phy.c. It seems to me changing the bits in this register should be hooked at thedpio level.
Quoted 3 lines
Quoted 2 lines
Imre?
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
At least the RMW access for this register would need locking against a concurrent access via the DDI encoder enable/disable code?
Full modesets should be serialized by
connection_mutex, or perhaps by some other thing with async modesets. Although I have a feeling that if we're doing async modeset commits without locks half the driveer is going to be on fire. Not sure what people are doing/have plannedthere.
Quoted 11 lines
I hope, with the current design, writing to this register from DSI path should be okay and we don't need to take any explicit locks. Is this understanding correct ?
Quoted 8 lines
Quoted 8 lines
We should also make sure the IO is turned off during booting/resuming if DSI won't be used (and so the DSI disable hook won't be called), see the BSpec "Broxton Sequences to Initialize Display". We could do this by enabling/disabling the IO via the power well code which would solve the locking issue too. This would mean using
POWER_DOMAIN_PORT_DSI, or adding a new powerdomain if
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
diverging
from
Quoted 2 lines
the BSpec sequence is a problem (would be worth checking with HW people, since AFAICS we've been doing this so far).
AFAIK, this will be taken care in BIOS itself if there is no DSI connected. If DSI is connected, this can be controlled in DSI disable/enable sequence.
Quoted 1 line
Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Btw, what about the 0x160020, 0x160054 regs? According to BSpec we need to program these too in the same sequence.
Yes, this is needed. We have a patch for this. Will float the same for review. Thanks for the input.
When you do, please reorder your patch series to have fixes in front.
Yeah, we will re-send it separately and rebase other patches on top of it.
Quoted 66 lines
BR,
Jani.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
--Imre
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0+#define MIPIO_RST_CTRL (1 << 2) +#define DPI_ENABLE (1 <<
31)
Quoted 53 lines
Quoted 53 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct · line 371
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c +2
-0DRM_DEBUG_KMS("\n"); +/* Add MIPI IO reset programming for modeset */ + val =
I915_READ(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR);Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct · line 372
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c +1
-0+I915_WRITE(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR,Quoted 23 lines
Quoted 23 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct · line 374
Quoted 2 lines
drivers/gpu/drm/i915/intel_dsi.c +2
-0+ val | MIPIO_RST_CTRL); +Should we move this WA to
intel_dsi_pre_enable()as the counterpart of this WA is definedintel_dsi_post_disable()?As I said, this should probably be managed in
intel_dpio_phy.c.And if not, this is BXT specific, and this hunk runs it on everything else too.
BR,
Jani.Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/intel_dsi.c +0
-0/* Enable MIPI PHY transparent latch */ for_each_dsi_port(port, intel_dsi->ports) {val = I915_READ(BXT_MIPI_PORT_CTRL(port));
drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder, drm_panel_power_off(intel_dsi->panel); msleep(intel_dsi->panel_off_delay);Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c static void · line 766
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c +1
-0+ val =
I915_READ(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR);Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c static void · line 767
Quoted 1 line
drivers/gpu/drm/i915/intel_dsi.c +1
-0+I915_WRITE(BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR,Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_dsi.c +2
-0+ val & ~MIPIO_RST_CTRL); + intel_disable_dsi_pll(encoder);/* Panel Disable over CRC PMIC */
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
--
Ville Syrjälä
Intel OTC--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 53 lines · Vidya
Quoted 53 lines
-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Friday, January 13, 2017 9:02 PM
To: Deak, Imre <[email protected]>
Cc: Jani Nikula <[email protected]>; Kahola, Mika <[email protected]>; Srinivas, Vidya <[email protected]>; intel- [email protected]; Conselvan De Oliveira, Ander <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH 10/14] drm/i915: AddMIPI_IOWAQuoted 19 lines · Imre Deak
Quoted 18 lines · Jani Nikula
Quoted 17 lines · Mika Kahola
This is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 10 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 8301
Quoted 6 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex 71b978a..b9d7e98 100644drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL0x6B8C0Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 8305
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0#define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL) +#define BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR _MMIO(0Quoted 5 lines
Quoted 5 lines
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h enum { · line 8306
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0
-0x138090)Observe that this register is already defined as
BXT_P_CR_GT_DISP_PWRON, and already used inintel_dpio_phy.c. It seems to me changing the bits in this register should be hooked at thedpio level.
Quoted 3 lines
Quoted 2 lines
Imre?
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
At least the RMW access for this register would need locking against a concurrent access via the DDI encoder enable/disable code?
Full modesets should be serialized by
connection_mutex, or perhaps by some other thing with async modesets. Although I have a feeling that if we're doing async modeset commits without locks half the driveer is going to be on fire. Not sure what people are doing/have planned there.
Ok. I assume the async case will need a generic solution then.
Quoted 3 lines
I hope, with the current design, writing to this register from DSI path should be okay and we don't need to take any explicit locks. Is this understanding correct ?
Yes, based on the above the connection_mutex provides for the serialization. Just use the existing define as Jani said.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
We should also make sure the IO is turned off during booting/resuming if DSI won't be used (and so the DSI disable hook won't be called), see the BSpec "Broxton Sequences to Initialize Display". We could do this by enabling/disabling the IO via the power well code which would solve the locking issue too. This would mean using
POWER_DOMAIN_PORT_DSI, or adding a new power domain if diverging
Quoted 5 lines
Quoted 3 lines
from
Quoted 2 lines
the BSpec sequence is a problem (would be worth checking with HW people, since AFAICS we've been doing this so far).
AFAIK, this will be taken care in BIOS itself if there is no DSI connected. If DSI is connected, this can be controlled in DSI disable/enable sequence.
Yes ideally, but checking at least if this is really the case would make sense. But I'm ok with the current approach for now.
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Btw, what about the 0x160020, 0x160054 regs? According to BSpec we need to program these too in the same sequence.
Yes, this is needed. We have a patch for this. Will float the same for review. Thanks for the input.
Any reason for having separate patches?
--Imre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 106 lines
-----Original Message-----
From: Deak, Imre
Sent: Wednesday, January 18, 2017 3:46 PM
To: Srinivas, Vidya <[email protected]>
Cc: Ville Syrjälä <[email protected]>; Jani Nikula <[email protected]>; Kahola, Mika <[email protected]>; intel- [email protected]; Conselvan De Oliveira, Ander <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH 10/14] drm/i915: AddMIPI_IOWAQuoted 43 lines · Vidya
Quoted 43 lines
-----Original Message-----
From: Ville Syrjälä [mailto:[email protected]]
Sent: Friday, January 13, 2017 9:02 PM
To: Deak, Imre <[email protected]>
Cc: Jani Nikula <[email protected]>; Kahola, Mika <[email protected]>; Srinivas, Vidya <[email protected]>; intel- [email protected]; Conselvan De Oliveira, Ander <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH 10/14] drm/i915: AddMIPI_IOWAQuoted 19 lines · Imre Deak
Quoted 18 lines · Jani Nikula
Quoted 17 lines · Mika Kahola
This is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 10 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h enum { · line 8301
Quoted 7 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex 71b978a..b9d7e98 100644drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL0x6B8C0Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL)Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h enum { · line 8305
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +1
-0+#define BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR _MMIO(0Quoted 4 lines
Quoted 4 lines
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h enum { · line 8306
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0
-0x138090)Observe that this register is already defined as
BXT_P_CR_GT_DISP_PWRON, and already used inintel_dpio_phy.c.It
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines
seems to me changing the bits in this register should be hooked at the
dpio level.
Quoted 3 lines
Quoted 2 lines
Imre?
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
At least the RMW access for this register would need locking against a concurrent access via the DDI encoder enable/disable code?
Full modesets should be serialized by
connection_mutex, or perhaps by some other thing with async modesets. Although I have a feeling that if we're doing async modeset commits without locks half the driveer is going to be on fire. Not sure what people are doing/haveplanned there.
Ok. I assume the async case will need a generic solution then.
Quoted 3 lines
I hope, with the current design, writing to this register from DSI path should be okay and we don't need to take any explicit locks. Is this understanding correct ?
Yes, based on the above the
connection_mutexprovides for the serialization. Just use the existing define as Jani said.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
We should also make sure the IO is turned off during booting/resuming if DSI won't be used (and so the DSI disable hook won't be called), see the BSpec "Broxton Sequences to Initialize Display". We could do this by enabling/disabling the IO via the power well code which would solve the locking issue too. This would mean using
POWER_DOMAIN_PORT_DSI, or adding a newpower
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
domain if diverging
from
Quoted 2 lines
the BSpec sequence is a problem (would be worth checking with HW people, since AFAICS we've been doing this so far).
AFAIK, this will be taken care in BIOS itself if there is no DSI connected. If DSI is connected, this can be controlled in DSI disable/enable sequence.
Yes ideally, but checking at least if this is really the case would make sense. But I'm ok with the current approach for now.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
Btw, what about the 0x160020, 0x160054 regs? According to BSpec we need to program these too in the same sequence.
Yes, this is needed. We have a patch for this. Will float the same for review. Thanks for the input.
Any reason for having separate patches?
We can merge them together. Will re-send merging them together.
Quoted 2 lines
--Imre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: Add MIPI_IO WA and program DSI regulators
In reply to Imre DeakFrom: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec and
program the DSI regulators.
v2: Moved IO enable to pre-enable as per Mika's review comments. Also reused the existing register definition for BXT_P_CR_GT_DISP_PWRON.
v3: Added Programming the DSI regulators as per disable/enable sequences.
--- drivers/gpu/drm/i915/i915_reg.h | 7 +++++++ drivers/gpu/drm/i915/intel_dsi.c | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +7 -0
@@ -1553,6 +1553,7 @@ enum skl_disp_power_wells { _MMIO(_BXT_PHY_CH(phy, ch, reg_ch0, reg_ch1))#define BXT_P_CR_GT_DISP_PWRON _MMIO(0x138090) +#define MIPIO_RST_CTRL (1 << 2)#define _BXT_PHY_CTL_DDI_A 0x64C00#define _BXT_PHY_CTL_DDI_B 0x64C10
@@ -8301,6 +8302,12 @@ enum {#define _BXT_MIPIC_PORT_CTRL 0x6B8C0#define BXT_MIPI_PORT_CTRL (tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL) +#define BXT_P_DSI_REGULATOR_CFG _MMIO(0x160020) +#define STAP_SELECT (1 << 0) + +#define BXT_P_DSI_REGULATOR_TX_CTRL _MMIO(0x160054) +#define HS_IO_CTRL_SELECT (1 << 0) +#define DPI_ENABLE (1 << 31)/* A + C */ #define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf << 27)
drivers/gpu/drm/i915/intel_dsi.c +21 -0
@@ -548,6 +548,7 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct intel_dsi *intel_dsi =enc_to_intel_dsi (&encoder->base);enum port port; +u32 val;DRM_DEBUG_KMS ("\n" );
@@ -558,6 +559,11 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,intel_disable_dsi_pll (encoder);intel_enable_dsi_pll (encoder, pipe_config); +/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON , + val |MIPIO_RST_CTRL ); +intel_dsi_prepare (encoder, pipe_config);/* Panel Enable over CRC PMIC */
@@ -575,6 +581,12 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,I915_WRITE (DSPCLK_GATE_D , val); } +/* Power up DSI regulator */ +I915_WRITE (BXT_P_DSI_REGULATOR_CFG ,STAP_SELECT ); + val =I915_READ (BXT_P_DSI_REGULATOR_TX_CTRL ); + val &= ~HS_IO_CTRL_SELECT ; +I915_WRITE (BXT_P_DSI_REGULATOR_TX_CTRL , val); +/* put device in ready state */ intel_dsi_device_ready (encoder);
@@ -707,6 +719,7 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder, {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);struct intel_dsi *intel_dsi =enc_to_intel_dsi (&encoder->base); +u32 val;DRM_DEBUG_KMS ("\n" );
@@ -714,8 +727,16 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,intel_dsi_clear_device_ready (encoder); + val =I915_READ (BXT_P_CR_GT_DISP_PWRON ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON , + val & ~MIPIO_RST_CTRL ); +intel_disable_dsi_pll (encoder); +/* Power down DSI regulator to save power */ +I915_WRITE (BXT_P_DSI_REGULATOR_CFG ,STAP_SELECT ); +I915_WRITE (BXT_P_DSI_REGULATOR_TX_CTRL ,HS_IO_CTRL_SELECT ); +if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) {u32 val;
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH] drm/i915: Add MIPI_IO WA and program DSI regulators
Quoted 68 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec and
program the DSI regulators.v2: Moved IO enable to pre-enable as per Mika's review comments. Also reused the existing register definition for
BXT_P_CR_GT_DISP_PWRON.v3: Added Programming the DSI regulators as per disable/enable sequences.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 7 +++++++drivers/gpu/drm/i915/intel_dsi.c| 21 +++++++++++++++++++++2 files changed, 28 insertions(+)drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -1553,6 +1553,7 @@ enum skl_disp_power_wells { _MMIO(_BXT_PHY_CH(phy, ch, reg_ch0, reg_ch1))
#defineBXT_P_CR_GT_DISP_PWRON_MMIO(0x138090)
+#define MIPIO_RST_CTRL (1 << 2)
#define_BXT_PHY_CTL_DDI_A0x64C00
#define_BXT_PHY_CTL_DDI_B0x64C10drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8302,12 @@ enum { #define _BXT_MIPIC_PORT_CTRL 0x6B8C0 #define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL)
+#defineBXT_P_DSI_REGULATOR_CFG_MMIO(0x16002
0)drivers/gpu/drm/i915/i915_reg.h +5
-0+#define STAP_SELECT (1 << 0) + +#define BXT_P_DSI_REGULATOR_TX_CTRL _MMIO(0x160054) +#define HS_IO_CTRL_SELECT (1 << 0) +#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -548,6 +548,7 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,struct
drm_i915_private*dev_priv= to_i915(encoder-Quoted 1 line
base.dev);
struct
intel_dsi*intel_dsi= enc_to_intel_dsi(&encoder-Quoted 1 line
base);
enum port port;
drivers/gpu/drm/i915/intel_dsi.c +1
-0+u32 val;
DRM_DEBUG_KMS("\n");drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -558,6 +559,11 @@ static void intel_dsi_pre_enable(structintel_encoder *encoder, intel_disable_dsi_pll(encoder); intel_enable_dsi_pll(encoder, pipe_config);
drivers/gpu/drm/i915/intel_dsi.c static void intel_dsi_pre_enable(struct intel_encoder *encoder, · line 566
Quoted 5 lines
drivers/gpu/drm/i915/intel_dsi.c +5
-0+/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON , + val |MIPIO_RST_CTRL ); +
Looking good but overall we still need to address Jani's comment to limit these changes only to Broxton platform.
Quoted 45 lines
intel_dsi_prepare(encoder, pipe_config);
/* Panel Enable over CRC PMIC */drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -575,6 +581,12 @@ static void intel_dsi_pre_enable(structintel_encoder *encoder, I915_WRITE(DSPCLK_GATE_D, val); }drivers/gpu/drm/i915/intel_dsi.c +6
-0+/* Power up DSI regulator */ +I915_WRITE (BXT_P_DSI_REGULATOR_CFG ,STAP_SELECT ); + val =I915_READ (BXT_P_DSI_REGULATOR_TX_CTRL ); + val &= ~HS_IO_CTRL_SELECT ; +I915_WRITE (BXT_P_DSI_REGULATOR_TX_CTRL , val); + /* put device in ready state */
intel_dsi_device_ready(encoder);drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -707,6 +719,7 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder, {struct
drm_i915_private*dev_priv= to_i915(encoder-Quoted 1 line
base.dev);
struct
intel_dsi*intel_dsi= enc_to_intel_dsi(&encoder-Quoted 1 line
base);
drivers/gpu/drm/i915/intel_dsi.c +1
-0+u32 val;
DRM_DEBUG_KMS("\n");drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -714,8 +727,16 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,
intel_dsi_clear_device_ready(encoder);drivers/gpu/drm/i915/intel_dsi.c +4
-0+ val =I915_READ (BXT_P_CR_GT_DISP_PWRON ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON , + val & ~MIPIO_RST_CTRL ); +
intel_disable_dsi_pll(encoder);drivers/gpu/drm/i915/intel_dsi.c +4
-0+/* Power down DSI regulator to save power */ +I915_WRITE (BXT_P_DSI_REGULATOR_CFG ,STAP_SELECT ); +I915_WRITE (BXT_P_DSI_REGULATOR_TX_CTRL ,HS_IO_CTRL_SELECT ); +if (
IS_VALLEYVIEW(dev_priv)||IS_CHERRYVIEW(dev_priv)) { u32 val;
Signature · 6 lines
Mika Kahola - Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH] drm/i915: Add MIPI_IO WA and program DSI regulators
Quoted 68 lines · Mika Kahola
Quoted 67 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec and
program the DSI regulators.v2: Moved IO enable to pre-enable as per Mika's review comments. Also reused the existing register definition for
BXT_P_CR_GT_DISP_PWRON.v3: Added Programming the DSI regulators as per disable/enable sequences.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 7 +++++++drivers/gpu/drm/i915/intel_dsi.c| 21 +++++++++++++++++++++2 files changed, 28 insertions(+)drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -1553,6 +1553,7 @@ enum skl_disp_power_wells { _MMIO(_BXT_PHY_CH(phy, ch, reg_ch0, reg_ch1))
#defineBXT_P_CR_GT_DISP_PWRON_MMIO(0x138090)
+#define MIPIO_RST_CTRL (1 << 2)
#define_BXT_PHY_CTL_DDI_A0x64C00
#define_BXT_PHY_CTL_DDI_B0x64C10drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -8301,6 +8302,12 @@ enum { #define _BXT_MIPIC_PORT_CTRL 0x6B8C0 #define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL)
+#defineBXT_P_DSI_REGULATOR_CFG_MMIO(0x16002
0)drivers/gpu/drm/i915/i915_reg.h +5
-0+#define STAP_SELECT (1 << 0) + +#define BXT_P_DSI_REGULATOR_TX_CTRL _MMIO(0x160054) +#define HS_IO_CTRL_SELECT (1 << 0) +#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -548,6 +548,7 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,struct
drm_i915_private*dev_priv= to_i915(encoder-Quoted 1 line
base.dev);
struct
intel_dsi*intel_dsi= enc_to_intel_dsi(&encoder-Quoted 1 line
base);
enum port port;
drivers/gpu/drm/i915/intel_dsi.c +1
-0+u32 val;
DRM_DEBUG_KMS("\n");drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -558,6 +559,11 @@ static void intel_dsi_pre_enable(structintel_encoder *encoder, intel_disable_dsi_pll(encoder); intel_enable_dsi_pll(encoder, pipe_config);
Quoted 8 lines
drivers/gpu/drm/i915/intel_dsi.c static void intel_dsi_pre_enable(struct intel_encoder *encoder, · line 566
Quoted 6 lines
drivers/gpu/drm/i915/intel_dsi.c +5
-0+/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON , + val |MIPIO_RST_CTRL ); +Looking good but overall we still need to address Jani's comment to limit these changes only to Broxton platform.
Please don't send this in reply to the current thread...
BR,
Jani.
Quoted 46 lines
Quoted 46 lines
intel_dsi_prepare(encoder, pipe_config);
/* Panel Enable over CRC PMIC */drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -575,6 +581,12 @@ static void intel_dsi_pre_enable(structintel_encoder *encoder, I915_WRITE(DSPCLK_GATE_D, val); }drivers/gpu/drm/i915/intel_dsi.c +6
-0+/* Power up DSI regulator */ +I915_WRITE (BXT_P_DSI_REGULATOR_CFG ,STAP_SELECT ); + val =I915_READ (BXT_P_DSI_REGULATOR_TX_CTRL ); + val &= ~HS_IO_CTRL_SELECT ; +I915_WRITE (BXT_P_DSI_REGULATOR_TX_CTRL , val); + /* put device in ready state */
intel_dsi_device_ready(encoder);drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -707,6 +719,7 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder, {struct
drm_i915_private*dev_priv= to_i915(encoder-Quoted 1 line
base.dev);
struct
intel_dsi*intel_dsi= enc_to_intel_dsi(&encoder-Quoted 1 line
base);
drivers/gpu/drm/i915/intel_dsi.c +1
-0+u32 val;
DRM_DEBUG_KMS("\n");drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -714,8 +727,16 @@ static void intel_dsi_post_disable(struct intel_encoder *encoder,
intel_dsi_clear_device_ready(encoder);drivers/gpu/drm/i915/intel_dsi.c +4
-0+ val =I915_READ (BXT_P_CR_GT_DISP_PWRON ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON , + val & ~MIPIO_RST_CTRL ); +
intel_disable_dsi_pll(encoder);drivers/gpu/drm/i915/intel_dsi.c +4
-0+/* Power down DSI regulator to save power */ +I915_WRITE (BXT_P_DSI_REGULATOR_CFG ,STAP_SELECT ); +I915_WRITE (BXT_P_DSI_REGULATOR_TX_CTRL ,HS_IO_CTRL_SELECT ); +if (
IS_VALLEYVIEW(dev_priv)||IS_CHERRYVIEW(dev_priv)) { u32 val;
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 55 lines
-----Original Message-----
From: Kahola, Mika
Sent: Thursday, January 12, 2017 5:13 PM
To: Srinivas, Vidya <[email protected]>; intel- [email protected]
Subject: Re: [Intel-gfx] [PATCH 10/14] drm/i915: AddMIPI_IOWAThis is definitely needed to pass igt test on bxt
'
gem_exec_suspend--run-subtest basic-S3'Tested-by Mika Kahola <[email protected]>Quoted 15 lines · Vidya Srinivas
From: Uma Shankar <[email protected]>
Enable MIPI IO WA for BXT DSI as per bspec.
Signed-off-by Uma Shankar <[email protected]>---
drivers/gpu/drm/i915/i915_reg.h | 3 +++
drivers/gpu/drm/i915/intel_dsi.c | 9 +++++++++2 files changed, 12 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_reg.hindex 71b978a..b9d7e98 100644drivers/gpu/drm/i915/i915_reg.h enum { · line 8305
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -8301,6 +8301,9 @@ enum { #define _BXT_MIPIC_PORT_CTRL 0x6B8C0 #define BXT_MIPI_PORT_CTRL(tc) _MMIO_MIPI(tc, _BXT_MIPIA_PORT_CTRL, _BXT_MIPIC_PORT_CTRL) +#define BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR _MMIO(0Quoted 18 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0x138090) +#define MIPIO_RST_CTRL (1 << 2) +#define DPI_ENABLE (1 << 31)
/* A + C */
#define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27
#define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf<< 27)drivers/gpu/drm/i915/intel_dsi.c +0
-0@@ -366,6 +366,11 @@ static void bxt_dsi_device_ready(struct intel_encoder *encoder) DRM_DEBUG_KMS("\n");
Quoted 7 lines
drivers/gpu/drm/i915/intel_dsi.c static void bxt_dsi_device_ready(struct intel_encoder *encoder) · line 373
Quoted 5 lines
drivers/gpu/drm/i915/intel_dsi.c +5
-0+/* Add MIPI IO reset programming for modeset */ + val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val |MIPIO_RST_CTRL ); +Should we move this WA to
intel_dsi_pre_enable()as the counterpart of this WA is definedintel_dsi_post_disable()?
Yes, this can be done in intel_dsi_pre_enable itself. Will make the change and re-send. Thanks for the input.
Quoted 15 lines
Quoted 15 lines
drivers/gpu/drm/i915/intel_dsi.c +0
-0/* Enable MIPI PHY transparent latch */ for_each_dsi_port(port, intel_dsi->ports) {val = I915_READ(BXT_MIPI_PORT_CTRL(port));
drivers/gpu/drm/i915/intel_dsi.c +4
-0@@ -757,6 +762,10 @@ static void intel_dsi_post_disable(structintel_encoder *encoder, drm_panel_power_off(intel_dsi->panel); msleep(intel_dsi->panel_off_delay); + val =I915_READ (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR ); +I915_WRITE (BXT_P_CR_GT_DISP_PWRON_0_2_0_GTTMMADR , + val & ~MIPIO_RST_CTRL ); + intel_disable_dsi_pll(encoder);
Quoted 3 lines
Quoted 1 line
/* Panel Disable over CRC PMIC */
--
Mika Kahola - Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx