Jani Nikula
2b1245f3ec
drm/i915/mst: pass intel_dp around in mst stream helpers
...
All of the functions in question operate on the primary encoder, and
more specifically the primary intel_dp, so pass it around instead of the
encoder for less ambiguity.
Suggested-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/165ee8b723c42bcdeb3adf6a1b34ea09371e5d64.1732106557.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-22 13:36:58 +02:00
Ankit Nautiyal
f635e7657e
drm/i915/display/xe3lpd: Avoid setting YUV420_MODE in PIPE_MISC
...
For Xe3_LPD the PIPE_MISC YUV420 Enable (bit 27), already implies enabling
full blend YUV420 mode and YUV420 Mode (bit 26) is removed.
Therefore, avoid setting YUV420 Mode for Xe3_LPD+ while programming
PIPE_MISC for YCbCr420 output format.
Bspec: 69749
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241113115531.3394962-1-ankit.k.nautiyal@intel.com
2024-11-19 14:20:13 +05:30
Animesh Manna
ca596b781a
drm/i915/psr: Disable psr1 if setup_time > vblank
...
Issue is seen when PSR enabled with setup frames and when try to disable
PSR at SRDONACK State (0x1). PSR FSM is stuck at SRDONACK(0x1) for more
than 5 seconds. Issue not seen with Setup frames disabled. Currently
disable psr1 if setuptime > vblank to workaround the above issue.
HSD: 16024594674
WA: 18037818876
v1: Initial version
v2: Add debug log and some cosmetic changes. [Jouni, Jani, Nemesa]
Signed-off-by: Animesh Manna <animesh.manna@intel.com >
Reviewed-by: Jouni Högander <jouni.hogander@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241105103916.1857731-1-animesh.manna@intel.com
2024-11-19 13:26:52 +05:30
Imre Deak
d58f65df2d
drm/i915/dp_mst: Fix connector initialization in intel_dp_add_mst_connector()
...
The connector initialization in intel_dp_add_mst_connector() depends on
the device pointer in connector to be valid, at least by connector
debug printing. The device pointer is initialized by drm_connector_init(),
however that function also exposes the connector to in-kernel users,
which can't be done before the connector is fully initialized. For now
make sure the device pointer is valid before it's used, until a
follow-up change moving this to DRM core.
This issue was revealed by the commit in the Fixes: line below, before
which the above debug printing checked and handled a NULL device pointer
gracefully in DRM core.
Cc: Jani Nikula <jani.nikula@intel.com >
Fixes: 529798bd78 ("drm/i915/mst: convert to struct intel_display")
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12799
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241118131044.1278028-1-imre.deak@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-18 19:31:55 +02:00
Arun R Murthy
e725091865
drm/i915/dp: Include the time taken by AUX Tx for timeout
...
As per DP spec the timeout for LANE_CHANNEL_EQ_DONE is 400ms. But this
timeout value is exclusively for the Aux RD Interval and excludes the
time consumed for the AUX Tx (i.e reading/writing FFE presets). Add
another 50ms for these AUX Tx to the 400ms timeout.
Ref: "Figure 3-52: 128b132b DP DPTC LANEx_CHANNEL_EQ_DONE Sequence" of
DP2.1a spec.
Co-developed-by: Srikanth V NagaVenkata <nagavenkata.srikanth.v@intel.com >
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240925034432.1777029-4-arun.r.murthy@intel.com
2024-11-18 13:32:46 +05:30
Arun R Murthy
eb0c1757a3
drm/i915/dp: read Aux RD interval just before setting the FFE preset
...
Figure 3-52: 128b132b DP DPTC LANEx_CHANNEL_EQ_DONE Sequence of
DP2.1a spec.
After reading LANEx_CHANNEL_EQ_DONE, read the FFE presets.
AUX_RD_INTERVAL and then write the new FFE presets.
v4: Read AUX_RD_INTERVAL before get/set TX FFE preset (Jani)
Co-developed-by: Srikanth V NagaVenkata <nagavenkata.srikanth.v@intel.com >
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com >
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com >
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241011045825.2629469-1-arun.r.murthy@intel.com
2024-11-18 13:32:45 +05:30
Arun R Murthy
af02ee4fb6
drm/i915/dp: use fsleep instead of usleep_range for LT
...
Sleeping for < 10us use udelay, for 10us to 20ms use usleep_range() and
for > 10ms use msleep. flseep() will call the particular API based on
the above condition. (Documentation/timers/timers-howto.rst)
Aux RD Interval value depends on the value read from the dpcd register
which is updated from the sink device, hence use flseep.
Co-developed-by: Srikanth V NagaVenkata <nagavenkata.srikanth.v@intel.com >
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240925034432.1777029-2-arun.r.murthy@intel.com
2024-11-18 13:32:44 +05:30
Rodrigo Vivi
a594f284dd
drm/{i915, xe}: Move power_domains suspend/resume to display_power
...
Move intel_power_domains_{suspend,resume} to inside
intel_display_power_{suspend_late, resume_early}.
With this also change the VLV suspend failure to call
the intel_display_power_resume_early. In the end, the only
function executed there for VLV is the intel_power_domains_resume.
Besides make the code more consistency give the call that was
immediately before: intel_display_power_suspend_late.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-7-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-11-14 10:57:51 -05:00
Rodrigo Vivi
5772c4e999
drm/xe/display: Delay dsm handler registration
...
Bring some consistency to register/unregister order at the
same time it aligns with i915 sequence order.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-6-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-11-14 10:57:51 -05:00
Rodrigo Vivi
0a86a9e8c6
drm/xe/display: Delay hpd_init resume
...
Align with i915 and only initialize hotplugs after the display driver
access has been resumed.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-5-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-11-14 10:57:51 -05:00
Rodrigo Vivi
bd5dd9797d
drm/{i915, xe}/display: Move DP MST calls to display_driver
...
Move dp_mst suspend/resume functions from the drivers towards
intel_display_driver to continue with the unification.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-4-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-11-14 10:57:50 -05:00
Rodrigo Vivi
ec803c9b00
drm/i915/display: Move regfile registers intel_display.restore
...
The intel_display struct already has a place for save/restore
stuff. Move the i915's regfile there since they are only
related to display.
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-3-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-11-14 10:57:50 -05:00
Rodrigo Vivi
c3bda71543
drm/i915/display: Convert i915_suspend into i9xx_display_sr
...
These save & restore functions inside i915_suspend are old display
functions to save and restore a bunch of display related registers.
Move it under display and rename accordantly. Just don't move it
entirely towards intel_display struct yet because it depends
on drm_i915_private for the IS_MOBILE.
While doing this conversion also update the MIT header using
the new SPDX ones.
v2: Fix Makefile and include (Jani)
Removed vga and gmbus (Jani, Ville)
Cc: Jesse Barnes <jbarnes@virtuousgeek.org >
Cc: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-2-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-11-14 10:57:50 -05:00
Rodrigo Vivi
8985cb7a09
drm/i915: Remove vga and gmbus seq out of i915_restore_display
...
Restrict this function to only save and restore registers
functionality. Then, that can be moved out later to under
display with a proper name.
Cc: Jani Nikula <jani.nikula@intel.com >
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241113225016.208673-1-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2024-11-14 10:57:50 -05:00
Ankit Nautiyal
90b63bd4a6
drm/i915/dp: Limit max compressed bpp to 18 when forcing DSC
...
While forcing DSC when it is not actually required, the max compressed
bpp from the source gets picked for compression for some pipe bpps.
Apparently, when DSC is not required, forcing DSC to the maximum compressed
bpp seems to cause underruns.
To avoid this, limit the max compressed bpp to 18 while forcing DSC. This
value works across platforms with different pipe bpps and prevents
underruns.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com >
Reviewed-by: Naga Venkata Srikanth V <nagavenkata.srikanth.v@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241030084100.1361689-1-ankit.k.nautiyal@intel.com
2024-11-13 13:25:28 +05:30
Jani Nikula
91daf92d9d
drm/i915/dp: add comments about hooks called from MST stream encoders
...
It would be best to have self-explanatory code, but lacking that, add
some comments about the way the DDI encoder hooks get called from DP MST
stream encoders.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/5941b8ef48cac4d61de2e2806a80645de48e856c.1731409802.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 17:22:49 +02:00
Jani Nikula
5674e700d4
drm/i915/mst: change naming from fake encoders to MST stream encoders
...
The fake encoders pretty much match individual MST streams. The encoders
remain as fake as ever, but change the naming to MST stream
encoders. Rename all the encoder hooks and related functions called from
them to mst_stream_* to clarify what type of encoders the hooks are
called on.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/37d9572e884ca2fdd84ea6722b4b7cefde04eed9.1731409802.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 17:22:49 +02:00
Jani Nikula
529798bd78
drm/i915/mst: convert to struct intel_display
...
struct intel_display will replace struct drm_i915_private as the main
display device data structure. Convert the DP MST code to struct
intel_display as much as possible.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/84c9923fccdd779f0ca713cab1d26a0c802b140c.1731409802.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 17:22:49 +02:00
Jani Nikula
8c6942748b
drm/i915/display: make CHICKEN_TRANS() display version aware
...
Making register macros platform or display version aware is not exactly
something I want to promote widely, but in this case it's the lesser of
two evils. hsw_chicken_trans_reg() is not pretty, and it doesn't have a
suitable home.
v2: Rebase
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/712c17ee22537b0628aa32695743bc017b3fe332.1731409802.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 17:22:49 +02:00
Jani Nikula
3e5c6c7199
drm/i915/mst: use primary_encoder in fake mst encoder creation
...
Use a primary_encoder local variable in
intel_dp_create_fake_mst_encoder() for clarity.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/7c9ad1db97550b7eacb1f010521704f623b0c689.1731409802.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 17:22:49 +02:00
Jani Nikula
ca743f5fac
drm/i915/mst: introduce to_primary_encoder() and to_primary_dp()
...
Add helpers to_primary_encoder() and to_primary_dp() to convert fake MST
encoder pointers to primary encoder and DP pointers, respectively, and
use them.
The main point is to highlight the primary encoder and DP usage. Very
few places actually need the struct intel_dp_mst_encoder pointer, or the
primary struct intel_digital_port, so ditch them where possible for
clarity.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ff8786c04bae053055783f720f89a4d9f9815c70.1731409802.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 17:22:48 +02:00
Jani Nikula
45f9b3e8cb
drm/i915/mst: rename intel_encoder to encoder
...
Switch to the modern style in fake mst encoder creation.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/4d29387fba64b925c6ab4c108782a7b5ac22628a.1731409802.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 17:22:48 +02:00
Jani Nikula
612d02f935
drm/i915/mst: pass primary encoder to primary encoder hooks
...
Pass the primary encoder to the primary encoder hooks. This is
pedantically correct, but intel_ddi_post_pll_disable() also works with
the fake encoder by coincidence.
Reviewed-by: Imre Deak <imre.deak@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/a0151fddfdd5ec11a26345232cdd3ae59c8cf56a.1731409802.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 17:22:48 +02:00
Jani Nikula
bdf5e3f117
drm/i915/display: add mobile platform group
...
Identify mobile platforms separately in display, using the platform
group mechanism. This enables dropping the dependency on i915_drv.h
IS_MOBILE() from display code.
v2: Make snb_display static (kernel test robot)
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/2389fd58446e83a79ec57bc0b037679662037b9e.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:53 +02:00
Jani Nikula
b7f48bfda8
drm/i915/display: pass struct pci_dev * to intel_display_device_probe()
...
Convert intel_display_device_probe() to accept struct pci_dev * instead
of struct drm_i915_private *. Return struct intel_display * in
preparation of allocating the memory of it later.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ab4e960e3fff46cbeba185882b1e554f0ccd5877.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:53 +02:00
Jani Nikula
1a6330df06
drm/i915/display: convert display device identification to struct intel_display
...
Convert intel_display_device.[ch] to struct intel_display, including
callers, but excluding intel_display_device_probe() which will be
handled in follow-up.
v2: fix display->drm = display->drm goof-up
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/865b27b66f599e707081d46fca9f679e19a4e8aa.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:53 +02:00
Jani Nikula
151072cb38
drm/i915/display: rename i915 parameter to __display in feature helpers
...
All the feature check helpers now support (and some require) passing
struct intel_display. Rename the parameter to __display to reflect the
fact.
v2: Rebase
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/4933ded2efa9f333c560b6e634f60d4808614030.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:53 +02:00
Jani Nikula
9adc92e4c9
drm/i915/display: convert HAS_ULTRAJOINER() to struct intel_display
...
Convert HAS_ULTRAJOINER() to struct intel_display. Do minimal drive-by
conversions to struct intel_display in the callers while at it.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/f562d35c94cf7ef18d261a9867d959a58f165f1e.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:53 +02:00
Jani Nikula
8a8b9b16fe
drm/i915/display: convert HAS_HW_SAGV_WM() to struct intel_display
...
Convert HAS_HW_SAGV_WM() to struct intel_display. Do minimal drive-by
conversions to struct intel_display in the callers while at it.
v2: Rebase
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com > # v1
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com > # v1
Link: https://patchwork.freedesktop.org/patch/msgid/8babfd6f09df054d33d604a02e213200a3783737.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:53 +02:00
Jani Nikula
9832faf866
drm/i915/display: convert HAS_SAGV() to struct intel_display
...
Convert HAS_SAGV() to struct intel_display. Do minimal drive-by
conversions to struct intel_display in the callers while at it.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c0f65566d08c4ab5296740367979beb1670d1c06.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:53 +02:00
Jani Nikula
e4a7118eac
drm/i915/display: convert HAS_MBUS_JOINING() to struct intel_display
...
Convert HAS_MBUS_JOINING() to struct intel_display. Do minimal drive-by
conversions to struct intel_display in the callers while at it.
v2: Rebase
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com > # v1
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com > # v1
Link: https://patchwork.freedesktop.org/patch/msgid/c198dd5a0ab0a5f37edce3d18ddb4991cf3d4792.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:53 +02:00
Jani Nikula
e77f8c2ba2
drm/i915/display: convert HAS_IPS() to struct intel_display
...
Convert HAS_IPS() to struct intel_display. Do minimal drive-by
conversions to struct intel_display in the callers while at it.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/55fd6063b30ca227483a479cff0012e5a915196d.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:52 +02:00
Jani Nikula
86787e55bc
drm/i915/display: convert HAS_GMBUS_BURST_READ() to struct intel_display
...
Convert HAS_GMBUS_BURST_READ() to struct intel_display. Do minimal
drive-by conversions to struct intel_display in the callers while at it.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/34dfafeccf6f8ddd5437c79e18978151bfd96c24.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:52 +02:00
Jani Nikula
bd3b470e04
drm/i915/display: convert HAS_DP20() to struct intel_display
...
Convert HAS_DP20() to struct intel_display. Do minimal drive-by
conversions to struct intel_display in the callers while at it.
v2: Rebase
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com > # v1
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com > # v1
Link: https://patchwork.freedesktop.org/patch/msgid/757d91d2a57052b11cbd9f4f40d836d9245ca926.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:52 +02:00
Jani Nikula
b73b6c0117
drm/i915/display: convert HAS_DOUBLE_BUFFERED_M_N() to struct intel_display
...
Convert HAS_DOUBLE_BUFFERED_M_N() to struct intel_display. Do minimal
drive-by conversions to struct intel_display in the callers while at it.
v2: Rebase
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/d313d32ae411b86eedb86c4a4949dc84588362df.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:52 +02:00
Jani Nikula
a4a7188e2a
drm/i915/display: convert HAS_4TILE() to struct intel_display
...
Convert HAS_4TILE() to struct intel_display. Do minimal drive-by
conversions to struct intel_display in the callers while at it.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/123799e7c96d03d8eea7d9bea3d450e82c88ae5d.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:52 +02:00
Jani Nikula
76b7c4f1a2
drm/i915/display: convert HAS_D12_PLANE_MINIMIZATION() to struct intel_display
...
Convert HAS_D12_PLANE_MINIMIZATION() to struct intel_display. Do minimal
drive-by conversions to struct intel_display in the callers while at it.
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/ed9402eb83ab301f3c1d60884376d715b2190fd3.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:52 +02:00
Jani Nikula
7347d4e4d5
drm/i915/display: identify discrete graphics
...
Identify discrete graphics separately in display, using the platform
group mechanism. This enables dropping the dependency on i915_drv.h
IS_DGFX() from display code.
Start grouping platform groups separately in INTEL_DISPLAY_PLATFORMS()
in anticipation of more groups to come.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/c02230d26cc0d9dbd7ddcc064661b2ad03739b6a.1731321183.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2024-11-12 09:58:52 +02:00
Suraj Kandpal
4449955949
drm/i915/hdcp: Fix when the first read and write are retried
...
Make sure that the first read/write in hdcp2_authentication_key_exchange
are only retried when we have either DP/DPMST encoder connected,
since we do this to give docks and dp encoders some extra time to
get their HDCP DPCD registers ready only for DP/DPMST encoders as
this issue is only observed here no need to burden other encoders
with extra retries as this causes the HDMI connector to have some
other timing issue and fails HDCP authentication.
--v2
-Add intent of patch [Chaitanya]
-Add reasoning for loop [Jani]
-Make sure we forfiet the 50ms wait for non DP/DPMST encoders.
--v3
-Remove the is_dp_encoder check [Jani/Chaitanya]
-Make the commit message more clearer [Jani]
Fixes: 9d5a05f86d ("drm/i915/hdcp: Retry first read and writes to downstream")
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com >
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241104035951.517837-1-suraj.kandpal@intel.com
2024-11-12 10:29:16 +05:30
Ville Syrjälä
ecf2afc59c
drm/i915/scaler: Extract intel_allocate_scaler()
...
intel_atomic_setup_scaler() is a mess. Make it a bit less so
by moving the scaler allocation loop into its own function.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-9-ville.syrjala@linux.intel.com
2024-11-12 00:07:15 +02:00
Ville Syrjälä
3de26c81e9
drm/i915/scaler: Make scaler in_use a bool
...
Make scaler in_use a boolean since that's how it's used.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-8-ville.syrjala@linux.intel.com
2024-11-12 00:07:12 +02:00
Ville Syrjälä
02cd59fb4e
drm/i915/scaler: Carve up intel_atomic_setup_scalers()
...
Declutter intel_atomic_setup_scalers() a bit by splitting
the crtc scaling/pfit vs. plane scaling cases into their
own functions.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-7-ville.syrjala@linux.intel.com
2024-11-12 00:07:09 +02:00
Ville Syrjälä
3360d4d6d4
drm/i915/scaler: Convert the scaler code to intel_display
...
struct intel_display will replace struct drm_i915_private as
the main thing for display code. Convert the scaler code to
use it (as much as possible at this stage).
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-6-ville.syrjala@linux.intel.com
2024-11-12 00:07:06 +02:00
Ville Syrjälä
5b68f2346d
drm/i915/scaler: Clean up intel_atomic_setup_scalers() a bit
...
intel_atomic_setup_scalers() is currently messing around with
the internals of the atomic states. Stop doing that and instead
use the regular interfaces so that we don't need to know any ugly
implementation details.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-5-ville.syrjala@linux.intel.com
2024-11-12 00:07:03 +02:00
Ville Syrjälä
b5b4b53883
drm/i915/scaler: Pass the whole atomic state into intel_atomic_setup_scalers()
...
intel_atomic_setup_scalers() currently digs out the full atomic
state from the crtc state. Flip that on its head so that we instead
pass in the full atomic state and dig out the crtc state (and whatever
else we need). This is generallte the better approach as it works
in all phases of the atomic commit, whereas the other apporoach only
really works during .atomic_check().
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-4-ville.syrjala@linux.intel.com
2024-11-12 00:06:59 +02:00
Ville Syrjälä
e912069e61
drm/i915/scaler: Remove redudant junk from skl_scaler.h
...
Nuke some redundant includes and forward declarations from
skl_scaler.h.
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-3-ville.syrjala@linux.intel.com
2024-11-12 00:06:54 +02:00
Ville Syrjälä
7488f64e89
drm/i915/scaler: s/intel_crtc/crtc/ etc.
...
Rename some variables from the intel_foo to just foo, to match
the more modern style used throughout the driver.
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107122658.21901-2-ville.syrjala@linux.intel.com
2024-11-12 00:06:49 +02:00
Ville Syrjälä
f2ca5484cb
drm/i915/crt: Nuke unused crt->connector
...
crt->connector is never used, nuke it.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-11-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-11-11 23:52:58 +02:00
Ville Syrjälä
f865dfc779
drm/i915/crt: Rename some variables
...
Rename a bunch of local variables to the preferred
encoder/connector from intel_encoder/intel_connector.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-10-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-11-11 23:52:42 +02:00
Ville Syrjälä
f34ad8565a
drm/i915/crt: Drop pointless drm_device variables
...
Remove a bunch of pointless 'struct drm_device *dev' local variables.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241107161123.16269-9-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
2024-11-11 23:52:17 +02:00