Anusha Srivatsa
e2ca757b6f
drm/i915/adlp: Add PIPE_MISC2 programming
...
When scalers are enabled, we need to program underrun
bubble counter to 0x50 to avoid Soft Pipe A underruns.
Make sure other bits dont get overwritten.
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Clint Taylor <clinton.a.taylor@intel.com >
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-17-lucas.demarchi@intel.com
2021-05-19 23:59:34 -07:00
Imre Deak
414002f1bb
drm/i915/adl_p: Program DP/HDMI link rate to DDI_BUF_CTL
...
On ADL_P besides programming the PLL accordingly the DP/HDMI link rate
should be also programmed to the DDI_BUF_CTL register, do that.
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-16-lucas.demarchi@intel.com
2021-05-19 23:59:32 -07:00
Anusha Srivatsa
226c83263b
drm/i915/adl_p: Add PLL Support
...
The clocks in ALD_P is similar to that of TGL.
The combo PLLs use the same DPLL0, DPLL1 and TBT_PLL.
This patch adds the helper function intel_mg_pll_enable_reg()
which is similar to intel_combo_pll_enable_reg() for being lookup
place for PLL_ENABLE register in combo phy cases.
Bspec: 55409,55316
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Clinton Taylor <clinton.a.taylor@intel.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-15-lucas.demarchi@intel.com
2021-05-19 23:59:31 -07:00
Mika Kahola
ca96288226
drm/i915/adl_p: Define and use ADL-P specific DP translation tables
...
Define and use DP voltage swing and pre-emphasis translation tables
for ADL-P.
v2:
- Update according to recent bspec updates; there are now separate
tables for RBR/HBR and HBR2/HBR3. (Anusha)
BSpec: 54956
Cc: Imre Deak <imre.deak@intel.com >
Signed-off-by: Mika Kahola <mika.kahola@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-14-lucas.demarchi@intel.com
2021-05-19 23:59:29 -07:00
Gwan-gyeong Mun
2d77657972
drm/i915/display: Add PSR interrupt error check function
...
In order to reuse code of PSR interrupt error check on other PSR functions,
it adds psr_interrupt_error_check() function.
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-13-lucas.demarchi@intel.com
2021-05-19 23:59:28 -07:00
Gwan-gyeong Mun
8aa2d2ef46
drm/i915/display: Replace dc3co_enabled with dc3co_exitline on intel_psr struct
...
It replaces dc3co_enabled with dc3co_exitline on intel_psr struct. And
it saves dc3co_exitline, not dc3co_enabled, so we can use dc3co_exitline
without intel_crtc_state on other psr internal function like as
intel_psr_enable_source().
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: José Roberto de Souza <jose.souza@intel.com >
Cc: Anshuman Gupta <anshuman.gupta@intel.com >
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-12-lucas.demarchi@intel.com
2021-05-19 23:59:27 -07:00
Mika Kahola
510b281488
drm/i915/adl_p: Tx escape clock with DSI
...
Today when the DSI controller is paired with the Combo-PHY it
uses the high-speed (HS) Word clock for its low power (LP)
transmit PPI communication to the DPHY. The interface signaling
only changes state at an Escape clock frequency (i.e. its
effectively running on a virtual Tx Escape clock that is controlled
by counters w/in the controller), but all the interface flops are
running off the HS clock.
This has the following drawbacks:
* It is a deviation from the PPI spec which assumes signaling is
running on a physical Escape clock
* The PV timings are over constrained (HS timed to 312.5MHz vs.
an Escape clock of 20MHz max)
This feature is proposing to change the LP Tx communication between
the controller and the DPHY from a virtual Tx Escape clock to a physical
clock.
To do this we need to program two "M" divisors. One for the usual
DSI_ESC_CLK_DIV and DPHY_ESC_CLK_DIV register and one for MIPIO_DWORD8.
For DSI_ESC_CLK_DIV and DPHY_ESC_CLK_DIV registers the "M" is calculated
as following
Nt = ceil(f_link/160) (theoretical word clock)
Nact = max[3, Nt + (Nt + 1)%2] (actual word clock)
M = Nact * 8
For MIPIO_DWORD8 register, the divisor "M" is calculated as following
M = (Nact - 1)/2
BSpec: 55171
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Mika Kahola <mika.kahola@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-11-lucas.demarchi@intel.com
2021-05-19 23:59:25 -07:00
Vandita Kulkarni
f4dc008632
drm/i915/adl_p: MBUS programming
...
Update MBUS_CTL register if the 2 mbus can be joined as per the current
DDB allocation and active pipes, also update hashing mode and pipe
select bits as per the sequence mentioned in the bspec.
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-10-lucas.demarchi@intel.com
2021-05-19 23:59:23 -07:00
Ville Syrjälä
835c176cb1
drm/i915: Introduce MBUS relative dbuf offsets
...
The dbuf slices are going to be split across several MBUS units.
The actual dbuf programming will use offsets relative to the
MBUS unit. To accommodate that we shall store the MBUS relative
offsets into the dbuf_state->ddb[] and crtc_state->plane_ddb*[].
For crtc_state->wm.skl.ddb however we want to stick to global
offsets as we use this to sanity check that the ddb allocations
don't overlap between pipes.
Cc: Clint Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-9-lucas.demarchi@intel.com
2021-05-19 23:59:22 -07:00
Vandita Kulkarni
247bdac958
drm/i915/adl_p: Add ddb allocation support
...
On adlp the two mbuses have two display pipes and
two DBUFS, Pipe A and D on Mbus1 and Pipe B and C on
Mbus2. The Mbus can be joined and all the DBUFS can be
used on Pipe A or B.
Bspec: 49255
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-8-lucas.demarchi@intel.com
2021-05-19 23:59:20 -07:00
José Roberto de Souza
14076e4645
drm/i915/adl_p: Don't config MBUS and DBUF during display initialization
...
Alderlake-P don't have programing sequences for MBUS or DBUF during
display initializaiton, instead it requires programing to those
registers during modeset because it to depend on the pipes left
enabled.
Bspec: 49213
Cc: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-7-lucas.demarchi@intel.com
2021-05-19 23:59:19 -07:00
José Roberto de Souza
55ce306c2a
drm/i915/adl_p: Implement TC sequences
...
ADL-P have basically the same TC connection and disconnection
sequences as ICL and TGL, the major difference is the new registers.
So here adding functions without the icl prefix in the name and
making the new functions call the platform specific function to access
the correct register.
v2:
- Retain DDI TC PHY ownership flag during modesetting.
BSpec: 55480
Cc: Imre Deak <imre.deak@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-6-lucas.demarchi@intel.com
2021-05-19 23:59:18 -07:00
Anusha Srivatsa
93a6497188
drm/i915/adl_p: Setup ports/phys
...
The SoC has 6 DDI ports(DDI A,DDI B and DDI TC1-4.
The first two are connected to combo phys while
the rest are connected to TC phys.
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Clinton Taylor <clinton.a.taylor@intel.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Swathi Dhanavanthri <swathi.dhanavanthri@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-5-lucas.demarchi@intel.com
2021-05-19 23:59:16 -07:00
Matt Roper
7959ffe576
drm/i915/adl_p: Add dedicated SAGV watermarks
...
XE_LPD reduces the number of regular watermark latency levels from 8
to 6 on non-dgfx platforms. However the hardware also adds a special
purpose SAGV wateramrk (and an accompanying transition watermark) that
will be used by the hardware in place of the level 0 values during SAGV
transitions.
Bspec: 49325, 49326, 50419
Cc: Matt Atwood <matthew.s.atwood@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-4-lucas.demarchi@intel.com
2021-05-19 23:59:14 -07:00
Vandita Kulkarni
c33ebdb717
drm/i915/xelpd: Add rc_qp_table for rcparams calculation
...
Add the qp table for 444 formats, for 8bpc, 10bpc and 12bpc, as given by
the VESA C model for DSC 1.1
v2:
- Add include guard to header (Jani)
- Move the big tables to a .c file (Chris, Jani, Lucas)
v3:
- Make tables 'static const' and add lookup functions to index into
them. (Jani)
v3.1:
- Include missing .h file.
Cc: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-3-lucas.demarchi@intel.com
2021-05-19 23:59:12 -07:00
Vandita Kulkarni
db514cac08
drm/i915/xelpd: Calculate VDSC RC parameters
...
Add methods to calculate rc parameters for all bpps, against the fixed
arrays that we already have for 8,10,12 valid o/p bpps, to cover RGB 444
formats. Our hw doesn't support YUV compression yet. The calculations
used here are from VESA C model for DSC 1.1
v2:
- Checkpatch fixes
Cc: Manasi Navare <manasi.d.navare@intel.com >
Cc: Juha-Pekka Heikkil <juha-pekka.heikkila@intel.com >
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210519000625.3184321-2-lucas.demarchi@intel.com
2021-05-19 23:59:11 -07:00
Anusha Srivatsa
32f9402d56
drm/i915/dmc: s/intel_csr.c/intel_dmc.c and s/intel_csr.h/intel_dmc.h
...
Finally, rename the header and source file from csr to dmc.
v2: Add file rename in Documentation.
- Place headers in orders. (Jani)
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-6-anusha.srivatsa@intel.com
2021-05-19 18:47:04 -07:00
Anusha Srivatsa
74ff150d98
drm/i915/dmc: Rename functions names having "csr"
...
No functional change.
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-5-anusha.srivatsa@intel.com
2021-05-19 18:47:02 -07:00
Anusha Srivatsa
0633cdcbaa
drm/i915/dmc: Rename macro names containing csr
...
Rename all occurences of CSR_* with DMC_*
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-4-anusha.srivatsa@intel.com
2021-05-19 18:47:00 -07:00
Anusha Srivatsa
ec2b1485a0
drm/i915/dmc: s/HAS_CSR/HAS_DMC
...
No functional change.
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-3-anusha.srivatsa@intel.com
2021-05-19 18:46:58 -07:00
Anusha Srivatsa
c24760cf42
drm/i915/dmc: s/intel_csr/intel_dmc
...
No functional change.
v2: Chchpatch fixes.
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210518213444.11420-2-anusha.srivatsa@intel.com
2021-05-19 18:46:56 -07:00
José Roberto de Souza
ec279384c6
drm/i915: Initialize err in remap_io_sg()
...
If the do while loop breaks in 'if (!sg_dma_len(sgl))' in the first
iteration, err is uninitialized causing a wrong call to zap_vma_ptes().
But that is impossible to happen as a scatterlist must have at least
one valid segment.
Anyways to avoid more reports from static checkers initializing ret
here.
Fixes: b12d691ea5 ("i915: fix remap_io_sg to verify the pgprot")
Reviewed-by: Christoph Hellwig <hch@lst.de >
Cc: Christoph Hellwig <hch@lst.de >
Signed-off-by: James Ausmus <james.ausmus@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210517202117.179303-1-jose.souza@intel.com
2021-05-18 11:00:07 -07:00
Simon Rettberg
929b734ad3
drm/i915/gt: Disable HiZ Raw Stall Optimization on broken gen7
...
When resetting CACHE_MODE registers, don't enable HiZ Raw Stall
Optimization on Ivybridge GT1 and Baytrail, as it causes severe glitches
when rendering any kind of 3D accelerated content.
This optimization is disabled on these platforms by default according to
official documentation from 01.org.
Fixes: ef99a60ffd ("drm/i915/gt: Clear CACHE_MODE prior to clearing residuals")
BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3081
BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3404
BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3071
Reviewed-By: Manuel Bentele <development@manuel-bentele.de >
Signed-off-by: Simon Rettberg <simon.rettberg@rz.uni-freiburg.de >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
[Rodrigo removed invalid Fixes line]
Link: https://patchwork.freedesktop.org/patch/msgid/20210426161124.2b7fd708@dellnichtsogutkiste
2021-05-18 08:56:53 -04:00
Rodrigo Vivi
d22fe808f9
Merge drm/drm-next into drm-intel-next
...
Time to get back in sync...
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2021-05-17 17:48:02 -04:00
José Roberto de Souza
1a7910368c
drm/i915/adl_p: Disable CCS on a-step (Wa_22011186057)
...
Buffer compression is not usable in A stepping.
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Cc: Clinton A Taylor <clinton.a.taylor@intel.com >
Cc: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-20-matthew.d.roper@intel.com
2021-05-14 19:48:38 -07:00
José Roberto de Souza
2680bea758
drm/i915/display/adl_p: Implement Wa_22011320316
...
Implementation details are in the HSD 22011320316, requiring CD clock
to be at least 307MHz to make DC states to work.
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-19-matthew.d.roper@intel.com
2021-05-14 19:48:38 -07:00
José Roberto de Souza
a8a56da71a
drm/i915/adl_p: Implement Wa_22011091694
...
Adding a new hook to ADL-P just to avoid another platform check in
gen12lp_init_clock_gating() but also open to it.
BSpec: 54369
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-18-matthew.d.roper@intel.com
2021-05-14 19:48:38 -07:00
José Roberto de Souza
b2c6eaf27b
drm/i915/adl_p: Add IPs stepping mapping
...
This will allow us to better implement workarounds.
Cc: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-17-matthew.d.roper@intel.com
2021-05-14 19:48:38 -07:00
Animesh Manna
d961eb20ad
drm/i915/bigjoiner: atomic commit changes for uncompressed joiner
...
Respective bit for master or slave to be set for uncompressed
bigjoiner in dss_ctl1 register.
Cc: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-16-matthew.d.roper@intel.com
2021-05-14 19:48:38 -07:00
Animesh Manna
e6f9bb62fb
drm/i915/bigjoiner: Avoid dsc_compute_config for uncompressed bigjoiner
...
For uncompressed big joiner DSC engine will not be used so will avoid
compute config of DSC.
Cc: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-15-matthew.d.roper@intel.com
2021-05-14 19:48:38 -07:00
Animesh Manna
ca844ea7e1
drm/i915/bigjoiner: Mode validation with uncompressed pipe joiner
...
No need for checking dsc flag for uncompressed pipe joiner mode
validation.
Cc: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-14-matthew.d.roper@intel.com
2021-05-14 19:48:38 -07:00
Mika Kahola
03bca4a8c1
drm/i915/adl_p: Enable/disable loadgen sharing
...
Disable loadgen sharing for DP link rate 1.62 GHz and HDMI 5.94 GHz.
For all other modes, we can enable loadgen sharing feature.
BSpec: 55359
Cc: Imre Deak <imre.deak@intel.com >
Signed-off-by: Mika Kahola <mika.kahola@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-13-matthew.d.roper@intel.com
2021-05-14 19:48:12 -07:00
Ville Syrjälä
de1dc033f6
drm/i915: Move intel_modeset_all_pipes()
...
Move intel_modeset_all_pipes() to a central place so that we can
use it elsewhere as well. No functional changes.
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-12-matthew.d.roper@intel.com
2021-05-14 19:47:38 -07:00
José Roberto de Souza
57ed0dfb40
drm/i915/adl_p: Enable modular fia
...
Alderlake P have modular FIA like TGL but it is always modular in all
skus, not like TGL that we had to read a register to check if it is
monolithic or modular.
BSpec: 55480
BSpec: 50572
Cc: Imre Deak <imre.deak@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-11-matthew.d.roper@intel.com
2021-05-14 19:47:38 -07:00
José Roberto de Souza
f53979d68a
drm/i915/display/tc: Rename safe_mode functions ownership
...
When DP_PHY_MODE_STATUS_NOT_SAFE is set, it means that display
has the control over the TC phy.
The "not safe" naming is confusing using ownership make it easier
to read also future platforms will have a new register that does the
same job as DP_PHY_MODE_STATUS_NOT_SAFE but with the onwership name.
BSpec: 49294
Cc: Imre Deak <imre.deak@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-10-matthew.d.roper@intel.com
2021-05-14 19:47:38 -07:00
Anusha Srivatsa
626426ff9c
drm/i915/adl_p: Add cdclk support for ADL-P
...
ADL-P has 3 possible refclk frequencies: 19.2MHz,
24MHz and 38.4MHz
While we're at it, remove the drm_WARNs. They've never actually helped
us catch any problems, but it's very easy to forget to update them
properly for new platforms.
BSpec: 55409, 49208
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Clinton Taylor <clinton.a.taylor@intel.com >
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-9-matthew.d.roper@intel.com
2021-05-14 19:47:38 -07:00
Matt Roper
47d263a6d8
drm/i915/adl_p: Extend PLANE_WM bits for blocks & lines
...
ADL-P further extends the bits in PLANE_WM that represent blocks and
lines; we need to extend our masks accordingly. Since these bits are
reserved and MBZ on earlier platforms, it's safe to use the larger
bitmask on all platforms.
Bspec: 50419
Cc: Matt Atwood <matthew.s.atwood@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-8-matthew.d.roper@intel.com
2021-05-14 19:47:38 -07:00
José Roberto de Souza
eeb63c5464
drm/i915/xelpd: Provide port/phy mapping for vbt
...
This will allow proper DDI initialization based on vbt information.
Cc: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-7-matthew.d.roper@intel.com
2021-05-14 19:47:38 -07:00
Vandita Kulkarni
5a6d866f8e
drm/i915: Get slice height before computing rc params
...
We need slice height to calculate few RC parameters
hence assign slice height first.
Cc: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-6-matthew.d.roper@intel.com
2021-05-14 19:47:38 -07:00
Vandita Kulkarni
831d5aa96c
drm/i915/xelpd: Support DP1.4 compression BPPs
...
Support compression BPPs from bpc to uncompressed BPP -1.
So far we have 8,10,12 as valid compressed BPPS now the
support is extended.
Cc: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-5-matthew.d.roper@intel.com
2021-05-14 19:47:31 -07:00
Vandita Kulkarni
6ee9dea52a
drm/i915/display/dsc: Refactor intel_dp_dsc_compute_bpp
...
Move the platform specific max bpc calculation into
intel_dp_dsc_compute_bpp function
Cc: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-4-matthew.d.roper@intel.com
2021-05-14 19:46:08 -07:00
Matt Roper
1003cee29f
drm/i915/xelpd: Increase maximum watermark lines to 255
...
XE_LPD continues to use the same "skylake-style" watermark
programming as other recent platforms. The only change to the watermark
calculations compared to Display12 is that XE_LPD now allows a
maximum of 255 lines vs the old limit of 31.
Due to the larger possible lines value, the corresponding bits
representing the value in PLANE_WM are also extended, so make sure we
read/write enough bits. Let's also take this opportunity to switch over
to the REG_FIELD notation.
Bspec: 49325
Bspec: 50419
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Anshuman Gupta <anshuman.gupta@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-3-matthew.d.roper@intel.com
2021-05-14 19:46:07 -07:00
Matt Roper
ed2615a855
drm/i915/xelpd: Handle new location of outputs D and E
...
The DDI naming template for display version 12 went A-C, TC1-TC6. With
XE_LPD, that naming scheme for DDI's has now changed to A-E, TC1-TC4.
The XE_LPD design keeps the register offsets and bitfields relating to
the TC outputs in the same location they were previously. The new "D"
and "E" outputs now take the locations that were previously used by TC5
and TC6 outputs, or what we would have considered to be outputs "H" and
"I" under the legacy lettering scheme.
For the most part everything will just work as long as we initialize the
output with the proper 'enum port' value. However we do need to take
care to pick the correct AUX channel when parsing the VBT (e.g., a
reference to 'AUX D' is actually asking us to use the 8th aux channel,
not the fourth). We should also make sure that our encoders and aux
channels are named appropriately so that it's easier to correlate driver
debug messages with the bspec instructions.
v2:
- Update handling of TGL_TRANS_CLK_SEL_PORT. (Jose)
v3:
- Add hpd_pin to handle outputs D and E (Jose)
- Fixed conversion of BIOS port to aux ch for TC ports (Jose)
Cc: José Roberto de Souza <jose.souza@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210514153711.2359617-2-matthew.d.roper@intel.com
2021-05-14 19:46:06 -07:00
Umesh Nerlige Ramappa
73c1bf0f3e
drm/i915/perf: Enable OA formats for ADL_P
...
Enable relevant OA formats for ADL_P.
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com >
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-8-matthew.d.roper@intel.com
2021-05-12 16:56:59 -07:00
Clinton Taylor
83c81a0a16
drm/i915/adl_p: Add PCH support
...
Add ADP-P PCH device ID and assign as ADL PCH if found. Previously we
would assign the DDC pin map based on the PCH, but it can also change
based on the CPU. From Bspec 20124: "The physical port to pin pair
mapping are defined in the Bspec per PCH. Mapping can further change
based on CPU Si used as CPU and PCH can be mixed and matched".
Bspec: 20124
Cc: Matt Atwood <matthew.s.atwood@intel.com >
Cc: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Clinton Taylor <Clinton.A.Taylor@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-7-matthew.d.roper@intel.com
2021-05-12 16:56:56 -07:00
Matt Roper
0e53fb847c
drm/i915/xelpd: Add Wa_14011503030
...
Cc: Aditya Swarup <aditya.swarup@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-6-matthew.d.roper@intel.com
2021-05-12 16:56:52 -07:00
Matt Roper
0788abdef6
drm/i915/xelpd: Required bandwidth increases when VT-d is active
...
If VT-d is active, the memory bandwidth usage of the display is 5%
higher. Take this into account when determining whether we can support
a display configuration.
Bspec: 64631
Cc: Matt Atwood <matthew.s.atwood@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-5-matthew.d.roper@intel.com
2021-05-12 16:56:49 -07:00
Matt Roper
a6922f4a01
drm/i915/xelpd: Add XE_LPD power wells
...
Aside from the hardware-managed PG0, XE_LPD has power wells 1-2 and
A-D. These power wells should be enabled/disabled according to the
following dependency tree (enable top to bottom, disable bottom to top):
PG0
|
--PG1--
/ \
PGA --PG2--
/ | \
PGB PGC PGD
PWR_WELL_CTL follows the general ICL/TGL design and places PG A-D in the
bits that would have been PG 6-9 under the old scheme.
PWR_WELL_CTL_{DDI,AUX}'s bit indexing for DDI's A-C and TC1 is the same
as TGL, but DDI-D is placed at index 7 (bits 14 & 15).
v2:
- Squash in LPSP status patch from Uma since it's also a
powerwell-specific change.
Bspec: 49233
Bspec: 49503
Bspec: 49504
Bspec: 49505
Bspec: 49296
Bspec: 50090
Bspec: 53920
Cc: Anshuman Gupta <anshuman.gupta@intel.com >
Cc: Imre Deak <imre.deak@intel.com >
Cc: José Roberto de Souza <jose.souza@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Signed-off-by: Uma Shankar <uma.shankar@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-4-matthew.d.roper@intel.com
2021-05-12 16:56:45 -07:00
Matt Roper
1649a4cc5c
drm/i915/xelpd: Define plane capabilities
...
XE_LPD's plane support is identical to RKL and ADL-S --- 5 universal + 1
cursor with NV12 UV support on planes 1-3 and NV12 Y support on planes
4-5.
v2:
- Drop the extra 90/270 rotation check in skl_plane_check_fb(); the DRM
property code will already prevent userspace from passing us values
that weren't advertised. (Lucas)
Bspec: 53657
Bspec: 49251
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-3-matthew.d.roper@intel.com
2021-05-12 16:56:42 -07:00
Matt Roper
20fe778fde
drm/i915/xelpd: Handle proper AUX interrupt bits
...
XE_LPD has new AUX interrupt bits for DDI-D and DDI-E that take the
spots that were used by TC5/TC6 on Display12 platforms.
While we're at it, let's convert the bit definitions for all TGL+ aux
bits over to the modern REG_BIT() notation.
v2:
- Maintain bit order rather than logical order. (Lucas)
- Convert surrounding code to REG_BIT() notation. (Lucas)
Bspec: 50064
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210512042144.2089071-2-matthew.d.roper@intel.com
2021-05-12 16:56:38 -07:00