]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
10 months agodrm/i915/dram: separate fsb freq detection from mem freq
Jani Nikula [Fri, 14 Jun 2024 09:22:31 +0000 (12:22 +0300)]
drm/i915/dram: separate fsb freq detection from mem freq

To simplify further changes, add separate functions for reading the fsb
frequency.

This ends up reading CLKCFG register twice, but it's not a big deal.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7582651aa21ac2c1472111c4e81ba8fee182f80e.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915/wm: clarify logging on not finding CxSR latency config
Jani Nikula [Fri, 14 Jun 2024 09:22:30 +0000 (12:22 +0300)]
drm/i915/wm: clarify logging on not finding CxSR latency config

Clarify and unify the logging on not finding PNV CxSR latency
config.

Just let the i915->fsb_freq == 0 || i915->mem_freq == 0 case go through
the table instead of checking for it separately.

v2: Do not check for fsb == 0 || mem == 0 separately (Matt)

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6333cb0675c531e971e829105f1ecfc4d71bdc6b.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915/wm: rename intel_get_cxsr_latency -> pnv_get_cxsr_latency
Jani Nikula [Fri, 14 Jun 2024 09:22:29 +0000 (12:22 +0300)]
drm/i915/wm: rename intel_get_cxsr_latency -> pnv_get_cxsr_latency

Clarify that the function is specific to PNV, making subsequent changes
slightly easier to grasp.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7d4e3c9a4220ff84af2741e5cd7bb62d1b4f2a44.1718356614.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915/mso: using joiner is not possible with eDP MSO
Jani Nikula [Fri, 14 Jun 2024 14:23:11 +0000 (17:23 +0300)]
drm/i915/mso: using joiner is not possible with eDP MSO

It's not possible to use the joiner at the same time with eDP MSO. When
a panel needs MSO, it's not optional, so MSO trumps joiner.

v3: Only change intel_dp_has_joiner(), leave debugfs alone (Ville)

Fixes: bc71194e8897 ("drm/i915/edp: enable eDP MSO during link training")
Cc: <stable@vger.kernel.org> # v5.13+
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1668
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240614142311.589089-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: Remove bogus MST check in intel_dp_has_audio()
Ville Syrjälä [Fri, 17 May 2024 14:53:56 +0000 (17:53 +0300)]
drm/i915: Remove bogus MST check in intel_dp_has_audio()

No idea what this MST checks is doing in intel_dp_has_audio().
Looks completely pointless, so get rid of it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-8-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: Utilize edp_disable_dsc from VBT
Ville Syrjälä [Fri, 17 May 2024 14:53:55 +0000 (17:53 +0300)]
drm/i915: Utilize edp_disable_dsc from VBT

Disable eDP DSC usage when instructed to do so by the VBT.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: Reuse intel_dp_supports_dsc() for MST
Ville Syrjälä [Fri, 17 May 2024 14:53:54 +0000 (17:53 +0300)]
drm/i915: Reuse intel_dp_supports_dsc() for MST

intel_dp_supports_dsc() now works for MST as well, reuse it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: Use intel_dp_has_dsc() during .compute_config()
Ville Syrjälä [Fri, 17 May 2024 14:53:53 +0000 (17:53 +0300)]
drm/i915: Use intel_dp_has_dsc() during .compute_config()

Reuse intel_dp_has_dsc() during .compute_config() instead of
repeating some of the checks again by hand. We'll be adding
more checks to intel_dp_has_dsc() and this will make sure
we cover both .mode_valid() and .compute_config() with them.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: Handle MST in intel_dp_has_dsc()
Ville Syrjälä [Fri, 17 May 2024 14:53:52 +0000 (17:53 +0300)]
drm/i915: Handle MST in intel_dp_has_dsc()

Utilize intel_dp_has_dsc() for MST as well.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: Extract intel_dp_has_dsc()
Ville Syrjälä [Fri, 17 May 2024 14:53:51 +0000 (17:53 +0300)]
drm/i915: Extract intel_dp_has_dsc()

Extract a helper to check whether the source+sink combo
supports DSC. That basic check is needed both during mode
validation and compute config. We'll also need to add extra
checks to both places, so having a single place for it is nicer.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: Drop redundant dsc_decompression_aux check
Ville Syrjälä [Fri, 17 May 2024 14:53:50 +0000 (17:53 +0300)]
drm/i915: Drop redundant dsc_decompression_aux check

If we have no dsc_decompression_aux (only possible on MST)
then we won't have the dsc_dpcd caps either. So checking
both is not needed.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: remove unused pipe/plane B register macros
Jani Nikula [Fri, 7 Jun 2024 15:25:40 +0000 (18:25 +0300)]
drm/i915: remove unused pipe/plane B register macros

None of these are used. The parametrized register macros all depend on
the pipe/plane A offset macros alone. Remove the unused ones.

v2: Rebase

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/16d278bea466a69cdce94fd83d98dd15ce1a8c89.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: relocate some DSPCNTR reg bit definitions
Jani Nikula [Fri, 7 Jun 2024 15:25:39 +0000 (18:25 +0300)]
drm/i915: relocate some DSPCNTR reg bit definitions

Some plane B/C specific bits were left next to the unused _DSPBCNTR
macro. Move them next to the DSPCNTR() macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/85409fbe5073797c0dc17df43eeb25abe9ff889f.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915/gvt: do not use implict dev_priv in DSPSURF_TO_PIPE()
Jani Nikula [Fri, 7 Jun 2024 15:25:38 +0000 (18:25 +0300)]
drm/i915/gvt: do not use implict dev_priv in DSPSURF_TO_PIPE()

Do not rely on having dev_priv local variable, pass it to the macro.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.wang.linux@gmail.com>
Cc: intel-gvt-dev@lists.freedesktop.org
Reviewed-by: Zhi Wang <zhiwang@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/2ff78ebd0dc84178f5feacee7ef2a6cb4132b9ae.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915/gvt: rename range variable to stride
Jani Nikula [Fri, 7 Jun 2024 15:25:37 +0000 (18:25 +0300)]
drm/i915/gvt: rename range variable to stride

Range is a bit odd name for what really is stride. Rename. Switch to u32
while at it.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.wang.linux@gmail.com>
Cc: intel-gvt-dev@lists.freedesktop.org
Reviewed-by: Zhi Wang <zhiwang@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/8b8d4acee15da07845ed1779d6856d5c3f50a132.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915/gvt: use proper i915_reg_t for calc_index() parameters
Jani Nikula [Fri, 7 Jun 2024 15:25:36 +0000 (18:25 +0300)]
drm/i915/gvt: use proper i915_reg_t for calc_index() parameters

In order to be able to use the proper register macros instead of the
underscore prefixed ones, pass i915_reg_t for the calc_index()
parameters.

Side note: DSPSURF is really about planes, not pipes. Fixed stride
doesn't work for plane C for CHV (but that's okay for gvt). This doesn't
support planes beyond C either. But all that is unrelated to the change
at hand.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.wang.linux@gmail.com>
Cc: intel-gvt-dev@lists.freedesktop.org
Reviewed-by: Zhi Wang <zhiwang@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/282b19c44d83c96b52c261cfc7218e7e54076cba.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915/gvt: remove the unused end parameter from calc_index()
Jani Nikula [Fri, 7 Jun 2024 15:25:35 +0000 (18:25 +0300)]
drm/i915/gvt: remove the unused end parameter from calc_index()

All callers of calc_index() pass 0 for the end parameter. Remove it.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.wang.linux@gmail.com>
Cc: intel-gvt-dev@lists.freedesktop.org
Reviewed-by: Zhi Wang <zhiwang@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/aaa24a5cbcf876d3b95e0f5f6594f972a860b6bc.1717773890.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915/dp: Add debugfs entry to get the link retrain disabled state
Imre Deak [Mon, 10 Jun 2024 16:49:33 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entry to get the link retrain disabled state

Add a connector debugfs entry showing if link retraining is disabled.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-22-imre.deak@intel.com
10 months agodrm/i915/dp: Add debugfs entry to force link retrain
Imre Deak [Mon, 10 Jun 2024 16:49:32 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entry to force link retrain

Add a connector debugfs entry to force retrain an active link. This can
be used to test both custom link parameters (previously forced via the
force_link_rate/lane_count entries) or link train failure scenarios
(previously forced via the force_link_training_failure entry). The entry
will autoreset after the link-retrain is complete.

v2: Add the entry from intel_dp_link_training.c (Jani)
v3: Lock connection_mutex only for the required intel_dp state. (Ville)

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-21-imre.deak@intel.com
10 months agodrm/i915/dp: Add debugfs entry to force link training failure
Imre Deak [Mon, 10 Jun 2024 16:49:31 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entry to force link training failure

Add a connector debugfs entry to force a failure during the following
1-2 link training. The entry will auto-reset after the specified link
training events are complete.

v2: Add the entry from intel_dp_link_training.c (Jani)
v3: Lock connection_mutex only for the required intel_dp state. (Ville)

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-20-imre.deak@intel.com
10 months agodrm/i915/dp: Add debugfs entries to get the max link rate/lane count
Imre Deak [Mon, 10 Jun 2024 16:49:30 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entries to get the max link rate/lane count

Add connector debugfs entries to get the maximum link rate and lane
count.

v2: Lock connection_mutex only for the required intel_dp state. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-19-imre.deak@intel.com
10 months agodrm/i915/dp: Add debugfs entries to force the link rate/lane count
Imre Deak [Mon, 10 Jun 2024 16:49:29 +0000 (19:49 +0300)]
drm/i915/dp: Add debugfs entries to force the link rate/lane count

Add connector debugfs entries to force the link rate/lane count to be
used by a link training afterwards. These settings will be clamped to
the supported, i.e. the source's and sink's common rate/lane count.

After forcing the link rate/lane count reset the link training
parameters and for a non-auto setting disable reducing the link
parameters via the fallback logic. The former one can be used after
testing link training failure scenarios - via debugfs entries added
later - to reset the reduced link parameters after the test.

v2:
- Add the entries from intel_dp_link_training.c (Jani)
- Rename the entries to i915_dp_set_link_rate/lane_count.
v3: (Ville)
- Rename the entries/struct fields to force_link_rate/lane_count.
- Lock connection_mutex only for the required intel_dp state.

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-18-imre.deak@intel.com
10 months agodrm/i915/dp_mst: Enable link training fallback for MST
Imre Deak [Mon, 10 Jun 2024 16:49:28 +0000 (19:49 +0300)]
drm/i915/dp_mst: Enable link training fallback for MST

Reduce the link parameters after a link training failure for MST
outputs, similarly to how this is done for SST.

For now allow the reduction only by staying in the 8b/10b vs. 128b/132b
mode. Enabling the mode switch is left for a follow-up patchset, after
taking measures ensuring that the mode switch happens properly. In
particular a rediscovery of the whole MST topology may be required for
such a switch, see the References below.

Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10970
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-17-imre.deak@intel.com
10 months agodrm/i915/dp_mst: Reset intel_dp->link_trained during disabling
Imre Deak [Mon, 10 Jun 2024 16:49:27 +0000 (19:49 +0300)]
drm/i915/dp_mst: Reset intel_dp->link_trained during disabling

Reset the flag indicating an active link after disabling an MST link,
similarly to how this is done for SST outputs. This avoids trying to
retrain an MST link while its disabled.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-16-imre.deak@intel.com
10 months agodrm/i915/dp: Disable link retraining after the last fallback step
Imre Deak [Mon, 10 Jun 2024 16:49:26 +0000 (19:49 +0300)]
drm/i915/dp: Disable link retraining after the last fallback step

After a link training failure if the link parameters can't be further
reduced, there is no point in trying to retrain the link in the driver.
This avoids excessive retrain attempts after detecting a bad link, for
instance while handling MST HPD IRQs, which is likely redundant as the
link training failed already twice with the same minimum link
parameters. Userspace can still try to retrain the link with these
parameters via a modeset.

While at it make the error message more accurate.

v2: Move converting the error to a debug message to the relevant
    follow-up patch. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-15-imre.deak@intel.com
10 months agodrm/i915/dp: Use check link state work in the HPD IRQ handler
Imre Deak [Mon, 10 Jun 2024 16:49:25 +0000 (19:49 +0300)]
drm/i915/dp: Use check link state work in the HPD IRQ handler

Simplify things by retraining a DP link if a bad link is detected in the
HPD IRQ handler from the encoder's check link state work, similarly to
how this is done after a modeset link training failure.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-14-imre.deak@intel.com
10 months agodrm/i915/dp: Use check link state work in the detect handler
Imre Deak [Mon, 10 Jun 2024 16:49:24 +0000 (19:49 +0300)]
drm/i915/dp: Use check link state work in the detect handler

Simplify things by retraining a DP link if a bad link is detected in the
connector detect handler from the encoder's check link state work,
similarly to how this is done after a modeset link training failure.

v2: Add TODO: comment to remove the detect-time link state check.
    (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-13-imre.deak@intel.com
10 months agodrm/i915/dp: Use check link state work in the hotplug handler
Imre Deak [Mon, 10 Jun 2024 16:49:23 +0000 (19:49 +0300)]
drm/i915/dp: Use check link state work in the hotplug handler

Simplify things by retraining a DP link if a bad link is detected in the
hotplug handler from the encoder's check link state work, similarly to
how this is done after a modeset link training failure.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-12-imre.deak@intel.com
10 months agodrm/i915/dp: Send a link training modeset-retry uevent to all MST connectors
Imre Deak [Mon, 10 Jun 2024 16:49:22 +0000 (19:49 +0300)]
drm/i915/dp: Send a link training modeset-retry uevent to all MST connectors

Send a modeset-retry uevent to all connectors in the same MST topology
after a link training failure and reduction of the link parameters. This
matches the way the same uevent is sent after a DP tunnel BW allocation
failure.

v2: Add NOTE that the atomic state may not be valid for SST links and
    assert that it's valid for MST links. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-11-imre.deak@intel.com
10 months agodrm/i915/dp: Pass atomic state to link training function
Imre Deak [Mon, 10 Jun 2024 16:49:21 +0000 (19:49 +0300)]
drm/i915/dp: Pass atomic state to link training function

The next patch adds sending a modeset-retry uevent after a link training
failure to all MST connectors on link. This requires the atomic state,
so pass it to intel_dp_start_link_train(). In case of SST where
retraining still happens by calling this function directly instead of a
modeset commit the atomic state is not available and NULL is passed
instead. This is ok, since in this case the encoder's only DP connector
is available from intel_dp->attached_connector not requiring the atomic
state.

v2: Add NOTE that the atomic state may not be valid for SST links and
    assert that it's valid for MST links. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-10-imre.deak@intel.com
10 months agodrm/i915/dp: Reduce link params only after retrying with unchanged params
Imre Deak [Mon, 10 Jun 2024 16:49:20 +0000 (19:49 +0300)]
drm/i915/dp: Reduce link params only after retrying with unchanged params

Try to maintain the current link parameters by retrying the link
training with unchanged link parameters before reducing these parameters
(sending an uevent to userspace to retrain the link instead).

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-9-imre.deak@intel.com
10 months agodrm/i915/dp: Recheck link state after modeset
Imre Deak [Mon, 10 Jun 2024 18:14:28 +0000 (21:14 +0300)]
drm/i915/dp: Recheck link state after modeset

Recheck the link state after a passing link training, with a 2 sec delay
to account for cases where the link goes bad following the link training
and the sink doesn't report this via an HPD IRQ.

The delayed work added here will be also used by a later patch after a
failed link training to try to retrain the link with unchanged link
params before reducing the link params.

v2: Don't flush an uninitialized delayed work (on HDMI-only DDI ports).
v3:
- Move the helpers to a new intel_encoder.c file, rename them
  accordingly. (Ville)
- Add the work to intel_encoder instead of intel_digital_port.
- Call the encoder specific link check function via an encoder hook.
- Flush the link check work during encoder destroy from
  intel_dp_encoder_flush_work().
- Flush the link check work during encoder suspend as well.
v4: Call intel_encoder_link_check_init() with a valid encoder pointer.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610181428.2955658-1-imre.deak@intel.com
10 months agodrm/i915/dp: Use a commit modeset for link retraining MST links
Imre Deak [Mon, 10 Jun 2024 16:49:18 +0000 (19:49 +0300)]
drm/i915/dp: Use a commit modeset for link retraining MST links

Instead of direct calls to the link train functions, retrain the link
via a commit modeset. The direct call means that the output port will be
disabled/re-enabled while the rest of the pipeline (transcoder) is
active, which doesn't seem to work on MST at least. It leads to
underruns and black screen, presumedly because the transcoder is not
disabled/re-enabled along the port.

Leave switching to a commit modeset on SST for a later patchset, as that
seems to work ok currently (though better to using a commit there too,
due to the suppressed underruns).

v2: Keep reverse line length order for local variables. (Ville)

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-7-imre.deak@intel.com
10 months agodrm/i915: Factor out function to modeset commit a set of pipes
Imre Deak [Mon, 10 Jun 2024 16:49:17 +0000 (19:49 +0300)]
drm/i915: Factor out function to modeset commit a set of pipes

Factor out a function to modeset commit a set of pipes, which a later
patch will reuse for DP link retraining.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-6-imre.deak@intel.com
10 months agodrm/i915/dp: Sanitize intel_dp_get_link_train_fallback_values()
Imre Deak [Mon, 10 Jun 2024 16:49:16 +0000 (19:49 +0300)]
drm/i915/dp: Sanitize intel_dp_get_link_train_fallback_values()

Reduce the indentation in intel_dp_get_link_train_fallback_values() by
adding separate helpers to reduce the link rate and lane count. Also
simplify things by passing crtc_state to the function.

This also prepares for later patches in the patchset adding a limitation
on how the link params are reduced.

While at it use lt_dbg()/lt_err() for debug/error prints in the function
which will also print the connector/encoder prefix and add a debug print
about reducing the link parameters.

v2:
- Align reduce_lane_count()'s error handling flow with
  reduce_link_rate(). (Ville, Jani)
- Use lt_dbg()/lt_err() in the function.

Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-5-imre.deak@intel.com
10 months agodrm/i915/dp: Move link train fallback to intel_dp_link_training.c
Imre Deak [Mon, 10 Jun 2024 16:49:15 +0000 (19:49 +0300)]
drm/i915/dp: Move link train fallback to intel_dp_link_training.c

Move the functions used to reduce the link parameters during link
training to intel_dp_link_training.c .

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Manasi Navare <navaremanasi@chromium.org>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-4-imre.deak@intel.com
10 months agodrm/i915/dp: Move link train params to a substruct in intel_dp
Imre Deak [Mon, 10 Jun 2024 16:49:14 +0000 (19:49 +0300)]
drm/i915/dp: Move link train params to a substruct in intel_dp

For clarity move the link training parameters updated during link
training based on the pass/fail LT result under a substruct in intel_dp.
This prepares for later patches in this patchset adding similar params
here. Rename intel_dp_reset_max_link_params() to
intel_dp_reset_link_params() to better reflect what state gets reset.

v2: Add the parameters to a more generic link substruct. (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-3-imre.deak@intel.com
10 months agodrm/i915/dp_mst: Align TUs to avoid splitting symbols across MTPs
Imre Deak [Mon, 10 Jun 2024 16:49:13 +0000 (19:49 +0300)]
drm/i915/dp_mst: Align TUs to avoid splitting symbols across MTPs

Symbols consisting of multiple (4) TU timeslots may get split across
MTPs when using 2 or 1 link lanes. Avoid this, as required by Bspec by
aligning the allocated TUs to 2 when using 2 lanes and 4 when using 1
lane.

Atm, we also have to align the PBNs used to allocate BW along the MST
path, since DRM core keeps track of its own TU value, derived from the
PBN and that TU value must match what the driver calculates.

On some platforms the alignment is only required on 8b/10b links, a
follow-up patch will remove the limitation for those.

Bspec: 49266, 68922

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610164933.2947366-2-imre.deak@intel.com
10 months agodrm/i915/dp_mst: Fix DSC input BPP computation
Imre Deak [Tue, 11 Jun 2024 15:33:51 +0000 (18:33 +0300)]
drm/i915/dp_mst: Fix DSC input BPP computation

The branch or sink device decompressing a stream may have a limitation
on the input/uncompressed BPP, which is lower than the base line BPP
(determined by the sink's EDID). In some cases a stream with an input
BPP higher than this limit will be converted automatically by the device
decompressing the stream, by truncating the BPP, however in some cases
- seen at least in Dell dock's DP->HDMI converters - the decompression
will fail.

Fix the above by limiting the input BPP correctly. This is done already
correctly for SST outputs.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240611153351.3013235-1-imre.deak@intel.com
10 months agodrm/i915/display: Send vrr vsync params whne vrr is enabled
Mitul Golani [Tue, 11 Jun 2024 12:05:24 +0000 (17:35 +0530)]
drm/i915/display: Send vrr vsync params whne vrr is enabled

Compute trans vrr vsync params only when either VRR or CMRR
is enabled.

Fixes: 5922f45329cd ("drm/i915/display: Compute vrr vsync params")
Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Suraj Kandpal <suraj.kandpal@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240611120525.148042-1-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/i915: Rename bigjoiner master/slave to bigjoiner primary/secondary
Stanislav Lisovskiy [Mon, 3 Jun 2024 11:25:50 +0000 (14:25 +0300)]
drm/i915: Rename bigjoiner master/slave to bigjoiner primary/secondary

According to BSpec we now should call "master" pipes, "primary" pipes
and "slave" pipes, should be "secondary" pipes.

Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
[vsyrjala: Don't rename port sync stuff, catch a few more things]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240603112551.6481-3-stanislav.lisovskiy@intel.com
10 months agodrm/i915: Rename all bigjoiner to joiner
Stanislav Lisovskiy [Fri, 7 Jun 2024 07:54:57 +0000 (10:54 +0300)]
drm/i915: Rename all bigjoiner to joiner

Lets unify both bigjoiner and ultrajoiner under simple "joiner" name,
because in future we might have multiple configurations, involving
multiple bigjoiners, ultrajoiner, however it is possible to use
same api for handling both.

v2: - Renamed back some bigjoiner specific parts for now(Ville)

Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
[vsyrjala: Catch a few more cases]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607075457.15700-1-stanislav.lisovskiy@intel.com
10 months agodrm/i915/psr: Wake time is aux less wake time for Panel Replay
Jouni Högander [Fri, 7 Jun 2024 13:49:17 +0000 (16:49 +0300)]
drm/i915/psr: Wake time is aux less wake time for Panel Replay

When checking vblank length used wake time is aux less wake time for eDP
Panel Replay (vblank length is not checked for DP2.0 Panel Replay).

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-14-jouni.hogander@intel.com
10 months agodrm/i915/psr: Check vblank against IO buffer wake time on Lunarlake
Jouni Högander [Fri, 7 Jun 2024 13:49:16 +0000 (16:49 +0300)]
drm/i915/psr: Check vblank against IO buffer wake time on Lunarlake

As Lunarlake doesn't have block count configuration vblank should be
checked against IO buffer wake time.

Bspec: 68920

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-13-jouni.hogander@intel.com
10 months agodrm/i915/psr: Take into account SU SDP scanline indication in vblank check
Jouni Högander [Fri, 7 Jun 2024 13:49:15 +0000 (16:49 +0300)]
drm/i915/psr: Take into account SU SDP scanline indication in vblank check

SU SDP scanline indication should be taken into account when checking
vblank length. In Bspec we have:

PSR2_CTL[ SU SDP scanline indication ] = 0: (TRANS_VBLANK Vertical Blank
End- TRANS_VBLANK Vertical Blank Start) > PSR2_CTL Block Count Number value
in lines

PSR2_CTL[ SU SDP scanline indication ] = 1: (TRANS_VBLANK Vertical Blank
End- TRANS_VBLANK Vertical Blank Start- 1) > PSR2_CTL Block Count Number
value in lines

Bspec: 49274

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-12-jouni.hogander@intel.com
10 months agodrm/i915/psr: Move vblank length check to separate function
Jouni Högander [Fri, 7 Jun 2024 13:49:14 +0000 (16:49 +0300)]
drm/i915/psr: Move vblank length check to separate function

We are about to add more complexity to vblank length check. It makes sense
to move it to separate function for sake of clarity.

v2: change name to wake_lines_fit_into_vblank

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-11-jouni.hogander@intel.com
10 months agodrm/i915/psr: Print Panel Replay status instead of frame lock status
Jouni Högander [Fri, 7 Jun 2024 13:49:13 +0000 (16:49 +0300)]
drm/i915/psr: Print Panel Replay status instead of frame lock status

Currently Panel Replay status printout is printing frame lock status. It
should print Panel Replay status instead. Panel Replay status register
field follows PSR status register field. Use existing PSR code for that.

Fixes: ef75c25e8fed ("drm/i915/panelreplay: Debugfs support for panel replay")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-10-jouni.hogander@intel.com
10 months agodrm/i915/psr: Add Panel Replay support to intel_psr2_config_et_valid
Jouni Högander [Fri, 7 Jun 2024 13:49:12 +0000 (16:49 +0300)]
drm/i915/psr: Add Panel Replay support to intel_psr2_config_et_valid

Early Transport is possible and in our HW mandatory on eDP Panel
Replay. Add parameter to intel_psr2_config_et_valid to differentiate
validity check for Panel Replay.

v2: fix intel_dp->psr_dpcd[0] check

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-9-jouni.hogander@intel.com
10 months agodrm/i915/alpm: Share alpm support checks with PSR code
Jouni Högander [Fri, 7 Jun 2024 13:49:11 +0000 (16:49 +0300)]
drm/i915/alpm: Share alpm support checks with PSR code

Convert intel_alpm_aux_wake_supported and
intel_alpm_aux_less_wake_supported as non-static. Use them in intel_psr.c
instead of local variables.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-8-jouni.hogander@intel.com
10 months agodrm/i915/psr: Split enabling sink for PSR and Panel Replay
Jouni Högander [Fri, 7 Jun 2024 13:49:10 +0000 (16:49 +0300)]
drm/i915/psr: Split enabling sink for PSR and Panel Replay

Current intel_psr_enable_sink is a mess due to partly reusing PSR bit
definitions for Panel Replay. Even thought PSR and Panel Replay enable
registers do have common bits they still have also different bits and same
bits with different meaning. For sake of clarity split enabling sink to PSR
and Panel Replay specific parts.

Also fix issue caused by using psr->panel_replay_enabled to early.

Fixes: 88ae6c65ecdb ("drm/i915/psr: Unify panel replay enable/disable sink")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-7-jouni.hogander@intel.com
10 months agodrm/display: Add missing Panel Replay Enable SU Region ET bit
Jouni Högander [Fri, 7 Jun 2024 13:49:09 +0000 (16:49 +0300)]
drm/display: Add missing Panel Replay Enable SU Region ET bit

Add missing Panel Replay Enable SU Region ET bit defined in DP2.1
specification.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-6-jouni.hogander@intel.com
10 months agodrm/i915/display: Skip Panel Replay on pipe comparison if no active planes
Jouni Högander [Fri, 7 Jun 2024 13:49:08 +0000 (16:49 +0300)]
drm/i915/display: Skip Panel Replay on pipe comparison if no active planes

Panel Replay is not enabled if there are no active planes. Do not compare
it on pipe comparison. Otherwise we get pipe mismatch.

Fixes: ac9ef327327b ("drm/i915/psr: Panel replay has to be enabled before link training")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-5-jouni.hogander@intel.com
10 months agodrm/i915/display: Take panel replay into account in vsc sdp unpacking
Jouni Högander [Fri, 7 Jun 2024 13:49:07 +0000 (16:49 +0300)]
drm/i915/display: Take panel replay into account in vsc sdp unpacking

Currently intel_dp_vsc_sdp_unpack is not taking into account Panel Replay
vsc sdp. Fix this by adding vsc sdp revision 0x6 and length 0x10 into
intel_dp_vsc_sdp_unpack

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-4-jouni.hogander@intel.com
10 months agodrm/i915/alpm: Write also AUX Less Wake lines into ALPM_CTL
Jouni Högander [Fri, 7 Jun 2024 13:49:06 +0000 (16:49 +0300)]
drm/i915/alpm: Write also AUX Less Wake lines into ALPM_CTL

Currently AUX Less Wake lines are not written into ALPM_CTL. Fix this.

Fixes: 1ccbf135862b ("drm/i915/psr: Enable ALPM on source side for eDP Panel replay")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-3-jouni.hogander@intel.com
10 months agodrm/i915/alpm: Do not use fast_wake_lines for aux less wake time
Jouni Högander [Fri, 7 Jun 2024 13:49:05 +0000 (16:49 +0300)]
drm/i915/alpm: Do not use fast_wake_lines for aux less wake time

We want to have own variables for fast wake lines and aux less wake
time. It might be needed to choose if we can enable Panel Replay Selective
Update or PSR2.

Also currently aux less wake time is overwritten by calculated fast wake
time.

v2:use aux less wake time in intel_alpm_lobf_compute_config

Fixes: da6a9836ac09 ("drm/i915/psr: Calculate aux less wake time")
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607134917.1327574-2-jouni.hogander@intel.com
10 months agodrm/i915: Compute CMRR and calculate vtotal
Mitul Golani [Mon, 10 Jun 2024 07:22:02 +0000 (12:52 +0530)]
drm/i915: Compute CMRR and calculate vtotal

Compute Fixed Average Vtotal/CMRR with resepect to
userspace VRR enablement. Also calculate required
parameters in case of CMRR is  enabled. During
intel_vrr_compute_config, CMRR is getting enabled
based on userspace has enabled Variable refresh mode
with VRR timing generator or not. Make CMRR as small subset of
FAVT mode, when Panel is running on Fixed refresh rate
and on VRR framework then only enable CMRR to match with
actual refresh rate.

--v2:
- Update is_cmrr_frac_required function return as bool, not int. [Jani]
- Use signed int math instead of unsigned in cmrr_get_vtotal2. [Jani]
- Fix typo and usage of camel case in cmrr_get_vtotal. [Jani]
- Use do_div in cmrr_get_vtotalwhile calculating cmrr_m. [ Jani]
- Simplify cmrr and vrr compute config in intel_vrr_compute_config. [Jani]
- Correct valiable name usage in is_cmrr_frac_required. [Ville]

--v3:
- Removing RFC tag.

--v4:
- Added edp check to address edp usecase for now. (ville)
- Updated is_cmrr_fraction_required to more simplified calculation.
- on longterm goal to be worked upon uapi as suggestion from ville.

--v5:
- Correct vtotal paramas accuracy and add 2 digit precision.
- Avoid using DIV_ROUND_UP and improve scanline precision.

--v6:
- Make CMRR a small subset of FAVT mode.

--v7:
- Update commit message to avoid confusion with Legacy VRR (Ankit).
- Add cmrr.enable in last, so remove from this patch.

--v8:
- Set cmrr.enable in current patch instead of separate patch (Ankit).
- Since vrr.enable and cmrr.enable are not mutually exclusive,
handle accordingly (Ankit).
- is_edp is not required inside is_cmrr_frac_required function (Ankit).
- Add video_mode_required flag for future enhancement.
- Correct cmrr_m/cmrr_n calculation.

--v9:
- Move patch to last and set other bits before computing
cmrr.enable.(Ankit)
- Add TODO: for to address target refresh rate precision as future
enhancement.

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-10-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/i915/display: Compute vrr vsync params
Mitul Golani [Mon, 10 Jun 2024 07:22:01 +0000 (12:52 +0530)]
drm/i915/display: Compute vrr vsync params

Compute vrr vsync params in case of FAVT as well instead of
only to AVT mode of operation.

--v2:
- Remove redundant computation for vrr_vsync_start
and vrr_vsync_end(Ankit).

--v3:
- vrr.enable and cmrr.enable check together is not required as both
will be true at the same point in time. (Ankit)
- Replace vrr.enable flag to cmrr.enable, mistakenly added. (Ankit)

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-9-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/i915/display: Compute Adaptive sync SDP params
Mitul Golani [Mon, 10 Jun 2024 07:22:00 +0000 (12:52 +0530)]
drm/i915/display: Compute Adaptive sync SDP params

Compute params for Adaptive Sync SDP when Fixed Average Vtotal
mode is enabled.

--v2:
Since vrr.enable is set in case of cmrr also, handle accordingly(Ankit).

--v3:
- Since vrr.enable is set in case of cmrr also, handle
accordingly(Ankit).
- check cmrr.enable when CMRR flags are set during intel_dp_compute_as_sdp.

--v4:
- Use drm_mode_vrefresh instead of manual calculation (Ankit).

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-8-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/i915/display: Add support for pack and unpack
Mitul Golani [Mon, 10 Jun 2024 07:21:59 +0000 (12:51 +0530)]
drm/i915/display: Add support for pack and unpack

Add support of pack and unpack for target_rr_divider.

--v2:
- Set Target Refresh Rate Divider bit when related
AS SDP bit is set (Ankit).

--v3:
- target_rr_divider is bools so set accordingly (Ankit).
Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-7-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/dp: Add refresh rate divider to struct representing AS SDP
Mitul Golani [Mon, 10 Jun 2024 07:21:58 +0000 (12:51 +0530)]
drm/dp: Add refresh rate divider to struct representing AS SDP

Add target_rr_divider to structure representing AS SDP.
It is valid only in FAVT mode, sink device ignores the bit in AVT
mode.

--v2:
- Update commit header and send patch to dri-devel.

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-6-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/i915: Update trans_vrr_ctl flag when cmrr is computed
Mitul Golani [Mon, 10 Jun 2024 07:21:57 +0000 (12:51 +0530)]
drm/i915: Update trans_vrr_ctl flag when cmrr is computed

Add/update trans_vrr_ctl flag when crtc_state->cmrr.enable
is set, With this commit setting the stage for subsequent
CMRR enablement.

--v2:
- Check pipe active state in cmrr enabling. [Jani]
- Remove usage of bitwise OR on booleans. [Jani]
- Revert unrelated changes. [Jani]
- Update intel_vrr_enable, vrr and cmrr enable conditions. [Jani]
- Simplify whole if-ladder in intel_vrr_enable. [Jani]
- Revert patch restructuring mistakes in intel_vrr_get_config. [Jani]

--v3:
- Check pipe active state in cmrr disabling.[Jani]
- Correct messed up condition in intel_vrr_enable. [Jani]

--v4:
- Removing RFC tag.

--v5:
- CMRR handling in co-existatnce of LRR and DRRS.

--v7:
- Rebase on top of AS SDP merge.

--v8:
- Remove cmrr_enabling/disabling and update commit message. (Ankit)

--v9:
- Revert removed line(Ankit).

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-5-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/i915: Define and compute Transcoder CMRR registers
Mitul Golani [Mon, 10 Jun 2024 07:21:56 +0000 (12:51 +0530)]
drm/i915: Define and compute Transcoder CMRR registers

Add register definitions for Transcoder Fixed Average
Vtotal mode/CMRR function, with the necessary bitfields.
Compute these registers when CMRR is enabled, extending
Adaptive refresh rate capabilities.

--v2:
- Use intel_de_read64_2x32 in intel_vrr_get_config. [Jani]
- Fix indent and order based on register offset. [Jani]

--v3:
- Removing RFC tag.

--v4:
- Update place holder for CMRR register definition. (Jani)

--v5:
- Add CMRR register definitions to a separate file intel_vrr_reg.h.

--v6:
- Fixed indentation. (Jani)
- Add dependency header intel_display_reg_defs.h. (Jani)
- Rename file name to intel_vrr_regs.h instead of reg.h (Jani)

--v7:
- Remove adding CMRR flag to vrr_ctl register during set_transcoder_timing,
as it is already being done during intel_vrr_enable. (Ankit)

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-4-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/i915: Separate VRR related register definitions
Mitul Golani [Mon, 10 Jun 2024 07:21:55 +0000 (12:51 +0530)]
drm/i915: Separate VRR related register definitions

Move VRR related register definitions to a separate file called
intel_vrr_regs.h.

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-3-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/i915: Update indentation for VRR registers and bits
Mitul Golani [Mon, 10 Jun 2024 07:21:54 +0000 (12:51 +0530)]
drm/i915: Update indentation for VRR registers and bits

Update the indentation for the VRR register definition and
its bits, and fix checkpatch issues to ensure smooth movement
of registers and bits.

--v2:
- Keep XELPD_VRR_CTL_VRR_GUARDBAND(x) to avoid readability (Ankit).
- Fix all indentation related VRR registers and bits instead of
checkpatch one.

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610072203.24956-2-mitulkumar.ajitkumar.golani@intel.com
10 months agodrm/i915/display/bmg: Add platform descriptor
Balasubramani Vivekanandan [Tue, 4 Jun 2024 14:00:21 +0000 (19:30 +0530)]
drm/i915/display/bmg: Add platform descriptor

Platform descriptor defined and PCI IDs added for Battlemage.

Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604140021.1357502-1-balasubramani.vivekanandan@intel.com
10 months agodrm/i915: pass dev_priv explicitly to HSW_STEREO_3D_CTL
Jani Nikula [Tue, 4 Jun 2024 15:26:16 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to HSW_STEREO_3D_CTL

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the HSW_STEREO_3D_CTL register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/76f980f5ed3638746c6b58dec7d0bd8c43a37987.1717514638.git.jani.nikula@intel.com
10 months agodrm/i915/bios: Define the "luminance and gamma" sub-struct of block 46
Ville Syrjälä [Wed, 5 Jun 2024 13:47:56 +0000 (16:47 +0300)]
drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46

Since BDB version 211 block 46 has included more luminance and
gamma related information. Define it fully. The data is semi-based
on DisplayID v2.0 apparently.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240605134756.17099-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915/bios: Define block 46 chromaticity coordinates properly
Ville Syrjälä [Wed, 5 Jun 2024 13:47:55 +0000 (16:47 +0300)]
drm/i915/bios: Define block 46 chromaticity coordinates properly

The VBT spec does a very poor job of defining how the chromaticity
coordinates in block 46 are laid out. After double checking the
Windows implementation it turns out these more or less match the
EDID definition, where the 10bit values are split into 2bit + 8bit
chunks. Adjust our struct definition to reflect that.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240605134756.17099-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: do not select ACPI_BUTTON
Jani Nikula [Fri, 7 Jun 2024 08:07:06 +0000 (11:07 +0300)]
drm/i915: do not select ACPI_BUTTON

We stopped using ACPI button in commit 05c72e77ccda ("drm/i915: Nuke the
LVDS lid notifier"). Also stop force enabling the ACPI_BUTTON config.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Closes: https://lore.kernel.org/r/ZmGsJsXhHcPV48XJ@intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/060d687c3a80cd94f065e637200dd10fea7b979f.1717747542.git.jani.nikula@intel.com
10 months agodrm/i915: pass dev_priv explicitly to MTL_CLKGATE_DIS_TRANS
Jani Nikula [Tue, 4 Jun 2024 15:26:23 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to MTL_CLKGATE_DIS_TRANS

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the MTL_CLKGATE_DIS_TRANS register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b330d86c5e3012513daa36dceffd2db45f0d7850.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to TRANS_SET_CONTEXT_LATENCY
Jani Nikula [Tue, 4 Jun 2024 15:26:22 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_SET_CONTEXT_LATENCY

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the TRANS_SET_CONTEXT_LATENCY register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/989f89994edae0829e3b6d5d6e3d8a521f0eda00.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to TRANS_MSA_MISC
Jani Nikula [Tue, 4 Jun 2024 15:26:21 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_MSA_MISC

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the TRANS_MSA_MISC register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1a9c0a0f8c5bba31138f0c7aebdf839b9b30298c.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to TGL_DP_TP_STATUS
Jani Nikula [Tue, 4 Jun 2024 15:26:20 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to TGL_DP_TP_STATUS

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the TGL_DP_TP_STATUS register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c7aaf0e981324bfc5b3aec31f30a7b1a158ba568.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to TGL_DP_TP_CTL
Jani Nikula [Tue, 4 Jun 2024 15:26:19 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to TGL_DP_TP_CTL

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the TGL_DP_TP_CTL register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/3d3e2b732ec9372cf6b1ae44b25342179b028b1a.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to TRANS_DDI_FUNC_CTL2
Jani Nikula [Tue, 4 Jun 2024 15:26:18 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_DDI_FUNC_CTL2

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the TRANS_DDI_FUNC_CTL2 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2b61bf9c1f74ae633c99aa34fbf1aa85735cc5b6.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to TRANS_DDI_FUNC_CTL
Jani Nikula [Tue, 4 Jun 2024 15:26:17 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to TRANS_DDI_FUNC_CTL

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the TRANS_DDI_FUNC_CTL register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/4ccf75561aa0fb209fd71c85e9089b0350570fd6.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_LINK_N2
Jani Nikula [Tue, 4 Jun 2024 15:26:15 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_LINK_N2

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_LINK_N2 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5267c167414fb46a25277c1c9a802f6ccf8de3c9.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_LINK_M2
Jani Nikula [Tue, 4 Jun 2024 15:26:14 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_LINK_M2

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_LINK_M2 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/31337adcaca1333724600b0afe6e3880f0948d5e.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_LINK_N1
Jani Nikula [Tue, 4 Jun 2024 15:26:13 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_LINK_N1

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_LINK_N1 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/0960c3726a36999b38084dce6c3824882921c475.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_LINK_M1
Jani Nikula [Tue, 4 Jun 2024 15:26:12 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_LINK_M1

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_LINK_M1 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/bf25d447d98009f56f2c5b2205719ab2d9a70c93.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_DATA_N2
Jani Nikula [Tue, 4 Jun 2024 15:26:11 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_DATA_N2

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_DATA_N2 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6eeb0c74d6e566f04a193b2a3f1272e58df66f20.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_DATA_M2
Jani Nikula [Tue, 4 Jun 2024 15:26:10 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_DATA_M2

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_DATA_M2 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1fda9b8cd446727845089844a1c8eeb5c8ae7b5a.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_DATA_N1
Jani Nikula [Tue, 4 Jun 2024 15:26:09 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_DATA_N1

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_DATA_N1 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/80759c6efdfdb59c4bd624af85b9db38ebe06f65.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_DATA_M1
Jani Nikula [Tue, 4 Jun 2024 15:26:08 +0000 (18:26 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_DATA_M1

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_DATA_M1 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/aa87444d7b2c0c695729c15730bb11aa922b7561.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to SWF3
Jani Nikula [Tue, 4 Jun 2024 15:25:53 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to SWF3

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the SWF3 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5ab27d6a4366617ba273e526a46a505c3d3c3295.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to SWF1
Jani Nikula [Tue, 4 Jun 2024 15:25:52 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to SWF1

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the SWF1 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/cd31efc114325e61e357b0f8a1106f2eb7819fff.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to SWF0
Jani Nikula [Tue, 4 Jun 2024 15:25:51 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to SWF0

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the SWF0 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/df957a1dfeddc14e4b62d6e2a1bf8104d506be87.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to CHV_CANVAS
Jani Nikula [Tue, 4 Jun 2024 15:25:50 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to CHV_CANVAS

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the CHV_CANVAS register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a48c7984a14412ef74af250d5bc2ea9097aa2222.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to CHV_BLEND
Jani Nikula [Tue, 4 Jun 2024 15:25:49 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to CHV_BLEND

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the CHV_BLEND register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a2c5064ee3a985f7b7b5c7e672737df447d3af29.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_FLIPCOUNT_G4X
Jani Nikula [Tue, 4 Jun 2024 15:25:48 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_FLIPCOUNT_G4X

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_FLIPCOUNT_G4X register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c53a6f5cd97976f43fbae442034074d2ea9aac42.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_FRMCOUNT_G4X
Jani Nikula [Tue, 4 Jun 2024 15:25:47 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_FRMCOUNT_G4X

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_FRMCOUNT_G4X register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/747124e5eebdb58b06d70a0aae0af4dd7e6b7d86.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to DSPFW3
Jani Nikula [Tue, 4 Jun 2024 15:25:46 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to DSPFW3

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the DSPFW3 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/856978ed413e537b7d46eed5e8d93bdfd7c80fc6.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to DSPFW2
Jani Nikula [Fri, 7 Jun 2024 08:26:36 +0000 (11:26 +0300)]
drm/i915: pass dev_priv explicitly to DSPFW2

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the DSPFW2 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ba349f90b6614605c52f58ae048961c7b4da4495.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to DSPFW1
Jani Nikula [Tue, 4 Jun 2024 15:25:44 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to DSPFW1

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the DSPFW1 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/4843726dff7d95e4127fb948073c9e4addc1e683.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to DSPARB
Jani Nikula [Tue, 4 Jun 2024 15:25:43 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to DSPARB

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the DSPARB register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9e8dc8978ce3122a0e9c53778be547875a9ae6d8.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to ICL_PIPESTATUS
Jani Nikula [Tue, 4 Jun 2024 15:25:42 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to ICL_PIPESTATUS

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the ICL_PIPESTATUS register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d9a7ef1ff8e848cd10729f4ee033d1ef55ee78cc.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPE_ARB_CTL
Jani Nikula [Tue, 4 Jun 2024 15:25:41 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to PIPE_ARB_CTL

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_ARB_CTL register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e75e80bd96e05ece6b82c0bdb509527ab2dd0e6d.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPESTAT
Jani Nikula [Tue, 4 Jun 2024 15:25:40 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to PIPESTAT

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPESTAT register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8b18a1e77ccfd451bbaee80b6ddb23bdbc479336.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPEFRAMEPIXEL
Jani Nikula [Tue, 4 Jun 2024 15:25:39 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to PIPEFRAMEPIXEL

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPEFRAMEPIXEL register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/464d4536f90e9d463458cdd315b3ba650e12ada5.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
10 months agodrm/i915: pass dev_priv explicitly to PIPEFRAME
Jani Nikula [Tue, 4 Jun 2024 15:25:38 +0000 (18:25 +0300)]
drm/i915: pass dev_priv explicitly to PIPEFRAME

Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPEFRAME register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7e6d1a8d3ae2a42efa3a48884e0e37357e0108c1.1717514638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>