[PATCH v5 2/2] drm/i915/display: Use struct intel_display instead of struct drm_i915_private

2024-11-05 Thread Mika Kahola
Let's start using struct intel_display instead of struct drm_i915_private when introducing new code. No functional changes. v2: Drop tc_to_intel_display() helper funtion (Jani) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_tc.c | 12 ++-- 1 file chang

[PATCH v5 1/2] drm/i915/xe3lpd: Power request asserting/deasserting

2024-11-05 Thread Mika Kahola
stavo) Rename workaround function as wa_14020908590() (Gustvo) Use boolean enable instead of if-else structure (Raag) v4: Drop drm_WARN_ON() (Raag) Fix function definition to fit into a single line (Raag) Reviewed-by: Raag Jadav Signed-off-by: Mika Kahola --- .../gpu/drm/i915/display/

[PATCH v5 0/2] drm/i915/display: Power request asserting/deasserting

2024-11-05 Thread Mika Kahola
lue with 0x1 4. Read mailbox command and wait until run/busy bit is clear before continuing power request. while at it, let's start using struct intel_display instead of struct drm_i915_private as well. Signed-off-by: Mika Kahola Mika Kahola (2): drm/i915/xe3lpd: Power request asserti

[PATCH v4 0/2] drm/i915/display: Power request asserting/deasserting

2024-11-01 Thread Mika Kahola
lue with 0x1 4. Read mailbox command and wait until run/busy bit is clear before continuing power request. while at it, let's start using struct intel_display instead of struct drm_i915_private as well. Signed-off-by: Mika Kahola Mika Kahola (2): drm/i915/xe3lpd: Power request asserti

[PATCH v4 2/2] drm/i915/display: Use struct intel_display instead of struct drm_i915_private

2024-11-01 Thread Mika Kahola
Let's start using struct intel_display instead of struct drm_i915_private when introducing new code. No functional changes. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_tc.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/driver

[PATCH v4 1/2] drm/i915/xe3lpd: Power request asserting/deasserting

2024-11-01 Thread Mika Kahola
stavo) Rename workaround function as wa_14020908590() (Gustvo) Use boolean enable instead of if-else structure (Raag) v4: Drop drm_WARN_ON() (Raag) Fix function definition to fit into a single line (Raag) Reviewed-by: Raag Jadav Signed-off-by: Mika Kahola --- .../gpu/drm/i915/display/

[PATCH v3 2/2] drm/i915/display: Use struct intel_display instead of struct drm_i915_private

2024-10-31 Thread Mika Kahola
Let's start using struct intel_display instead of struct drm_i915_private when introducing new code. No functional changes. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_tc.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/driver

[PATCH v3 1/2] drm/i915/xe3lpd: Power request asserting/deasserting

2024-10-31 Thread Mika Kahola
stavo) Rename workaround function as wa_14020908590() (Gustvo) Use boolean enable instead of if-else structure (Raag) Signed-off-by: Mika Kahola --- .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 8 + drivers/gpu/drm/i915/display/intel_tc.c | 32 +++ 2 files

[PATCH v3 0/2] drm/i915/display: Power request asserting/deasserting

2024-10-31 Thread Mika Kahola
lue with 0x1 4. Read mailbox command and wait until run/busy bit is clear before continuing power request. while at it, let's start using struct intel_display instead of struct drm_i915_private as well. Signed-off-by: Mika Kahola Mika Kahola (2): drm/i915/xe3lpd: Power request asserti

[PATCH v3] drm/i915/xe3lpd: Power request asserting/deasserting

2024-10-29 Thread Mika Kahola
stavo) Rename workaround function as wa_14020908590() (Gustvo) Use boolean enable instead of if-else structure (Gustavo) Signed-off-by: Mika Kahola --- .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 8 drivers/gpu/drm/i915/display/intel_tc.c | 39 +++ 2 files

[PATCH] drm/i915/xe3lpd: Power request asserting/deasserting

2024-10-28 Thread Mika Kahola
o) Move register defs from i915_reg.h to intel_cx0_phy_regs.h (Gustavo) Signed-off-by: Mika Kahola --- .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 7 +++ drivers/gpu/drm/i915/display/intel_tc.c | 46 +++ 2 files changed, 53 insertions(+) diff --git a/drivers/

[PATCH] drm/i915/display: For MTL+ platforms skip mg dp programming

2024-06-25 Thread Mika Kahola
From: Imre Deak For MTL+ platforms we use PICA chips for Type-C support and hence mg programming is not needed. Fixes issue with drm warn of TC port not being in legacy mode. Signed-off-by: Mika Kahola Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_ddi.c | 3 +++ 1 file

[PATCH v2 2/2] drm/i915/display: Add compare config for MTL+ platforms

2024-05-23 Thread Mika Kahola
, we would need to disable fastset and use full modeset instead. v2: Fix C10 error on PLL comparison (BAT) Use memcmp instead of fixed loops for pll config comparison (Jani) Clean up and use intel_cx0pll_dump_hw_state() to dump pll information (Jani) Signed-off-by: Mika Kahola

[PATCH v2 1/2] drm/i915/display: Revert "drm/i915/display: Skip C10 state verification in case of fastset"

2024-05-23 Thread Mika Kahola
This reverts commit a1d91c6e989d0e66b89aa911f2cd459d7bdebbe5. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index

[PATCH v2 0/2] drm/i915/display: Add comparison for pipe config for MTL+ >

2024-05-23 Thread Mika Kahola
intel_cx0pll_dump_hw_state() to dump pll information (Jani) Signed-off-by: Mika Kahola Mika Kahola (2): drm/i915/display: Revert "drm/i915/display: Skip C10 state verification in case of fastset" drm/i915/display: Add compare config for MTL+ platforms drivers/gpu/drm/i915/display/intel_cx0_p

[PATCH 1/2] drm/i915/display: Revert "drm/i915/display: Skip C10 state verification in case of fastset"

2024-05-21 Thread Mika Kahola
This reverts commit a1d91c6e989d0e66b89aa911f2cd459d7bdebbe5. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index

[PATCH 2/2] drm/i915/display: Add compare config for MTL+ platforms

2024-05-21 Thread Mika Kahola
, we would need to disable fastset and use full modeset instead. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 74 +++ drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 + drivers/gpu/drm/i915/display/intel_display.c | 39 ++ drivers/gpu

[PATCH 0/2] drm/i915/display: Add comparison for pipe config for MTL+ platforms

2024-05-21 Thread Mika Kahola
, we would need to disable fastset and use full modeset instead. However, first we need to revert the patch that disables fastset for C10. Signed-off-by: Mika Kahola Mika Kahola (2): drm/i915/display: Revert "drm/i915/display: Skip C10 state verification in case of fastset"

[PATCH 2/2] drm/i915/display: Remove .clock from pll state structure

2024-05-14 Thread Mika Kahola
.clock is not necessarily required to have in pll state structure as it can always recalculated with the *_calc_port_clock() function. Hence, let's remove this struct member complitely. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c

[PATCH 1/2] drm/i915/display: Move port clock calculation

2024-05-14 Thread Mika Kahola
As a preparation to remove .clock member from pll state structure, let's move the port clock calculation on better location Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 176 ++- 1 file changed, 91 insertions(+), 85 deletions(-) diff --

[PATCH] drm/i915/display: Calculate crtc clock rate based on PLL parameters

2024-05-02 Thread Mika Kahola
. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index 8e3b13884bb8..89a195917179 100644 --- a/drivers/gpu/drm

[PATCH 2/2] drm/i915/display: Force full modeset for eDP

2024-02-05 Thread Mika Kahola
true and hence we would need to program PLL values by the driver. The patch suggests a workaround as enabling full modeset when booting up. This way we force the driver to write the PLL values to the hw. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_dp.c | 13 + 1

[PATCH 1/2] Revert "drm/i915/display: Skip C10 state verification in case of fastset"

2024-02-05 Thread Mika Kahola
This reverts commit a1d91c6e989d0e66b89aa911f2cd459d7bdebbe5. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index

[PATCH 0/2] drm/i915/display: Force full modeset for eDP

2024-02-05 Thread Mika Kahola
alues by the driver. Signed-off-by: Mika Kahola Mika Kahola (2): Revert "drm/i915/display: Skip C10 state verification in case of fastset" drm/i915/display: Force full modeset for eDP drivers/gpu/drm/i915/display/intel_cx0_phy.c | 3 --- drivers/gpu/drm/i915/display/intel

[PATCH] drm/i915/display: Use helper to select C20 MPLLA/B

2024-01-05 Thread Mika Kahola
We used to select between MPLLA/B with the following state->tx[0] & C20_PHY_USE_MPLLB Since this is used a few places within C20 PLL setting, let's introduce a helper function to clean up the code a bit. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx

[PATCH v2 3/3] drm/i915/display: Cleanup mplla/mpllb selection

2024-01-02 Thread Mika Kahola
The function intel_c20_use_mplla() is not really widely used and can be replaced with the more suitable pll->tx[0] & C20_PHY_USE_MPLLB expression. Let's remove the intel_c20_use_mplla() alltogether and replace mplla/mpllb selection by checking mpllb bit. Signed-off-by: Mika Kahola

[PATCH v2 2/3] drm/i915/display: Store hw clock for C20

2024-01-02 Thread Mika Kahola
We can calculate the hw port clock during the hw readout and store it as pll_state->clock for C20 state verification. In order to do that we need to move intel_c20pll_calc_port_clock() function. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c |

[PATCH v2 1/3] drm/i915/display: Fix C20 pll selection for state verification

2024-01-02 Thread Mika Kahola
es if these two selections match. Fixes: 59be90248b42 ("drm/i915/mtl: C20 state verification") v2: reword commit message and include fix to a original commit (Imre) Compare pll selection (Jani) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel

[PATCH v2 0/3] drm/i915/display: C20 clock state verification

2024-01-02 Thread Mika Kahola
ni) Signed-off-by: Mika Kahola Mika Kahola (3): drm/i915/display: Fix C20 pll selection for state verification drm/i915/display: Store hw clock for C20 drm/i915/display: Cleanup mplla/mpllb selection drivers/gpu/drm/i915/display/intel_cx0_phy.c | 153 ++- 1 file changed

[PATCH v2 2/3] drm/i915/display: Store hw clock for C20

2023-12-21 Thread Mika Kahola
We can calculate the hw port clock during the hw readout and store it as pll_state->clock for C20 state verification. In order to do that we need to move intel_c20pll_calc_port_clock() function. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c |

[PATCH v2 1/3] drm/i915/display: Fix C20 pll selection for state verification

2023-12-21 Thread Mika Kahola
es if these two selections match. Fixes: 59be90248b42 ("drm/i915/mtl: C20 state verification") v2: reword commit message and include fix to a original commit (Imre) Compare pll selection (Jani) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel

[PATCH v2 3/3] drm/i915/display: Cleanup mplla/mpllb selection

2023-12-21 Thread Mika Kahola
The function intel_c20_use_mplla() is not really widely used and can be replaced with the more suitable pll->tx[0] & C20_PHY_USE_MPLLB expression. Let's remove the intel_c20_use_mplla() alltogether and replace mplla/mpllb selection by checking mpllb bit. Signed-off-by: Mika Kahola

[PATCH v2 0/3] drm/i915/display: C20 clock state verification

2023-12-21 Thread Mika Kahola
ni) Signed-off-by: Mika Kahola Mika Kahola (3): drm/i915/display: Fix C20 pll selection for state verification drm/i915/display: Store hw clock for C20 drm/i915/display: Cleanup mplla/mpllb selection drivers/gpu/drm/i915/display/intel_cx0_phy.c | 153 ++- 1 file changed

[PATCH] drm/i915/display: Skip C10 state verification in case of fastset

2023-12-19 Thread Mika Kahola
PLL's are not programmed in case of fastset so the state verfication compares bios programmed PLL values against sw PLL values. To overcome this limitation, we can skip the state verification for C10 in fastset case as the driver is not writing PLL values. Signed-off-by: Mika Kahola --- dr

[PATCH] drm/i915/display: C20 clock state verification

2023-12-15 Thread Mika Kahola
Add clock state verification for C20. Since we are usign either A or B contexts, which are selected based on clock rate, we first need to calculate hw clock and use that clock to select which context we are using. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 8

[PATCH v2] drm/i915/display: Wait for PHY readiness not needed for disabling sequence

2023-12-12 Thread Mika Kahola
. v2: Cleanup for increased readibility (Imre) BSpec: 65380 For VLK-53734 Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_tc.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm

[PATCH] drm/i915/display: Wait for PHY readiness not needed for disabling sequence

2023-12-12 Thread Mika Kahola
BSpec: 65380 Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_tc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c index f64d348a969e..79ec17fa3edd 100644 --- a/drivers/gpu/drm/i915/display/intel

[Intel-gfx] [PATCH 3/3] drm/i915/display: Print out debug messages for clock rates

2023-12-04 Thread Mika Kahola
Print out clock rate for C10 chip and clock rate and link bitrate for C20 chip for debugging purposes. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 2/3] drm/i915/display: Convert link bitrate to corresponding PLL clock

2023-12-04 Thread Mika Kahola
corresponding PLL clock rate. while at it, update clock on C10 pll state as well. Signed-off-by: Clint Taylor Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 38 ++-- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 1 + drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 1/3] drm/i915/display: Move C20 HW readout

2023-12-04 Thread Mika Kahola
Moving intel_c20pll_readout_hw_state() for better place to better suit for upcoming changes. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 116 +-- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 0/3] drm/i915/display: Convert link bitrate to clock

2023-12-04 Thread Mika Kahola
While reading HW state for C10 and C20 chips, let's update the PLL clock rates. For C20 the clock rate differs from link bit rate on DP2.0 cases and hence a conversion from link bitrate to clock is needed. Signed-off-by: Mika Kahola Mika Kahola (3): drm/i915/display: Move C20 HW readout

[Intel-gfx] [PATCH] drm/i915/display: Skip state verification with TBT-ALT mode

2023-11-29 Thread Mika Kahola
iled after 3 retries." Signed-off-by: Mika Kahola Reviewed-by: Gustavo Sousa --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0

[Intel-gfx] [PATCH] drm/i915/display: Skip state verification with TBT-ALT mode

2023-11-27 Thread Mika Kahola
iled after 3 retries." Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index a8fa76580802..3a30cffd450c 100644 -

[Intel-gfx] [PATCH] drm/i915/display: Use int type for entry_setup_frames

2023-11-16 Thread Mika Kahola
ransmitted one frame earlier") Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index 8d180132a74b..204da50e3f28 10064

[Intel-gfx] [PATCH] drm/i915/mtl: Use int for entry setup frames

2023-11-13 Thread Mika Kahola
At least one TGL had regression when using u8 types for entry setup frames calculation. So, let's switch to use ints instead. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_psr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH v2] drm/i915/mtl: C20 state verification

2023-11-09 Thread Mika Kahola
Add state verification for C20 as we have one for C10. V2: Use abstractation of HW readout (Gustavo) Drop MPLLA/B from message for TX and CMN parameters (Gustavo) Reviewed-by: Gustavo Sousa (v1) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 120

[Intel-gfx] [PATCH v4] drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier

2023-11-06 Thread Mika Kahola
nstead of dev_priv (Jouni) Signed-off-by: Mika Kahola --- .../drm/i915/display/intel_display_types.h| 1 + drivers/gpu/drm/i915/display/intel_psr.c | 82 +++ drivers/gpu/drm/i915/display/intel_psr_regs.h | 2 + 3 files changed, 71 insertions(+), 14 deletions(-) diff --git

[Intel-gfx] [PATCH v2] drm/i915/mtl: C20 state verification

2023-11-06 Thread Mika Kahola
Add state verification for C20 as we have one for C10. v2: use register values as u32 instead of u8 Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 107 ++ drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 +- .../drm/i915/display

[Intel-gfx] [PATCH v3] drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier

2023-11-03 Thread Mika Kahola
SR Entry Setup Frames register to indicate Lunarlake specificity (Jouni) v3: Modify setup entry frames calculation function to return the actual frames (Ville) Match comment with actual implementation (Jouni) Signed-off-by: Mika Kahola --- .../drm/i915/display/intel_display_types.h

[Intel-gfx] [PATCH] drm/i915/mtl: C20 state verification

2023-11-01 Thread Mika Kahola
Add state verification for C20 as we have one for C10. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 111 ++ drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 +- .../drm/i915/display/intel_modeset_verify.c | 2 +- 3 files changed, 88

[Intel-gfx] [PATCH] drm/i915/mtl: Clear possible sticky bits on PICA message bus

2023-11-01 Thread Mika Kahola
It is possible that sticky bits or error bits are left on message bus status register. Reading and then writing the value back to messagebus status register clears all possible sticky bits and errors. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 14

[Intel-gfx] [PATCH v2] drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier

2023-11-01 Thread Mika Kahola
ry Setup Frames register to indicate Lunarlake specificity (Jouni) Signed-off-by: Mika Kahola --- .../drm/i915/display/intel_display_types.h| 1 + drivers/gpu/drm/i915/display/intel_psr.c | 77 ++- drivers/gpu/drm/i915/display/intel_psr_regs.h | 2 + 3 files cha

[Intel-gfx] [PATCH] drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier

2023-10-25 Thread Mika Kahola
ver should enable sending VSC SDP one frame earlier before sending the capture frame. BSpec: 69895 (PSR Entry Setup Frames 17:16) Signed-off-by: Mika Kahola --- .../drm/i915/display/intel_display_types.h| 1 + drivers/gpu/drm/i915/display/intel_psr.c | 35 --- drivers/gpu/

[Intel-gfx] [PATCH v3] drm/i915/display: Reset message bus after each read/write operation

2023-10-16 Thread Mika Kahola
every successful or unsuccessful read or write operation. v2: Add FIXME's to indicate the experimental nature of this workaround (Rodrigo) v3: Dropping the additional delay as moving reset to *_read_once() and *_write_once() functions seem unnecessary delay Signed-off-by: Mika K

[Intel-gfx] [PATCH v2] drm/i915/display: Reset message bus after each read/write operation

2023-10-13 Thread Mika Kahola
. v2: Add FIXME's to indicate the experimental nature of this workaround (Rodrigo) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gp

[Intel-gfx] [PATCH v3] drm/i915/lnl: Remove watchdog timers for PSR

2023-10-10 Thread Mika Kahola
removal as irrelevant for this patch (Ville) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_psr.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index bb65881e87cc

[Intel-gfx] [PATCH v2] drm/i915/lnl: Remove watchdog timers for PSR

2023-10-09 Thread Mika Kahola
Currently we are not using watchdog timers for PSR/PSR2 with Lunarlake. The patch removes the use of these timers from the driver code. BSpec: 69895 v2: Reword commit message (Ville) Drop HPD mask from LNL (Ville) Revise masking logic (Jouni) Signed-off-by: Mika Kahola --- drivers/gpu

[Intel-gfx] [PATCH] drm/i915/lnl: Remove watchdog timers for PSR

2023-10-06 Thread Mika Kahola
Currently we are not using watchdog timers for PSR/PSR2. The patch disables these timers so they are not in use. BSpec: 69895 Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_psr.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a

[Intel-gfx] [PATCH] drm/i915/display: Reset message bus after each read/write operation

2023-10-04 Thread Mika Kahola
every successful or unsuccessful read or write operation. However, testing revealed that this alone is not sufficient method an additiona delay is also introduces anything from 200us to 300us. This delay is experimental value and has no specification to back it up. Signed-off-by: Mika Kahola

[Intel-gfx] [PATCH] drm/i915/mtl: Cleanup usage of phy lane reset

2023-06-09 Thread Mika Kahola
7;s move reset to corresponding timeout error and drop the excess reset function calls from read/write functions. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v2] drm/i915/mtl: Reset only one lane in case of MFD

2023-06-01 Thread Mika Kahola
g for lanes and revise the commit message (Luca) Reviewed-by: Arun R Murthy (v1) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 39 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/dr

[Intel-gfx] [PATCH] drm/i915/mtl: Reset only one lane in case of MFD

2023-05-24 Thread Mika Kahola
In case when only two or less lanes are owned such as MFD (DP-alt with x2 lanes) we need to reset only one lane (lane0). With only x2 lanes we don't need to poll for the phy current status on both lanes since only the owned lane will respond. Signed-off-by: Mika Kahola --- drivers/gpu/drm

[Intel-gfx] [PATCH] drm/i915/mtl: Fix expected reg value for Thunderbolt PLL disabling

2023-05-12 Thread Mika Kahola
While disabling Thunderbolt PLL, we request PLL to be stopped and wait for ACK bit to be cleared. The expected value should be '0' instead of '~XELPDP_TBT_CLOCK_ACK' or otherwise we incorrectly receive dmesg warn "PHY PLL not unlocked in 10us". Signed-off-by: Mik

[Intel-gfx] [PATCH v2 09/13] drm/i915/mtl: Define mask for DDI AUX interrupts

2023-04-28 Thread Mika Kahola
From: Gustavo Sousa Xe_LPD+ defines interrupt bits for only DDI ports in the DE Port Interrupt registers. The bits for Type-C ports are defined in the PICA interrupt registers. BSpec: 50064 Reviewed-by: Radhakrishna Sripada Signed-off-by: Gustavo Sousa Signed-off-by: Mika Kahola

[Intel-gfx] [PATCH v2 12/13] drm/i915/mtl: Pin assignment for TypeC

2023-04-28 Thread Mika Kahola
Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_tc.c | 28 + 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c index b192265a3d78..4fca711a58bc 100644 --- a/drivers/gpu/drm

[Intel-gfx] [PATCH v2 13/13] drm/i915/mtl: Enable TC ports

2023-04-28 Thread Mika Kahola
Finally, we can enable TC ports for Meteorlake. Reviewed-by: Clint Taylor Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_display.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v2 08/13] drm/i915/mtl: Readout Thunderbolt HW state

2023-04-28 Thread Mika Kahola
Readout hw state for Thunderbolt. Reviewed-by: Radhakrishna Sripada Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 27 drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 +- drivers/gpu/drm/i915/display/intel_ddi.c | 5 +++- 3 files

[Intel-gfx] [PATCH v2 11/13] drm/i915/mtl: TypeC HPD live status query

2023-04-28 Thread Mika Kahola
: Mika Kahola --- drivers/gpu/drm/i915/display/intel_tc.c | 30 - 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c index 951b12ac51dc..b192265a3d78 100644 --- a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH v2 07/13] drm/i915/mtl: Enabling/disabling sequence Thunderbolt pll

2023-04-28 Thread Mika Kahola
Enabling and disabling sequence for Thunderbolt PLL. Bspec: 64568 v2: Use intel_de_wait_for_register() (RK) Reviewed-by: Radhakrishna Sripada Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 135 ++- drivers/gpu/drm/i915/display/intel_cx0_phy.h

[Intel-gfx] [PATCH v2 10/13] drm/i915/mtl: Power up TCSS

2023-04-28 Thread Mika Kahola
: Matt Atwood Signed-off-by: Mika Kahola Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 19 ++ drivers/gpu/drm/i915/display/intel_cx0_phy.h | 4 + drivers/gpu/drm/i915/display/intel_ddi.c | 1 + drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers

[Intel-gfx] [PATCH v2 05/13] drm/i915/mtl: Add voltage swing sequence for C20

2023-04-28 Thread Mika Kahola
DP1.4 and DP20 voltage swing sequence for C20 phy. Bspec: 65449, 67636, 67610 Reviewed-by: Arun R Murthy Signed-off-by: Mika Kahola Signed-off-by: Clint Taylor Signed-off-by: Radhakrishna Sripada --- .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 4 ++ .../drm/i915/display

[Intel-gfx] [PATCH v2 06/13] drm/i915/mtl: For DP2.0 10G and 20G rates use MPLLA

2023-04-28 Thread Mika Kahola
Use MPLLA for DP2.0 rates 10G and 20G, when ssc is enabled. v2: Fix typo in commit message (Animesh) Reviewed-by: Radhakrishna Sripada Reviewed-by: Arun R Murthy Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 7 +-- 1 file changed, 5 insertions(+), 2

[Intel-gfx] [PATCH v2 03/13] drm/i915/mtl: Dump C20 pll hw state

2023-04-28 Thread Mika Kahola
As we already do with C10 chip, let's dump the pll hw state for C20 as well. Reviewed-by: Radhakrishna Sripada Reviewed-by: Arun R Murthy Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 20 drivers/gpu/drm/i915/display/intel_cx0_phy.h

[Intel-gfx] [PATCH v2 04/13] drm/i915/mtl: C20 port clock calculation

2023-04-28 Thread Mika Kahola
Calculate port clock with C20 phy. BSpec: 64568 Reviewed-by: Radhakrishna Sripada Reviewed-by: Arun R Murthy Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 45 +++ drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 + .../gpu/drm/i915/display

[Intel-gfx] [PATCH v2 02/13] drm/i915/mtl: C20 HW readout

2023-04-28 Thread Mika Kahola
-off-by: Mika Kahola Signed-off-by: Arun R Murthy Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 624 +- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 8 +- .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 1 + drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH v2 01/13] drm/i915/mtl: C20 PLL programming

2023-04-28 Thread Mika Kahola
() instead of msleep() (Andi) Reviewed-by: Arun R Murthy Signed-off-by: José Roberto de Souza Signed-off-by: Mika Kahola Signed-off-by: Bhanuprakash Modem Signed-off-by: Imre Deak Signed-off-by: Arun R Murthy --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 288 +++--- .../gpu/drm

[Intel-gfx] [PATCH v2 00/13] drm/i915/mtl: Add support for C20 phy

2023-04-28 Thread Mika Kahola
Add support for C20 phy for Type-C connections. C20 phy differs from C10 and hence we need to separately handle this case. v2: Fixes for C20 pll programming and hw readout Signed-off-by: Mika Kahola Anusha Srivatsa (1): drm/i915/mtl: Pin assignment for TypeC Gustavo Sousa (1): drm/i915

[Intel-gfx] [PATCH 13/13] drm/i915/mtl: Enable TC ports

2023-04-20 Thread Mika Kahola
Finally, we can enable TC ports for Meteorlake. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_display.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index

[Intel-gfx] [PATCH 12/13] drm/i915/mtl: Pin assignment for TypeC

2023-04-20 Thread Mika Kahola
From: Anusha Srivatsa Unlike previous platforms that used PORT_TX_DFLEXDPSP for max_lane calculation, MTL uses only PORT_TX_DFLEXPA1 from which the max_lanes has to be calculated. Bspec: 50235, 65380 Signed-off-by: Anusha Srivatsa Signed-off-by: Jose Roberto de Souza Signed-off-by: Mika

[Intel-gfx] [PATCH 10/13] drm/i915/mtl: Power up TCSS

2023-04-20 Thread Mika Kahola
-by: Mika Kahola Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 19 ++ drivers/gpu/drm/i915/display/intel_cx0_phy.h | 4 + drivers/gpu/drm/i915/display/intel_ddi.c | 1 + drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 05/13] drm/i915/mtl: Add voltage swing sequence for C20

2023-04-20 Thread Mika Kahola
DP1.4 and DP20 voltage swing sequence for C20 phy. Bspec: 65449, 67636, 67610 Signed-off-by: Mika Kahola Signed-off-by: Clint Taylor Signed-off-by: Radhakrishna Sripada --- .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 4 ++ .../drm/i915/display/intel_ddi_buf_trans.c| 53

[Intel-gfx] [PATCH 06/13] drm/i915/mtl: For DP2.0 10G and 20G rates use MPLLA

2023-04-20 Thread Mika Kahola
Use MPLLA for DP2.0 rates 20G and 20G, when ssc is enabled. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 07/13] drm/i915/mtl: Enabling/disabling sequence Thunderbolt pll

2023-04-20 Thread Mika Kahola
Enabling and disabling sequence for Thunderbolt PLL. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 135 ++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 7 +- drivers/gpu/drm/i915/display/intel_ddi.c | 4 +- 3 files changed, 138

[Intel-gfx] [PATCH 09/13] drm/i915/mtl: Define mask for DDI AUX interrupts

2023-04-20 Thread Mika Kahola
From: Gustavo Sousa Xe_LPD+ defines interrupt bits for only DDI ports in the DE Port Interrupt registers. The bits for Type-C ports are defined in the PICA interrupt registers. BSpec: 50064 Signed-off-by: Gustavo Sousa --- drivers/gpu/drm/i915/i915_irq.c | 5 - 1 file changed, 4 insertions

[Intel-gfx] [PATCH 11/13] drm/i915/mtl: TypeC HPD live status query

2023-04-20 Thread Mika Kahola
From: Imre Deak The HPD live status for MTL has to be read from different set of registers. MTL deserves a new function for this purpose and cannot reuse the existing HPD live status detection Signed-off-by: Anusha Srivatsa Signed-off-by: Imre Deak Signed-off-by: Mika Kahola --- drivers

[Intel-gfx] [PATCH 03/13] drm/i915/mtl: Dump C20 pll hw state

2023-04-20 Thread Mika Kahola
As we already do with C10 chip, let's dump the pll hw state for C20 as well. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 20 drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 ++ drivers/gpu/drm/i915/display/intel_ddi.c | 1 + 3

[Intel-gfx] [PATCH 08/13] drm/i915/mtl: Readout Thunderbolt HW state

2023-04-20 Thread Mika Kahola
Readout hw state for Thunderbolt. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 27 drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 +- drivers/gpu/drm/i915/display/intel_ddi.c | 5 +++- 3 files changed, 32 insertions(+), 2 deletions

[Intel-gfx] [PATCH 04/13] drm/i915/mtl: C20 port clock calculation

2023-04-20 Thread Mika Kahola
Calculate port clock with C20 phy. BSpec: 64568 Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 45 +++ drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 + .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 4 ++ drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 02/13] drm/i915/mtl: C20 HW readout

2023-04-20 Thread Mika Kahola
Create a table for C20 DP1.4, DP2.0 and HDMI2.1 rates. The PLL settings are based on table, not for algorithmic alternative. For DP 1.4 only MPLLB is in use. Once register settings are done, we read back C20 HW state. BSpec: 64568 Signed-off-by: Mika Kahola Signed-off-by: Arun R Murthy Signed

[Intel-gfx] [PATCH 01/13] drm/i915/mtl: C20 PLL programming

2023-04-20 Thread Mika Kahola
C20 phy PLL programming sequence for DP, DP2.0, HDMI2.x non-FRL and HDMI2.x FRL. This enables C20 MPLLA and MPLLB programming sequence. add 4 lane support for c20. Signed-off-by: José Roberto de Souza Signed-off-by: Mika Kahola Signed-off-by: Bhanuprakash Modem Signed-off-by: Imre Deak Signed

[Intel-gfx] [PATCH 00/13] drm/i915/mtl: Add support for C20 phy

2023-04-20 Thread Mika Kahola
Add support for C20 phy for Type-C connections. C20 phy differs from C10 and hence we need to separately handle this case. Signed-off-by: Mika Kahola Anusha Srivatsa (1): drm/i915/mtl: Pin assignment for TypeC Gustavo Sousa (1): drm/i915/mtl: Define mask for DDI AUX interrupts Imre Deak

[Intel-gfx] [PATCH v3 7/8] drm/i915/display/mtl: Fill port width in DDI_BUF_/TRANS_DDI_FUNC_/PORT_BUF_CTL for HDMI

2023-04-06 Thread Mika Kahola
ommit message. v3: - Use TRANS_DDI_PORT_WIDTH() instead of DDI_PORT_WIDTH() for the value of TRANS_DDI_FUNC_CTL_*. (Gustavo) Signed-off-by: Ankit Nautiyal Signed-off-by: Taylor, Clinton A Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_ddi.c | 48 +--- dr

[Intel-gfx] [PATCH v3 8/8] drm/i915/mtl/display: Implement DisplayPort sequences

2023-04-06 Thread Mika Kahola
5505 Acked-by: Matt Roper Signed-off-by: Satyeshwar Singh Signed-off-by: Clint Taylor Signed-off-by: Radhakrishna Sripada Signed-off-by: Ankit Nautiyal Signed-off-by: José Roberto de Souza Signed-off-by: Mika Kahola --- .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 8 + drivers/gpu/drm

[Intel-gfx] [PATCH v3 3/8] drm/i915/mtl: Create separate reg file for PICA registers

2023-04-06 Thread Mika Kahola
Create a separate file to store registers for PICA chips C10 and C20. v2: Rename file (Jani) v3: Use _PICK_EVEN_2RANGES() macro (Lucas) Coding style fixed (Lucas) v4: Redefine macros (Imre) Reviewed-by: Vinod Govindapillai (v3) Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola

[Intel-gfx] [PATCH v3 6/8] drm/i915/mtl: MTL PICA hotplug detection

2023-04-06 Thread Mika Kahola
: Imre Deak Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/i915_irq.c | 249 +++- drivers/gpu/drm/i915/i915_reg.h | 31 +++- 2 files changed, 273 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index

[Intel-gfx] [PATCH v3 2/8] drm/i915/mtl: Add DP rates

2023-04-06 Thread Mika Kahola
Add DP rates for Meteorlake. Reviewed-by: Vinod Govindapillai Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_dp.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c

[Intel-gfx] [PATCH v3 4/8] drm/i915/mtl: Add Support for C10 PHY message bus and pll programming

2023-04-06 Thread Mika Kahola
programming (Khaled) v4: Add tx and cmn on c10mpllb_state (Imre) Add missing waits for pending transactions between two message bus writes (Imre) General cleanups and simplifications (Imre) Cc: Mika Kahola Cc: Imre Deak Cc: Uma Shankar Cc: Gustavo Sousa Signed-off-by: Radhakrishna Sripada

[Intel-gfx] [PATCH v3 5/8] drm/i915/mtl: Add vswing programming for C10 phys

2023-04-06 Thread Mika Kahola
0. Fix this in the driver code as well. v3: VSwing update (Clint) Cc: Imre Deak Cc: Uma Shankar Signed-off-by: Clint Taylor Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 61 +-- drivers/gpu/drm/i9

[Intel-gfx] [PATCH v3 0/8] drm/i915/mtl: Add Support for C10 phy

2023-04-06 Thread Mika Kahola
) General cleanups and macro definitions (Imre) Signed-off-by: Mika Kahola Ankit Nautiyal (1): drm/i915/display/mtl: Fill port width in DDI_BUF_/TRANS_DDI_FUNC_/PORT_BUF_CTL for HDMI Clint Taylor (1): drm/i915/mtl: Initial DDI port setup José Roberto de Souza (1): drm/i915/mtl

[Intel-gfx] [PATCH v3 1/8] drm/i915/mtl: Initial DDI port setup

2023-04-06 Thread Mika Kahola
From: Clint Taylor Initialization sequences and C10 phy are in place to be able to enable the first 2 ports of MTL. The other ports use C20 phy that still need to be properly added. Enable the first ports for now, keeping a TODO comment about the others. Cc: Radhakrishna Sripada Reviewed-by: Lu

  1   2   3   4   5   6   7   8   9   10   >