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

2023-02-23 Thread Mika Kahola
DP1.4 and DP20 voltage swing sequence for C20 phy. Bspec: 65449, 67636, 67610 v2: DP2.0 Tx Eq tables has been updated in BSpec. Update also the driver code as per BSpec 65449 Signed-off-by: Mika Kahola Signed-off-by: Radhakrishna Sripada Signed-off-by: Clint Taylor --- .../gpu/drm/i915

[Intel-gfx] [PATCH v3 20/22] drm/i915/mtl: Power up TCSS

2023-02-23 Thread Mika Kahola
tcss power request with correct parameter. v3: Use de variant for register wait (Jani) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_tc.c | 117 ++- 2 files changed, 114 insertions(+), 5 deletions

[Intel-gfx] [PATCH v3 07/22] drm/i915/mtl: Add support for PM DEMAND

2023-02-23 Thread Mika Kahola
na Sripada Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_bw.c | 4 +- drivers/gpu/drm/i915/display/intel_bw.h | 2 + drivers/gpu/drm/i915/display/intel_display.c | 14 + .../gpu/drm/i915/display/intel_display_core.h | 6 + .../drm/i915/display/intel_displ

[Intel-gfx] [PATCH v3 17/22] drm/i915/mtl: Enable TC ports

2023-02-23 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 v3 19/22] drm/i915/mtl: Define mask for DDI AUX interrupts

2023-02-23 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 v3 05/22] drm/i915/mtl: Add C10 phy programming for HDMI

2023-02-23 Thread Mika Kahola
Sripada Signed-off-by: Clint Taylor Signed-off-by: Mika Kahola Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 576 +- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 1 + .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 2 + drivers/gpu/drm/i915/

[Intel-gfx] [PATCH v4 00/22] drm/i915/mtl: Add C10 and C20 phy support

2023-02-24 Thread Mika Kahola
table updates PICA hotplug handling updates v4: Initialize parameters for C20 port clock calculation Signed-off-by: Mika Kahola Anusha Srivatsa (1): drm/i915/mtl: Pin assignment for TypeC Clint Taylor (1): drm/i915/mtl: Initial DDI port setup Gustavo Sousa (1): drm/i915/mtl: Define mask

[Intel-gfx] [PATCH v4 01/22] drm/i915/mtl: Initial DDI port setup

2023-02-24 Thread Mika Kahola
From: Clint Taylor Initialize c10 combo phy ports. TODO Type-C ports. Cc: Radhakrishna Sripada Signed-off-by: Clint Taylor --- drivers/gpu/drm/i915/display/intel_display.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b

[Intel-gfx] [PATCH v4 02/22] drm/i915/mtl: Add DP rates

2023-02-24 Thread Mika Kahola
Add DP rates for Meteorlake. 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 b/drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH v4 03/22] drm/i915/mtl: Create separate reg file for PICA registers

2023-02-24 Thread Mika Kahola
Create a separate file to store registers for PICA chips C10 and C20. v2: Rename file (Jani) Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola --- .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 136 ++ 1 file changed, 136 insertions(+) create mode 100644 drivers

[Intel-gfx] [PATCH v4 04/22] drm/i915/mtl: Add Support for C10 PHY message bus and pll programming

2023-02-24 Thread Mika Kahola
programming (Khaled) Cc: Imre Deak Cc: Uma Shankar Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/Makefile |1 + drivers/gpu/drm/i915/display/intel_cx0_phy.c | 1120 + drivers/gpu/drm/i915/display/intel_cx0_phy.h | 43

[Intel-gfx] [PATCH v4 05/22] drm/i915/mtl: Add C10 phy programming for HDMI

2023-02-24 Thread Mika Kahola
Sripada Signed-off-by: Clint Taylor Signed-off-by: Mika Kahola Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 576 +- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 1 + .../gpu/drm/i915/display/intel_cx0_phy_regs.h | 2 + drivers/gpu/drm/i915/

[Intel-gfx] [PATCH v4 08/22] drm/i915/mtl: C20 PLL programming

2023-02-24 Thread Mika Kahola
pll programming (Gustavo) Clear calibration banks for both lanes (Gustavo) Signed-off-by: José Roberto de Souza Signed-off-by: Mika Kahola Signed-off-by: Bhanuprakash Modem Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 266 +++--- .../gpu/drm/i915

[Intel-gfx] [PATCH v4 06/22] drm/i915/mtl: Add vswing programming for C10 phys

2023-02-24 Thread Mika Kahola
o times of level 1 preemphasis 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 | 140 -

[Intel-gfx] [PATCH v4 07/22] drm/i915/mtl: Add support for PM DEMAND

2023-02-24 Thread Mika Kahola
Display14 introduces a new way to instruct the PUnit with power and bandwidth requirements of DE. Add the functionality to program the registers and handle waits using interrupts. The current wait time for timeouts is programmed for 10 msecs to factor in the worst case scenarios. Changes made to us

[Intel-gfx] [PATCH v4 10/22] drm/i915/mtl: Dump C20 pll hw state

2023-02-24 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 v4 11/22] drm/i915/mtl: C20 port clock calculation

2023-02-24 Thread Mika Kahola
Calculate port clock with C20 phy. v2: Initialize parameters Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 64 +++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 + drivers/gpu/drm/i915/display/intel_ddi.c | 4 +- 3 files changed, 65

[Intel-gfx] [PATCH v4 09/22] drm/i915/mtl: C20 HW readout

2023-02-24 Thread Mika Kahola
based on changes in BSpec consolidated table v3: Rename intel_c20_read() to intel_c20_sram_read() (Gustavo) Use context and correct MPLLA reg bit to select if MPLLA is in use or not (Gustavo) Signed-off-by: Mika Kahola Signed-off-by: Clint Taylor --- drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH v4 12/22] drm/i915/mtl: C20 HDMI state calculations

2023-02-24 Thread Mika Kahola
Add C20 HDMI state calculations and put HDMI table definitions in use. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display

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

2023-02-24 Thread Mika Kahola
DP1.4 and DP20 voltage swing sequence for C20 phy. Bspec: 65449, 67636, 67610 v2: DP2.0 Tx Eq tables has been updated in BSpec. Update also the driver code as per BSpec 65449 Signed-off-by: Mika Kahola Signed-off-by: Radhakrishna Sripada Signed-off-by: Clint Taylor --- .../gpu/drm/i915

[Intel-gfx] [PATCH v4 15/22] drm/i915/mtl: Enabling/disabling sequence Thunderbolt pll

2023-02-24 Thread Mika Kahola
Enabling and disabling sequence for Thunderbolt PLL. v2: Use __intel_de_wait_for_register() instead of __intel_wait_for_register() (Jani) Use '0' instead of ~XELPDP_TBT_CLOCK_ACK (Gustavo) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_p

[Intel-gfx] [PATCH v4 17/22] drm/i915/mtl: Enable TC ports

2023-02-24 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 v4 16/22] drm/i915/mtl: Readout Thunderbolt HW state

2023-02-24 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 v4 14/22] drm/i915/mtl: For DP2.0 10G and 20G rates use MPLLA

2023-02-24 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 | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH v4 18/22] drm/i915/mtl: MTL PICA hotplug detection

2023-02-24 Thread Mika Kahola
provides a dedicated HPD control register for each supported port, so we loop over ports ourselves instead of using intel_hpd_hotplug_enables() or intel_get_hpd_pins(). BSpec: 49305, 55726, 65107, 65300 Signed-off-by: Mika Kahola Signed-off-by: Madhumitha Tolakanahalli Pradeep Signed-off-by

[Intel-gfx] [PATCH v4 20/22] drm/i915/mtl: Power up TCSS

2023-02-24 Thread Mika Kahola
tcss power request with correct parameter. v3: Use de variant for register wait (Jani) Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_tc.c | 117 ++- 2 files changed, 114 insertions(+), 5 deletions

[Intel-gfx] [PATCH v4 19/22] drm/i915/mtl: Define mask for DDI AUX interrupts

2023-02-24 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 v4 22/22] drm/i915/mtl: Pin assignment for TypeC

2023-02-24 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 Cc: Mika Kahola Cc: Imre Deak Cc: Matt Roper Signed-off-by: Anusha Srivatsa Signed-off-by

[Intel-gfx] [PATCH v4 21/22] drm/i915/mtl: TypeC HPD live status query

2023-02-24 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] 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] 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 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 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 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/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/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] 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 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/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] 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 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 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 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-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] 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] 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/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: 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 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 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 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 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

[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

[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: 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] 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 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 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 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 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 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 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 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] 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

[Intel-gfx] [PATCH] drm/i915: Add check for null dereference

2022-09-27 Thread Mika Kahola
fixed_mode in intel_edp_add_properties() function may be NULL which is used later on in the function. Return early, in case of fixed_mode is NULL to avoid NULL dereference. Discovered by klockwork static analysis. Cc: Ville Syrjälä Cc: Jani Nikula Signed-off-by: Mika Kahola --- drivers/gpu

[Intel-gfx] [PATCH 0/5] drm/i915/mtl: Add C10 support

2022-09-29 Thread Mika Kahola
PHY programming support for message bus and phy programming. Updates for HDMI programming and vswing tables. Radhakrishna Sripada (5): drm/i915/mtl: Add Support for C10,C20 PHY Message Bus drm/i915/mtl: Add PLL programming support for C10 phy drm/i915/mtl: Add support for C10 phy programming

[Intel-gfx] [PATCH 3/5] drm/i915/mtl: Add support for C10 phy programming

2022-09-29 Thread Mika Kahola
From: Radhakrishna Sripada Add sequences for C10 phy enable/disable phy lane reset, powerdown change sequence and phy lane programming. Bspec: 64539, 67636, 65451, 65450, 64568 Cc: Imre Deak Cc: Mika Kahola Cc: Uma Shankar Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola (v9

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

2022-09-29 Thread Mika Kahola
From: Radhakrishna Sripada C10 phys uses direct mapping internally for voltage and pre-emphasis levels. Program the levels directly to the fields in the VDR Registers. Bspec: 65449 Cc: Imre Deak Cc: Mika Kahola Cc: Uma Shankar Signed-off-by: Clint Taylor Signed-off-by: Radhakrishna Sripada

[Intel-gfx] [PATCH 2/5] drm/i915/mtl: Add PLL programming support for C10 phy

2022-09-29 Thread Mika Kahola
signals. Note: PHY lane 0 is always used for PLL programming. Bspec: 64568, 64539, 67636 Cc: Mika Kahola Cc: Imre Deak Cc: Uma Shankar Signed-off-by: Radhakrishna Sripada --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 516 +- drivers/gpu/drm/i915/display/intel_cx0_phy.h

[Intel-gfx] [PATCH 4/5] drm/i915/mtl: Add C10 phy programming for HDMI

2022-09-29 Thread Mika Kahola
lace this patch with something more general purpose. Bspec: 64568 Cc: Imre Deak Cc: Mika Kahola Cc: Uma Shankar Signed-off-by: Radhakrishna Sripada --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 168 ++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 + drivers/

[Intel-gfx] [PATCH 0/5] drm/i915/mtl: Add C10 phy support

2022-09-29 Thread Mika Kahola
PHY programming support for message bus and phy programming. Updates for HDMI programming and vswing tables. Radhakrishna Sripada (5): drm/i915/mtl: Add Support for C10,C20 PHY Message Bus drm/i915/mtl: Add PLL programming support for C10 phy drm/i915/mtl: Add support for C10 phy programming

[Intel-gfx] [PATCH 2/5] drm/i915/mtl: Add PLL programming support for C10 phy

2022-09-29 Thread Mika Kahola
signals. Note: PHY lane 0 is always used for PLL programming. Bspec: 64568, 64539, 67636 Cc: Mika Kahola Cc: Imre Deak Cc: Uma Shankar Signed-off-by: Radhakrishna Sripada --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 516 +- drivers/gpu/drm/i915/display/intel_cx0_phy.h

[Intel-gfx] [PATCH 3/5] drm/i915/mtl: Add support for C10 phy programming

2022-09-29 Thread Mika Kahola
From: Radhakrishna Sripada Add sequences for C10 phy enable/disable phy lane reset, powerdown change sequence and phy lane programming. Bspec: 64539, 67636, 65451, 65450, 64568 Cc: Imre Deak Cc: Mika Kahola Cc: Uma Shankar Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola (v9

[Intel-gfx] [PATCH 4/5] drm/i915/mtl: Add C10 phy programming for HDMI

2022-09-29 Thread Mika Kahola
lace this patch with something more general purpose. Bspec: 64568 Cc: Imre Deak Cc: Mika Kahola Cc: Uma Shankar Signed-off-by: Radhakrishna Sripada --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 168 ++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 + drivers/

[Intel-gfx] [PATCH 1/5] drm/i915/mtl: Add Support for C10, C20 PHY Message Bus

2022-09-29 Thread Mika Kahola
From: Radhakrishna Sripada XELPDP has C10 and C20 phys from Synopsys to drive displays. Each phy has a dedicated PIPE 5.2 Message bus for configuration. This message bus is used to configure the phy internal registers. Bspec: 64599, 65100, 65101, 67610, 67636 Cc: Mika Kahola Cc: Imre Deak Cc

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

2022-09-29 Thread Mika Kahola
From: Radhakrishna Sripada C10 phys uses direct mapping internally for voltage and pre-emphasis levels. Program the levels directly to the fields in the VDR Registers. Bspec: 65449 Cc: Imre Deak Cc: Mika Kahola Cc: Uma Shankar Signed-off-by: Clint Taylor Signed-off-by: Radhakrishna Sripada

[Intel-gfx] [PATCH] drm/i915: Ensure dbuf state is defined

2022-10-05 Thread Mika Kahola
Ensure that the new dbuf state is not null. If so, throw an error, discontinue to allocate ddb and return. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/skl_watermark.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers

[Intel-gfx] [PATCH 01/20] drm/i915/mtl: Initial DDI port setup

2022-10-14 Thread Mika Kahola
From: Clint Taylor Initialize c10 combo phy ports. TODO Type-C ports. Cc: Radhakrishna Sripada Signed-off-by: Clint Taylor --- drivers/gpu/drm/i915/display/intel_display.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b

[Intel-gfx] [PATCH 00/20] drm/i915/mtl: Add C10 and C20 phy support

2022-10-14 Thread Mika Kahola
PHY programming support for C10 and C20 Type-C chips. This series includes fixes for previously sent C10 series. Signed-off-by: Mika Kahola Anusha Srivatsa (1): drm/i915/mtl: Pin assignment for TypeC Clint Taylor (1): drm/i915/mtl: Initial DDI port setup Gustavo Sousa (1): drm/i915/mtl

[Intel-gfx] [PATCH 09/20] drm/i915/mtl: C20 HW readout

2022-10-14 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 --- drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 07/20] drm/i915/mtl: Add support for PM DEMAND

2022-10-14 Thread Mika Kahola
Display14 introduces a new way to instruct the PUnit with power and bandwidth requirements of DE. Add the functionality to program the registers and handle waits using interrupts. The current wait time for timeouts is programmed for 10 msecs to factor in the worst case scenarios. Changes made to us

[Intel-gfx] [PATCH 03/20] drm/i915/mtl: Create separate reg file for PICA registers

2022-10-14 Thread Mika Kahola
Create a separate file to store registers for PICA chips C10 and C20. Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola --- .../gpu/drm/i915/display/intel_cx0_reg_defs.h | 136 ++ 1 file changed, 136 insertions(+) create mode 100644 drivers/gpu/drm/i915/display

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

2022-10-14 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 20/20] drm/i915/mtl: Pin assignment for TypeC

2022-10-14 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 Cc: Mika Kahola Cc: Imre Deak Cc: Matt Roper Signed-off-by: Anusha Srivatsa Signed-off-by

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

2022-10-14 Thread Mika Kahola
() with port instead of phy (Lucas) Cc: Mika Kahola Cc: Imre Deak Cc: Uma Shankar Signed-off-by: Radhakrishna Sripada Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/Makefile |1 + drivers/gpu/drm/i915/display/intel_cx0_phy.c | 1090 + drivers/gpu/drm

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

2022-10-14 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 | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 05/20] drm/i915/mtl: Add C10 phy programming for HDMI

2022-10-14 Thread Mika Kahola
lace this patch with something more general purpose. Bspec: 64568 Cc: Imre Deak Cc: Mika Kahola Cc: Uma Shankar Signed-off-by: Radhakrishna Sripada --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 168 +- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 1 + .../

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

2022-10-14 Thread Mika Kahola
Enabling and disabling sequence for Thunderbolt PLL. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 137 ++- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 7 +- drivers/gpu/drm/i915/display/intel_ddi.c | 4 +- 3 files changed, 139

[Intel-gfx] [PATCH 15/20] drm/i915/mtl: Readout Thunderbolt HW state

2022-10-14 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 02/20] drm/i915/mtl: Add DP rates

2022-10-14 Thread Mika Kahola
Add DP rates for Meteorlake. 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 b/drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 10/20] drm/i915/mtl: C20 port clock calculation

2022-10-14 Thread Mika Kahola
Calculate port clock with C20 phy. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 32 ++-- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 ++ drivers/gpu/drm/i915/display/intel_ddi.c | 4 +-- 3 files changed, 33 insertions(+), 5 deletions

[Intel-gfx] [PATCH 06/20] drm/i915/mtl: Add vswing programming for C10 phys

2022-10-14 Thread Mika Kahola
: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 143 -- drivers/gpu/drm/i915/display/intel_cx0_phy.h | 2 + .../gpu/drm/i915/display/intel_cx0_reg_defs.h | 6 + drivers/gpu/drm/i915/display/intel_ddi.c | 4 +- .../drm/i915/display/intel_ddi_buf_trans.c

[Intel-gfx] [PATCH 19/20] drm/i915/mtl: Power up TCSS

2022-10-14 Thread Mika Kahola
-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_tc.c | 115 ++- 2 files changed, 112 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display

[Intel-gfx] [PATCH 11/20] drm/i915/mtl: C20 HDMI state calculations

2022-10-14 Thread Mika Kahola
Add C20 HDMI state calculations and put HDMI table definitions in use. Signed-off-by: Mika Kahola --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display

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

2022-10-14 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 17/20] drm/i915/mtl: MTL PICA hotplug detection

2022-10-14 Thread Mika Kahola
provides a dedicated HPD control register for each supported port, so we loop over ports ourselves instead of using intel_hpd_hotplug_enables() or intel_get_hpd_pins(). BSpec: 49305, 55726, 65107, 65300 Signed-off-by: Mika Kahola Signed-off-by: Madhumitha Tolakanahalli Pradeep Signed-off-by

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

2022-10-14 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: Radhakrishna Sripada --- drivers/gpu/drm/i915/display/intel_cx0_phy.c | 31 - .../gpu/drm/i915/display/intel_cx0_reg_defs.h | 4 +++ .../drm/i915/display

[Intel-gfx] [PATCH 08/20] drm/i915/mtl: C20 PLL programming

2022-10-14 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

[Intel-gfx] [PATCH v5 00/22] drm/i915/mtl: Add C10 and C20 phy support

2023-03-16 Thread Mika Kahola
interrupts Imre Deak (1): drm/i915/mtl: TypeC HPD live status query Mika Kahola (15): drm/i915/mtl: Add DP rates drm/i915/mtl: Create separate reg file for PICA registers drm/i915/mtl: Add support for PM DEMAND drm/i915/mtl: C20 PLL programming drm/i915/mtl: C20 HW readout drm/i915/mtl

<    2   3   4   5   6   7   8   9   10   >