]> git.proxmox.com Git - mirror_ubuntu-kernels.git/log
mirror_ubuntu-kernels.git
13 months agodrm/i915/dp: Pass connector DSC DPCD to drm_dp_dsc_sink_supported_input_bpcs()
Imre Deak [Fri, 6 Oct 2023 13:37:18 +0000 (16:37 +0300)]
drm/i915/dp: Pass connector DSC DPCD to drm_dp_dsc_sink_supported_input_bpcs()

Use the connector's DSC DPCD capabilities in
drm_dp_dsc_sink_supported_input_bpcs().

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/20231006133727.1822579-11-imre.deak@intel.com
13 months agodrm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_max_sink_compressed_bppx16()
Imre Deak [Fri, 6 Oct 2023 13:37:17 +0000 (16:37 +0300)]
drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_max_sink_compressed_bppx16()

Use the connector's DSC DPCD capabilities in
intel_dp_dsc_max_sink_compressed_bppx16().

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@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/20231006133727.1822579-10-imre.deak@intel.com
13 months agodrm/i915/dp: Use connector DSC DPCD in intel_dp_supports_dsc()
Imre Deak [Fri, 6 Oct 2023 13:37:16 +0000 (16:37 +0300)]
drm/i915/dp: Use connector DSC DPCD in intel_dp_supports_dsc()

Use the connector's DSC DPCD capabilities in intel_dp_supports_dsc().

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@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/20231006133727.1822579-9-imre.deak@intel.com
13 months agodrm/i915/dp: Use connector DSC DPCD in intel_dp_supports_fec()
Imre Deak [Fri, 6 Oct 2023 13:37:15 +0000 (16:37 +0300)]
drm/i915/dp: Use connector DSC DPCD in intel_dp_supports_fec()

Use the connector's DSC DPCD capabilities in intel_dp_supports_fec().

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@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/20231006133727.1822579-8-imre.deak@intel.com
13 months agodrm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_compute_max_bpp()
Imre Deak [Fri, 6 Oct 2023 13:37:14 +0000 (16:37 +0300)]
drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_compute_max_bpp()

Use the connector's DSC DPCD capabilities in intel_dp_dsc_compute_max_bpp()
instead of the version stored in the encoder.

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@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/20231006133727.1822579-7-imre.deak@intel.com
13 months agodrm/i915/dp: Use connector DSC DPCD in i915_dsc_fec_support_show()
Imre Deak [Fri, 6 Oct 2023 13:37:13 +0000 (16:37 +0300)]
drm/i915/dp: Use connector DSC DPCD in i915_dsc_fec_support_show()

Use the connector's DSC DPCD capabilities in i915_dsc_fec_support_show()
instead of the version stored in the encoder. Atm the two are identical,
but a follow-up patch will store the (MST) connector specific version
in the connector.

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@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/20231006133727.1822579-6-imre.deak@intel.com
13 months agodrm/i915/dp: Use i915/intel connector local variables in i915_dsc_fec_support_show()
Imre Deak [Fri, 6 Oct 2023 13:37:12 +0000 (16:37 +0300)]
drm/i915/dp: Use i915/intel connector local variables in i915_dsc_fec_support_show()

Cache the i915 specific device and connector pointers in
i915_dsc_fec_support_show().

v2:
- s/Cahce/Cache typo in commit log. (Stan)

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@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/20231006133727.1822579-5-imre.deak@intel.com
13 months agodrm/i915/dp_mst: Set connector DSC capabilities and decompression AUX
Imre Deak [Tue, 10 Oct 2023 11:25:03 +0000 (14:25 +0300)]
drm/i915/dp_mst: Set connector DSC capabilities and decompression AUX

Similarly to eDP and SST-DP connectors read out the DSC capabilities for
MST connectors as well. Atm these will match the root port's DSC caps
and only used after a follow-up change enables the decompression for
each stream separately (vs. the current way of enabling it only globally
in the first branch device downstream of the root port).

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@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/20231010112504.2156789-3-imre.deak@intel.com
13 months agodrm/i915/dp: Store DSC DPCD capabilities in the connector
Imre Deak [Wed, 11 Oct 2023 17:16:05 +0000 (20:16 +0300)]
drm/i915/dp: Store DSC DPCD capabilities in the connector

In an MST topology the DSC capabilities are specific to each connector,
retrieved either from the sink if it decompresses the stream, or from a
branch device between the source and the sink in case this branch device
does the decompression. Accordingly each connector needs to cache its
own DSC DPCD and FEC capabilities, along with the AUX device through
which the decompression can be enabled. This patch prepares for that by
storing the capabilities and the DSC AUX device in the connector, for
now these just matching the version stored in intel_dp. The follow-up
patches will convert all users to look up these in the connector instead
of intel_dp, after which the intel_dp copies are removed.

v2:
- Rebased on intel_edp_get_dsc_sink_cap() addition in previous patch.
v3:
- Rebased on read-out fix for eDP in previous patch.

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> (v1)
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/20231011171606.2540078-2-imre.deak@intel.com
13 months agodrm/i915/dp: Sanitize DPCD revision check in intel_dp_get_dsc_sink_cap()
Imre Deak [Wed, 11 Oct 2023 17:16:04 +0000 (20:16 +0300)]
drm/i915/dp: Sanitize DPCD revision check in intel_dp_get_dsc_sink_cap()

Check only the eDP or the DP specific DPCD revision depending on the
sink type. Pass the corresponding revision to the function, which allows
getting the DSC caps of a branch device (in an MST topology, which has
its own DPCD and so DPCD revision).

While at it use DP_DPCD_REV_14 instead of open coding it and for clarity
add a separate function to read out the DSC capability on eDP.

v2:
- Use DP_DPCD_REV_14 instead of open coding it. (Stan)
- Check EDP_DCPD_REV/DPCD_REV in a clearer way. (Ville)
v3:
- Fix the read-out for eDP in intel_dp_detect().

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> (v1)
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v2)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231011171606.2540078-1-imre.deak@intel.com
13 months agodrm/i915/dsb: Re-instate DSB for LUT updates
Ville Syrjälä [Mon, 9 Oct 2023 13:22:03 +0000 (16:22 +0300)]
drm/i915/dsb: Re-instate DSB for LUT updates

With all the known issues sorted out we can start to use
DSB to load the LUTs.

Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231009132204.15098-3-ville.syrjala@linux.intel.com
13 months agodrm/i915/dsb: Correct DSB command buffer cache coherency settings
Ville Syrjälä [Mon, 9 Oct 2023 13:22:02 +0000 (16:22 +0300)]
drm/i915/dsb: Correct DSB command buffer cache coherency settings

The display engine does not snoop the caches so we should mark
the DSB command buffer as I915_CACHE_NONE.
i915_gem_object_create_internal() always gives us I915_CACHE_LLC
on LLC platforms. And to make things 100% correct we should also
clflush at the end, if necessary.

Note that currently this is a non-issue as we always write the
command buffer through a WC mapping, so a cache flush is not actually
needed. But we might actually want to consider a WB mapping since
we also end up reading from the command buffer (in the indexed
reg write handling). Either that or we should do something else
to avoid those reads (might actually be even more sensible on DGFX
since we end up reading over PCIe). But we should measure the overhead
first...

Anyways, no real harm in adding the belts and suspenders here so
that the code will work correctly regardless of how we map the
buffer. If we do get a WC mapping (as we request)
i915_gem_object_flush_map() will be a nop. Well, apart form
a wmb() which may just flush the WC buffer a bit earlier
than would otherwise happen (at the latest the mmio accesses
would trigger the WC flush).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231009132204.15098-2-ville.syrjala@linux.intel.com
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
13 months agodrm/i915/dsb: Allocate command buffer from local memory
Ville Syrjälä [Mon, 9 Oct 2023 13:22:01 +0000 (16:22 +0300)]
drm/i915/dsb: Allocate command buffer from local memory

Using system memory for the DSB command buffer doesn't appear to work.
On DG2 it seems like the hardware internally replaces the actual memory
reads with zeroes, and so we end up executing a bunch of NOOPs instead
of whatever commands we put in the buffer. To determine that I measured
the time it takes to execute the instructions, and the results are
always more or less consistent with executing a buffer full of NOOPs
from local memory.

Another theory I considered was some kind of cache coherency issue.
Looks like i915_gem_object_pin_map_unlocked() will in fact give you a
WB mapping for system memory on DGFX regardless of what mapping mode
was requested (WC in case of the DSB code). But clflush did not
change the behaviour at all, so that theory seems moot.

On DG1 it looks like the hardware might actually be fetching data from
system memory as the logs indicate that we just get underruns. But that
is equally bad, so doesn't look like we can really use system memory on
DG1 either.

Thus always allocate the DSB command buffer from local memory on
discrete GPUs.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231009132204.15098-1-ville.syrjala@linux.intel.com
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
13 months agodrm/i915/lnl: Remove watchdog timers for PSR
Mika Kahola [Tue, 10 Oct 2023 09:52:33 +0000 (12:52 +0300)]
drm/i915/lnl: Remove watchdog timers for PSR

Watchdog timers for Lunarlake HW were removed for PSR/PSR2
The patch removes the use of these timers from the driver code.

BSpec: 69895

v2: Reword commit message (Ville)
    Drop HPD mask from LNL (Ville)
    Revise masking logic (Jouni)
v3: Revise commit message (Ville)
    Revert HPD mask removal as irrelevant for this patch (Ville)

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231010095233.590613-1-mika.kahola@intel.com
13 months agodrm/i915: Add new DG2 PCI IDs
Shekhar Chauhan [Wed, 11 Oct 2023 08:00:39 +0000 (13:30 +0530)]
drm/i915: Add new DG2 PCI IDs

Add recently added PCI IDs for DG2

BSpec: 44477
Signed-off-by: Shekhar Chauhan <shekhar.chauhan@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231011080039.2781048-1-shekhar.chauhan@intel.com
13 months agodrm/i915/dsi: Add some debug logging to mipi_exec_i2c (v2)
Hans de Goede [Wed, 20 Sep 2023 19:56:13 +0000 (21:56 +0200)]
drm/i915/dsi: Add some debug logging to mipi_exec_i2c (v2)

Add some debug logging to mipi_exec_i2c, to make debugging various
issues seen with it easier.

Changes in v2:
- Drop unnecessary __func__ drm_dbg_kms() argument

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230920195613.304091-5-hdegoede@redhat.com
13 months agodrm/i915/vlv_dsi: Add DMI quirk for backlight control issues on Lenovo Yoga Tab 3...
Hans de Goede [Wed, 20 Sep 2023 19:56:12 +0000 (21:56 +0200)]
drm/i915/vlv_dsi: Add DMI quirk for backlight control issues on Lenovo Yoga Tab 3 (v2)

On the Lenovo Yoga Tab 3 Pro YT3-X90F there are 2 issues with the backlight
on/off MIPI sequences:

1. The backlight on sequence has an I2C MIPI sequence element which uses
   bus 0, but there is a bogus I2cSerialBus resource under the GPU in
   the DSDT which causes i2c_acpi_find_adapter() to pick the wrong bus.

2. There is no backlight off sequence, causing the backlight to stay on.

Add a DMI quirk fixing both issues.

v2:
- Add Closes tag to gitlab issue with drm.debug=0xe, VBT info

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9380
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230920195613.304091-4-hdegoede@redhat.com
13 months agodrm/i915/vlv_dsi: Add DMI quirk for wrong I2C bus and panel size on Lenovo Yoga Table...
Hans de Goede [Wed, 20 Sep 2023 19:56:11 +0000 (21:56 +0200)]
drm/i915/vlv_dsi: Add DMI quirk for wrong I2C bus and panel size on Lenovo Yoga Tablet 2 series (v3)

On the Lenovo Yoga Tablet 2 830 / 1050 there are 2 problems:

1. The I2C MIPI sequence elements reference bus 3. ACPI has I2C1 - I2C7
   which under Linux become bus 0 - 6. And the MIPI sequence reference
   to bus 3 is indented for I2C3 which is bus 2 under Linux.

   This leads to errors like these:
   [  178.244049] i2c_designware 80860F41:03: controller timed out
   [  178.245703] i915 0000:00:02.0: [drm] *ERROR* Failed to xfer payload of size (1) to reg (169)
   There are 3 timeouts when the panel is on, delaying
   waking up the screen on a key press by 3 seconds.

   Note mipi_exec_i2c() cannot just subtract 1 from the bus
   given in the I2C MIPI sequence element. Since on other
   devices the I2C bus-numbers used in the MIPI sequences do
   actually start at 0.

2. width_/height_mm contain a bogus 192mm x 120mm size. This is
   especially a problem on the 8" 830 version which uses a 10:16
   portrait screen where as the bogus size is 16:10.

Add a DMI quirk to override the I2C bus and the panel size with
the correct values.

Note both the 10" 1050 models as well as the 8" 830 models use the same
mainboard and thus the same DMI strings. The 10" 1050 uses a 1920x1200
landscape screen, where as the 8" 830 uses a 1200x1920 portrait screen,
so the quirk handling uses the display resolution to detect the model.

v2:
- Also override i2c_bus_num to fix mipi_exec_i2c() timeouts

v3:
- Add Closes tag to gitlab issue with drm.debug=0xe, VBT info

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9379
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230920195613.304091-3-hdegoede@redhat.com
13 months agodrm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on Asus TF103C (v3)
Hans de Goede [Wed, 20 Sep 2023 19:56:10 +0000 (21:56 +0200)]
drm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on Asus TF103C (v3)

Vtotal is wrong in the BIOS supplied modeline for the DSI panel on
the Asus TF103C leading to the last line of the display being shown
as the first line.

Original: "1280x800": 60 67700 1280 1312 1328 1376 800 808 812 820 0x8 0xa
Fixed:    "1280x800": 60 67700 1280 1312 1328 1376 800 808 812 816 0x8 0xa

The factory installed Android has a hardcoded modeline in its kernel,
causing it to not suffer from this BIOS bug;
and the Android boot-splash which uses the EFI FB which does have this bug
has the last line all black causing the bug to not be visible.

This commit introduces a generic DMI based quirk mechanism to vlv_dsi for
doing various fixups, and uses this to correct the modeline.

v2:
- s/mode_fixup/dmi_quirk/ to make the new DMI quirk mechanism more generic
- Add a comment with the old and new modelines to the patch and commit msg

v3:
- Add Closes tag to gitlab issue with drm.debug=0xe, VBT info

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9381
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230920195613.304091-2-hdegoede@redhat.com
13 months agodrm/i915: Remove the module parameter 'fastboot'
Arun R Murthy [Tue, 26 Sep 2023 09:11:57 +0000 (14:41 +0530)]
drm/i915: Remove the module parameter 'fastboot'

By default fastboot is enabled on all Display 9+ platforms and disabled
on older platforms. Its not necessary to retain this as a module
parameter.

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926091157.635438-1-arun.r.murthy@intel.com
13 months agodrm/i915/hdcp: Move common message filling function to its own file
Suraj Kandpal [Mon, 9 Oct 2023 09:55:37 +0000 (15:25 +0530)]
drm/i915/hdcp: Move common message filling function to its own file

Create a new file intel_hdcp_gsc_message that contain functions
which fill the hdcp messages we send to gsc cs this refactor will
help us reuse code for Xe later on

--v2
-add the missed file for proper build

--v3
-use forward declarations instead of #includes [Jani]

--v4
-move linux/err.h to intel_hdcp_gsc_message.c from
intel_hdcp_gsc_message.h [Jani]

--v5
-move linux include on top of drm includes [Uma]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231009095537.653619-3-suraj.kandpal@intel.com
13 months agodrm/i915/hdcp: Move checks for gsc health status
Suraj Kandpal [Mon, 9 Oct 2023 09:55:36 +0000 (15:25 +0530)]
drm/i915/hdcp: Move checks for gsc health status

Move checks for gsc components required for HDCP 2.2
to work into intel_hdcp_gsc.c. This will also help
with XE refactor on HDCP's side.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231009095537.653619-2-suraj.kandpal@intel.com
13 months agodrm/i915/display: Use correct method to free crtc_state
Suraj Kandpal [Tue, 10 Oct 2023 18:31:01 +0000 (00:01 +0530)]
drm/i915/display: Use correct method to free crtc_state

Even though there is no leaking of resource here lets
just use the correct method to free crtc_state

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231010183101.704439-3-suraj.kandpal@intel.com
13 months agodrm/i915/display: Use intel_crtc_destroy_state instead kfree
Suraj Kandpal [Tue, 10 Oct 2023 18:31:00 +0000 (00:01 +0530)]
drm/i915/display: Use intel_crtc_destroy_state instead kfree

intel_encoder_current_mode() seems to leak some resource because
it uses kfree instead of intel_crtc_destroy_state let us fix that.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231010183101.704439-2-suraj.kandpal@intel.com
13 months agodrm/i915: enable W=1 warnings by default
Jani Nikula [Wed, 11 Oct 2023 07:29:04 +0000 (10:29 +0300)]
drm/i915: enable W=1 warnings by default

We enable a bunch more compiler warnings than the kernel
defaults. However, they've drifted to become a unique set of warnings,
and have increasingly fallen behind from the W=1 set.

Align with the W=1 warnings from scripts/Makefile.extrawarn for clarity,
by copy-pasting them with s/KBUILD_CFLAGS/subdir-ccflags-y/ to make it
easier to compare in the future.

Some of the -Wextra warnings do need to be disabled, just like in
Makefile.extrawarn, but take care to not disable them for W=2 or W=3
builds, depending on the warning.

v2: Add back some -Wextra warning disables (Nathan)

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
[Final s/KBUILD_CFLAGS/subdir-ccflags-y/ fix while applying]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/69a812273091b6535ddc7f9346289d71bb30f43d.1697009258.git.jani.nikula@intel.com
13 months agodrm/i915: drop -Wall and related disables from cflags as redundant
Jani Nikula [Wed, 11 Oct 2023 07:29:03 +0000 (10:29 +0300)]
drm/i915: drop -Wall and related disables from cflags as redundant

The kernel top level Makefile, and recently scripts/Makefile.extrawarn,
have included -Wall, and the disables -Wno-format-security and
$(call cc-disable-warning,frame-address,) for a very long time. They're
redundant in our local subdir-ccflags-y and can be dropped.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5ab754ddc2e342c75deb8476275984918e573beb.1697009258.git.jani.nikula@intel.com
13 months agodrm/i915/cx0: Only clear/set the Pipe Reset bit of the PHY Lanes Owned
Khaled Almahallawy [Thu, 5 Oct 2023 00:13:10 +0000 (17:13 -0700)]
drm/i915/cx0: Only clear/set the Pipe Reset bit of the PHY Lanes Owned

Currently, with MFD/pin assignment D, the driver clears the pipe reset bit
of lane 1 which is not owned by display. This causes the display
to block S0iX.

By not clearing this bit for lane 1 and keeping whatever default, S0ix
started to work. This is already what the driver does at the end
of the phy lane reset sequence (Step#8)

Bspec: 65451
Fixes: 619a06dba6fa ("drm/i915/mtl: Reset only one lane in case of MFD")
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Khaled Almahallawy <khaled.almahallawy@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231005001310.154396-1-khaled.almahallawy@intel.com
13 months agodrm/i915/gvt: move structs intel_gvt_irq_info and intel_gvt_irq_map to interrupt.c
Jani Nikula [Tue, 26 Sep 2023 12:19:04 +0000 (15:19 +0300)]
drm/i915/gvt: move structs intel_gvt_irq_info and intel_gvt_irq_map to interrupt.c

Structs intel_gvt_irq_info and intel_gvt_irq_map are not used outside of
interrupt.c. Hide them, and reduce includes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926121904.499888-4-jani.nikula@intel.com
13 months agodrm/i915/gvt: move struct engine_mmio to mmio_context.c
Jani Nikula [Tue, 26 Sep 2023 12:19:03 +0000 (15:19 +0300)]
drm/i915/gvt: move struct engine_mmio to mmio_context.c

struct engine_mmio is not used outside of mmio_context.c. Hide it, and
reduce includes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926121904.499888-3-jani.nikula@intel.com
13 months agodrm/i915/gvt: don't include gvt.h from intel_gvt_mmio_table.h
Jani Nikula [Tue, 26 Sep 2023 12:19:02 +0000 (15:19 +0300)]
drm/i915/gvt: don't include gvt.h from intel_gvt_mmio_table.h

intel_gvt_mmio_table.c has no need to include the massive
gvt.h. Simplify.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926121904.499888-2-jani.nikula@intel.com
13 months agodrm/i915/gvt: remove unused to_gvt() and reduce includes
Jani Nikula [Tue, 26 Sep 2023 12:19:01 +0000 (15:19 +0300)]
drm/i915/gvt: remove unused to_gvt() and reduce includes

gvt.h has no need to include i915_drv.h once the unused to_gvt() has
been removed.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926121904.499888-1-jani.nikula@intel.com
13 months agodrm/i915/xe2lpd: update the scaler feature capability
Vinod Govindapillai [Sun, 1 Oct 2023 11:31:55 +0000 (14:31 +0300)]
drm/i915/xe2lpd: update the scaler feature capability

Update the number of scalers per pipe based on the display
capabilities reported.

v1: define the field values instead of the magic number (JaniN)

Bspec: 71161
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231001113155.80659-4-vinod.govindapillai@intel.com
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
13 months agodrm/i915/xe2lpd: update the dsc feature capability
Vinod Govindapillai [Sun, 1 Oct 2023 11:31:54 +0000 (14:31 +0300)]
drm/i915/xe2lpd: update the dsc feature capability

Update the global dsc flag based on the display capabilities
reported.

v1: define the field values instead of the magic number (JaniN)

Bspec: 71161
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231001113155.80659-3-vinod.govindapillai@intel.com
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
13 months agodrm/i915/xe2lpd: display capability register definitions
Vinod Govindapillai [Sun, 1 Oct 2023 11:31:53 +0000 (14:31 +0300)]
drm/i915/xe2lpd: display capability register definitions

Register definitions to track the reported scalable display
feature configurations

Bspec: 71161
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231001113155.80659-2-vinod.govindapillai@intel.com
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
13 months agodrm/i915: Add wrapper for getting display step
Chaitanya Kumar Borah [Tue, 3 Oct 2023 06:52:11 +0000 (12:22 +0530)]
drm/i915: Add wrapper for getting display step

Add a wrapper around intel_step_name that takes in driver data as an
argument. This wrapper will help maintain compatibility with the
proposed xe driver.

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231003065211.1052385-1-chaitanya.kumar.borah@intel.com
13 months agodrm/i915/display: Free crtc_state in verify_crtc_state
Suraj Kandpal [Tue, 10 Oct 2023 05:32:09 +0000 (11:02 +0530)]
drm/i915/display: Free crtc_state in verify_crtc_state

Free hw_crtc_state in verify_crtc_state after we are done using
this or else it's just a resource leak.

Fixes: 2745bdda2095 ("drm/i915: Stop clobbering old crtc state during state check")
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231010053208.691260-1-suraj.kandpal@intel.com
13 months agodrm/i915: Fix VLV color state readout
Ville Syrjälä [Mon, 9 Oct 2023 14:58:28 +0000 (17:58 +0300)]
drm/i915: Fix VLV color state readout

VLV was missed when the color.get_config() hook was added.
Remedy that.

Not really sure what the final plan here was since a bunch of
color related readout was left in intel_display.c anyway,
but that's for anothr day to figure out...

Cc: Jani Nikula <jani.nikula@intel.com>
Fixes: 9af09dfcdfa1 ("drm/i915/color: move pre-SKL gamma and CSC enable read to intel_color")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231009145828.12960-1-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915/uapi: fix doc typos
Randy Dunlap [Sun, 8 Oct 2023 21:49:40 +0000 (14:49 -0700)]
drm/i915/uapi: fix doc typos

Correct typo of "its".
Add commas for clarity.
Capitalize L3.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231008214942.28439-1-rdunlap@infradead.org
13 months agodrm/i915/ddi: Remove redundant intel_connector NULL check
Suraj Kandpal [Fri, 6 Oct 2023 07:28:31 +0000 (12:58 +0530)]
drm/i915/ddi: Remove redundant intel_connector NULL check

Remove redundant intel_connector NULL check. Having it here just
creates further confusion and also the variable already gets
dereferenced before the aforementioned NULL check

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231006072830.581487-1-suraj.kandpal@intel.com
13 months agodrm/i915: s/dev_priv/i915/ in the state checker
Ville Syrjälä [Wed, 4 Oct 2023 15:56:07 +0000 (18:56 +0300)]
drm/i915: s/dev_priv/i915/ in the state checker

Switch the state checker over to using the new 'i915' variable
name insteda of the old 'dev_priv'.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-13-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: s/pipe_config/crtc_state/ in the state checker
Ville Syrjälä [Wed, 4 Oct 2023 15:56:06 +0000 (18:56 +0300)]
drm/i915: s/pipe_config/crtc_state/ in the state checker

Switch over to the modern variable naming in the state checker.
Ie. rename the pipe_config stuff to crtc_state.

Also make it clear which is the "software state" (ie. what the
current state should be) vs. "hardware state" (ie. what the
currnet state really is).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-12-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: Simplify the state checker calling convetions
Ville Syrjälä [Wed, 4 Oct 2023 15:56:05 +0000 (18:56 +0300)]
drm/i915: Simplify the state checker calling convetions

We're passing in a totally random mismash of things into the state
checker. Clean it up to pass in the minimum needed.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-11-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: Constify remainder of the state checker
Ville Syrjälä [Wed, 4 Oct 2023 15:56:04 +0000 (18:56 +0300)]
drm/i915: Constify remainder of the state checker

Mark the remaining crtc states used by the state checker as const.
There is no reason to ever mutate them here.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-10-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: Simplify snps/c10x DPLL state checker calling convetion
Ville Syrjälä [Wed, 4 Oct 2023 15:56:03 +0000 (18:56 +0300)]
drm/i915: Simplify snps/c10x DPLL state checker calling convetion

Passing in the atomic state + crtc state is a bit weird. The latter
can be just the crtc (which is the normal calling convention used
in a lot of other places).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-9-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: Constify the snps/c10x PLL state checkers
Ville Syrjälä [Wed, 4 Oct 2023 15:56:02 +0000 (18:56 +0300)]
drm/i915: Constify the snps/c10x PLL state checkers

State checkers should never modify the crtc states, so make
them const.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-8-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: Simplify watermark state checker calling convention
Ville Syrjälä [Thu, 5 Oct 2023 12:27:13 +0000 (15:27 +0300)]
drm/i915: Simplify watermark state checker calling convention

There is never any reason to pass in both the crtc and its state
as one can always dig out the crtc from its state. But for more
consistency across the whole state checker let's just pass the
overall atomic state+crtc here as well.

v2: Also pass state+crtc here (Jani)

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/20231005122713.3531-1-ville.syrjala@linux.intel.com
13 months agodrm/i915: Constify watermark state checker
Ville Syrjälä [Wed, 4 Oct 2023 15:56:00 +0000 (18:56 +0300)]
drm/i915: Constify watermark state checker

The skl+ wm state checker has no reason to modify the crtc state,
so make it const.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: Simplify DPLL state checker calling convention
Ville Syrjälä [Wed, 4 Oct 2023 15:55:59 +0000 (18:55 +0300)]
drm/i915: Simplify DPLL state checker calling convention

Make life simpler by just passing in the atomic state + crtc
instead of plumbing in all kinds of crtc states.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: Constify the crtc states in the DPLL checker
Ville Syrjälä [Wed, 4 Oct 2023 15:55:58 +0000 (18:55 +0300)]
drm/i915: Constify the crtc states in the DPLL checker

The DPLL state checker should not be modifying the crtc states,
so make the const.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-4-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: Stop clobbering old crtc state during state check
Ville Syrjälä [Wed, 4 Oct 2023 15:55:57 +0000 (18:55 +0300)]
drm/i915: Stop clobbering old crtc state during state check

The state checker overwrites the old crtc state with the
current hardware state. While that does save a kmalloc() it seems
rather dubious as there might still be something that we need
in the old crtc state.

Stop doing that and just allocate a temporary state for the state
checker. Should the extra malloc during the commit phase turn out
too annoying we could of course preallocate one for each crtc, but
let's proceed with the straightforward approch for now.

And while at it let's mark the new crtc state as const to make
sure the state checker doesn't mess it up.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915/psr: Unify PSR pre/post plane update hooks
Ville Syrjälä [Wed, 4 Oct 2023 15:55:56 +0000 (18:55 +0300)]
drm/i915/psr: Unify PSR pre/post plane update hooks

intel_psr_pre_plane_update() operates on a per-crtc level, whereas
intel_psr_post_plane_update() operates on the whole atomic commit,
for no real reason that I can see. Adjust intel_psr_post_plane_update()
to match the intel_psr_pre_plane_update() approach.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915/fbc: Remove pointless "stride is multiple of 64 bytes" check
Ville Syrjälä [Tue, 3 Oct 2023 19:42:56 +0000 (22:42 +0300)]
drm/i915/fbc: Remove pointless "stride is multiple of 64 bytes" check

Plane stride is always a multiple of 64 bytes. Remove the
pointless check that really doesn't have anything to do
with FBC.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231003194256.28569-6-ville.syrjala@linux.intel.com
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
13 months agodrm/i915/fbc: Split plane pixel format checks per-platform
Ville Syrjälä [Tue, 3 Oct 2023 19:42:55 +0000 (22:42 +0300)]
drm/i915/fbc: Split plane pixel format checks per-platform

Carve up pixel_format_is_valid() into per-platform variants to
make it easier to see what limits are actually being imposed.

Note that the XRGB1555 can be dropped from the g4x+ variant
since the plane no longer supports that format anyway.

TODO: maybe go for vfuncs later

v2: Update for lnl changes

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> #v1
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231003194256.28569-5-ville.syrjala@linux.intel.com
13 months agodrm/i915/fbc: Split plane rotation checks per-platform
Ville Syrjälä [Tue, 3 Oct 2023 19:42:54 +0000 (22:42 +0300)]
drm/i915/fbc: Split plane rotation checks per-platform

Carve up rotation_is_valid() into per-platform variants to
make it easier to see what limits are actually being imposed.

TODO: maybe go for vfuncs later

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231003194256.28569-4-ville.syrjala@linux.intel.com
13 months agodrm/i915/fbc: Split plane tiling checks per-platform
Ville Syrjälä [Tue, 3 Oct 2023 19:42:53 +0000 (22:42 +0300)]
drm/i915/fbc: Split plane tiling checks per-platform

Carve up tiling_is_valid() into per-platform variants to
make it easier to see what limits are actually being imposed.

TODO: maybe go for vfuncs later

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231003194256.28569-3-ville.syrjala@linux.intel.com
13 months agodrm/i915/fbc: Split plane stride checks per-platform
Ville Syrjälä [Tue, 3 Oct 2023 19:42:52 +0000 (22:42 +0300)]
drm/i915/fbc: Split plane stride checks per-platform

Carve up stride_is_valid() into per-platform variants to
make it easier to see what limits are actually being imposed.

TODO: maybe go for vfuncs later

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231003194256.28569-2-ville.syrjala@linux.intel.com
13 months agodrm/i915/fbc: Remove ancient 16k plane stride limit
Ville Syrjälä [Tue, 3 Oct 2023 19:42:51 +0000 (22:42 +0300)]
drm/i915/fbc: Remove ancient 16k plane stride limit

The 16k max plane stride limit seems to be originally from
i965gm, and no explicit limit has been specified since (g4x+).
So let's assume the max plane stride itself is a suitable limit
also for the more recent FBC hardware.

In fact even for i965gm the max X-tiled stride is also 16k so
technically we don't need the check there either, but let's
keep it there anyway since it's explicitly mentioned in the
spec. Gen2/3 have more strict limits checked separately.

Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231003194256.28569-1-ville.syrjala@linux.intel.com
13 months agodrm/i915/pmu: Use local64_try_cmpxchg in i915_pmu_event_read
Uros Bizjak [Mon, 3 Jul 2023 15:08:18 +0000 (17:08 +0200)]
drm/i915/pmu: Use local64_try_cmpxchg in i915_pmu_event_read

Use local64_try_cmpxchg instead of local64_cmpxchg (*ptr, old, new) == old
in i915_pmu_event_read. x86 CMPXCHG instruction returns success in ZF flag,
so this change saves a compare after cmpxchg (and related move instruction
in front of cmpxchg).

Also, try_cmpxchg implicitly assigns old *ptr value to "old" when cmpxchg
fails. There is no need to re-read the value in the loop.

No functional change intended.

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230703150859.6176-1-ubizjak@gmail.com
13 months agodrm/i915/display: Created exclusive version of vga decode setup
Uma Shankar [Fri, 29 Sep 2023 07:43:06 +0000 (13:13 +0530)]
drm/i915/display: Created exclusive version of vga decode setup

Current vga arbiter implementation in i915 needs a re-design.
The current approach would cause real problems if anyone actually
needs to talk another GPU using legacy VGA resources.

The main issue is that X becomes a slideshow if it thinks there
are multiple GPUs that have VGA decoding enabled as it insists
on adjusting the VGA routing pretty much for every little operation
involving any of the GPUs.

The cleanup will be planned for i915. Meanwhile to focus on Xe
upstreaming and have a cleaner separation, the said functionality
is being moved to a different file exclusive for i915. Xe driver
will re-use rest of the display code from i915.

v2: Addressed Jani Nikula's review comments.

v3: Dropped a duplicate function (Jani)

v4: Updated commit message with reasoning as sugested by Ville.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230929074306.1533859-1-uma.shankar@intel.com
13 months agodrm/i915/dp_mst: Make sure pbn_div is up-to-date after sink reconnect
Imre Deak [Fri, 29 Sep 2023 15:49:29 +0000 (18:49 +0300)]
drm/i915/dp_mst: Make sure pbn_div is up-to-date after sink reconnect

Atm the MST encoder config computation may use an out-of-date pbn_div
value, if the sink is unplugged and a sink is replugged with different
link rate/lane count capabilities. The current way of reinitializing
pbn_div depends on pbn_div getting cleared via intel_atomic_check() ->
drm_dp_mst_atomic_check() ->
drm_dp_mst_atomic_check_payload_alloc_limits(), however the clearing
won't happen if the sink got unplugged (and hence
drm_dp_mst_topology_mgr::mst_state being false).

To fix the above, simply update pbn_div unconditionally during config
computation, making pbn_div always match the link rate and lane count.

Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230929154929.343947-1-imre.deak@intel.com
13 months agodrm/i915/display/lspcon: Increase LSPCON mode settle timeout
Niko Tsirakis [Mon, 2 Oct 2023 20:47:09 +0000 (20:47 +0000)]
drm/i915/display/lspcon: Increase LSPCON mode settle timeout

This is to eliminate all cases of "*ERROR* LSPCON mode hasn't settled",
followed by link training errors. Intel engineers recommended increasing
this timeout and that does resolve the issue.

On some CometLake-based device designs the Parade PS175 takes more than
400ms to settle in PCON mode. 100 reboot trials on one device resulted
in a median settle time of 440ms and a maximum of 444ms. Even after
increasing the timeout to 500ms, 2% of devices still had this error. So
this increases the timeout to 800ms.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9443
Signed-off-by: Pablo Ceballos <pceballos@google.com>
Signed-off-by: Niko Tsirakis <ntsirakis@google.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231002204709.761089-1-ntsirakis@google.com
13 months agodrm/i915/gt: remove i915->gt0 in favour of i915->gt[0]
Jani Nikula [Mon, 2 Oct 2023 08:47:04 +0000 (11:47 +0300)]
drm/i915/gt: remove i915->gt0 in favour of i915->gt[0]

Since gt0 == i915->gt[0], just drop the former.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Acked-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/5319364f4c9416fed218382d020a57c5b0a17bee.1696236329.git.jani.nikula@intel.com
13 months agodrm/i915: allocate i915->gt0 dynamically
Jani Nikula [Mon, 2 Oct 2023 08:47:03 +0000 (11:47 +0300)]
drm/i915: allocate i915->gt0 dynamically

Convert i915->gt0 to a pointer, and allocate it dynamically.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Acked-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/01bf968aa431b77d491790178cbeece18b5fc4c0.1696236329.git.jani.nikula@intel.com
13 months agodrm/i915/mocs: use to_gt() instead of direct &i915->gt
Jani Nikula [Mon, 2 Oct 2023 08:47:02 +0000 (11:47 +0300)]
drm/i915/mocs: use to_gt() instead of direct &i915->gt

Have to give up the const on i915 pointer, but it's not big of a deal
considering non-const i915 gets passed all over the place.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Acked-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/63e644f056c7745eb0e8e165c990c392a38ec85c.1696236329.git.jani.nikula@intel.com
13 months agoMerge drm/drm-next into drm-intel-next
Jani Nikula [Wed, 4 Oct 2023 15:06:27 +0000 (18:06 +0300)]
Merge drm/drm-next into drm-intel-next

Backmerge to sync up with drm-intel-gt-next and drm-misc-next.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
13 months agodrm/i915: s/dev_priv/i915/ in the shared_dpll code
Ville Syrjälä [Tue, 3 Oct 2023 20:06:20 +0000 (23:06 +0300)]
drm/i915: s/dev_priv/i915/ in the shared_dpll code

Do a s/dev_priv/i915/ pass over the shared_dpll code to
get the variable names into sync with modern standards.

v2: Rebase

Reviewed-by: Jani Nikula <jani.nikula@intel.com> #v1
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231003200620.11633-5-ville.syrjala@linux.intel.com
13 months agodrm/i915: Introduce for_each_shared_dpll()
Ville Syrjälä [Tue, 3 Oct 2023 20:06:19 +0000 (23:06 +0300)]
drm/i915: Introduce for_each_shared_dpll()

No one really cares how we store the shared_dplls. Currently
it happens to be an array, but we could change that to a more
flexible scheme at some point. Hide the implementation details
behind an iterator macro.

The slight downside is the pll variable moving out of the
loop scope, but maybe someday soon we'll start to convert
everything over to having declarations within for-statements...

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/20231003200620.11633-4-ville.syrjala@linux.intel.com
13 months agodrm/i915: Decouple I915_NUM_PLLS from PLL IDs
Ville Syrjälä [Tue, 3 Oct 2023 20:06:18 +0000 (23:06 +0300)]
drm/i915: Decouple I915_NUM_PLLS from PLL IDs

Stop assuming the size of PLL ID based bitmask is restricted
to I915_NUM_PLLS bits. This is the last thing coupling the
two things together and thus artificially limiting PLL IDs.

We could just pass any arbitrary (large enough) size to
for_each_set_bit() and be done with it, but the WARN
requiring the caller to not pass in a bogus bitmask seems
potentially useful to keep around. So let's just calculate
the full bitmask on the spot.

And while at it let's assert that the PLL IDs will fit
into the bitmask we use for them.

TODO: could also get rid of I915_NUM_PLLS entirely and just
dynamically allocate i915->shared_dplls[] and state->shared_dpll[].
But that would involve error handling in the modeset init path. Uff.

v2: Warn about conflicting PLL IDs (Jani)

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/20231003200620.11633-3-ville.syrjala@linux.intel.com
13 months agodrm/i915: Stop requiring PLL index == PLL ID
Ville Syrjälä [Tue, 3 Oct 2023 20:06:17 +0000 (23:06 +0300)]
drm/i915: Stop requiring PLL index == PLL ID

There's no good reason to keep around this PLL index == PLL ID
footgun. Get rid of it.

Both i915->shared_dplls[] and state->shared_dpll[] are indexed
by the same thing now, which is just the index we get at
initialization from dpll_mgr->dpll_info[]. The rest is all about
PLL IDs now.

v2: Add pll->index to mimic drm_crtc & co.
    Remove the comment saying ID should match the index
v3: s/i/pll->index/ in debugfs loop (Jani)

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/20231003200620.11633-2-ville.syrjala@linux.intel.com
13 months agodrm/i915: separate subplatform init and runtime feature init
Jani Nikula [Tue, 3 Oct 2023 12:42:10 +0000 (15:42 +0300)]
drm/i915: separate subplatform init and runtime feature init

Adjusting ->port_mask does not belong in
intel_device_info_subplatform_init(), but rather
intel_display_device_info_runtime_init().

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1035800e623e13d5e7baf1215b07e7cdad5eb764.1696336887.git.jani.nikula@intel.com
13 months agodrm/i915: separate display runtime info init
Jani Nikula [Tue, 3 Oct 2023 12:42:09 +0000 (15:42 +0300)]
drm/i915: separate display runtime info init

Move display related functionality from intel_device_info_runtime_init()
to intel_display_device_info_runtime_init() and call the latter from the
top level.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a2226a47a4450e75d867c2ac48665b387af0e42d.1696336887.git.jani.nikula@intel.com
13 months agodrm/i915: move display info related macros to display
Jani Nikula [Tue, 3 Oct 2023 12:42:08 +0000 (15:42 +0300)]
drm/i915: move display info related macros to display

Anything looking at display (runtime) info should be under display.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/41b53870ffa7bd41ccc337616c756c69326f05cf.1696336887.git.jani.nikula@intel.com
13 months agodrm/i915: convert INTEL_DISPLAY_ENABLED() into a function
Jani Nikula [Tue, 3 Oct 2023 12:42:07 +0000 (15:42 +0300)]
drm/i915: convert INTEL_DISPLAY_ENABLED() into a function

There's no need for this to be a macro. Add some documentation too.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/480b9b697b2ffa0c8677115bd443ba633801c6c1.1696336887.git.jani.nikula@intel.com
13 months agodrm/i915/lnl: update the supported plane formats with FBC
Vinod Govindapillai [Fri, 22 Sep 2023 13:30:03 +0000 (16:30 +0300)]
drm/i915/lnl: update the supported plane formats with FBC

FBC is supported with RGB32 8:8:8:8 with or without alpha

Bspec: 68904, 69560
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230922133003.150578-3-vinod.govindapillai@intel.com
13 months agodrm/i915/lnl: possibility to enable FBC on first three planes
Vinod Govindapillai [Fri, 22 Sep 2023 13:30:02 +0000 (16:30 +0300)]
drm/i915/lnl: possibility to enable FBC on first three planes

In LNL onwards, FBC can be associated to the first three planes.
FBC will be enabled on planes first come first served basis
until the userspace can select one of these FBC capable planes
explicitly.

v2:
 - avoid fbc->state.plane check in intel_fbc_check_plane (Ville)
 - simplify plane binding register writes (Matt)
 - Update the subject to reflect that fbc can be enabled only in
   the first three planes (Matt)

v3:
 - use icl_is_hdr_plane(), use wrapper macro for plane binding
   register access, comments update and patch split (Ville)

v4:
 - update to the plane binding register access macro

Bspec: 69560
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230922133003.150578-2-vinod.govindapillai@intel.com
13 months agoMerge tag 'drm-intel-gt-next-2023-09-28' of git://anongit.freedesktop.org/drm/drm...
Dave Airlie [Mon, 2 Oct 2023 20:02:29 +0000 (06:02 +1000)]
Merge tag 'drm-intel-gt-next-2023-09-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

Driver Changes:

Fixes/improvements/new stuff:

- Fix TLB-Invalidation seqno store [mtl] (Alan Previn)
- Force a reset on internal GuC error [guc] (John Harrison)
- Define GSC fw [gsc] (Daniele Ceraolo Spurio)
- Update workaround 14016712196 [dg2/mtl] (Tejas Upadhyay)
- Mark requests for GuC virtual engines to avoid use-after-free (Andrzej Hajda)
- Add Wa_14015150844 [dg2/mtl] (Shekhar Chauhan)
- Prevent error pointer dereference (Dan Carpenter)
- Add Wa_18022495364 [tgl,adl,rpl] (Dnyaneshwar Bhadane)
- Fix GuC PMU by moving execlist stats initialization to execlist specific setup (Umesh Nerlige Ramappa)
- Fix PXP firmware load [pxp/mtl] (Alan Previn)
- Fix execution/context state of PXP contexts (Alan Previn)
- Limit the length of an sg list to the requested length (Matthew Wilcox)
- Fix reservation address in ggtt_reserve_guc_top [guc] (Javier Pello)
- Add Wa_18028616096 [dg2] (Shekhar Chauhan)
- Get runtime pm in busyness worker only if already active [guc/pmu] (Umesh Nerlige Ramappa)
- Don't set PIPE_CONTROL_FLUSH_L3 for aux inval (Nirmoy Das)

Future platform enablement:

- Fix and consolidate some workaround checks, make others IP version based [mtl] (Matt Roper)
- Replace Meteorlake subplatforms with IP version checks (Matt Roper)
- Adding DeviceID for Arrowlake-S under MTL [mtl] (Nemesa Garg)
- Run relevant bits of debugfs drop_caches per GT (Tvrtko Ursulin)

Miscellaneous:

- Remove Wa_15010599737 [dg2] (Shekhar Chauhan)
- Align igt_spinner_create_request with hangcheck [selftests] (Jonathan Cavitt)
- Remove pre-production workarounds [dg2] (Matt Roper)
- Tidy some workaround definitions (Matt Roper)
- Wait longer for tasks in migrate selftest [gt] (Jonathan Cavitt)
- Skip WA verification for GEN7_MISCCPCTL on DG2 [gt] (Andrzej Hajda)
- Silence injected failure in the load via GSC path [huc] (Daniele Ceraolo Spurio)
- Refactor deprecated strncpy (Justin Stitt)
- Update RC6 mask for mtl_drpc [debugfs/mtl] (Badal Nilawar)
- Remove a static inline that requires including i915_drv.h [gt] (Jani Nikula)
- Remove inlines from i915_gem_execbuffer.c [gem] (Jani Nikula)
- Remove gtt_offset from stream->oa_buffer.head/.tail [perf] (Ashutosh Dixit)
- Do not disable preemption for resets (Tvrtko Ursulin)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ZRVzL02VFuwIkcGl@tursulin-desk
13 months agodrm/i915: Add missing GSCCS documentation
Rodrigo Vivi [Tue, 26 Sep 2023 17:55:54 +0000 (13:55 -0400)]
drm/i915: Add missing GSCCS documentation

Introduce the basic documentation about GSC CS.

This "GPU Basics" section is focused on explaining the hardware
rather than the driver/uapi, so let's make sure GSC is also
properly documented here.

v2: Fixes from Matt: typos and acronym.

Fixes: 5fd974d164b4 ("drm/i915/mtl: add initial definitions for GSC CS")
Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926175554.25968-1-rodrigo.vivi@intel.com
13 months agodrm/i915: Add missing CCS documentation
Rodrigo Vivi [Tue, 26 Sep 2023 16:51:06 +0000 (12:51 -0400)]
drm/i915: Add missing CCS documentation

Let's introduce the basic documentation about CCS.
While doing that, also removed the legacy execution flag name. That flag
simply doesn't exist for CCS and it is not needed on current context
submission. Those flag names are only needed on legacy context,
while on new ones we only need to pass the engine ID.

It is worth mention that this documentation should probably live with
the engine definitions rather than in the i915.rst file directly and
that more updates are likely need in this section. But this should
come later.

v2: Overall improvements from Matt and Tvrtko.

Fixes: 944823c94639 ("drm/i915/xehp: Define compute class and engine")
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926165107.23440-1-rodrigo.vivi@intel.com
13 months agodrm/i915: Abstract display info away during probe
Rodrigo Vivi [Fri, 29 Sep 2023 20:50:23 +0000 (16:50 -0400)]
drm/i915: Abstract display info away during probe

The goal is to have this function ready for Xe to use
directly. So, let's use the available macro.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230929205023.1202735-1-rodrigo.vivi@intel.com
13 months agodrm/i915/display: Include i915_active header in frontbuffer tracking code
Jouni Högander [Fri, 29 Sep 2023 11:20:47 +0000 (14:20 +0300)]
drm/i915/display: Include i915_active header in frontbuffer tracking code

Intel frontbuffer tracking code is using i915_active functions -> include
i915_active.h directly instead of relying getting indirectly included.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230929112047.1151914-1-jouni.hogander@intel.com
13 months agodrm/i915/display: add I915 conditional build to vlv_dsi_pll.h
Jani Nikula [Tue, 12 Sep 2023 11:06:46 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to vlv_dsi_pll.h

Add stubs for !I915. Not all the functions need to be stubbed.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/930c8d332d425a54dae7af16aed26ec293f80afd.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_tv.h
Jani Nikula [Tue, 12 Sep 2023 11:06:45 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_tv.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/290e555ac87ea11cd6021c1338b75ad64c42ae98.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_sdvo.h
Jani Nikula [Tue, 12 Sep 2023 11:06:44 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_sdvo.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c34ea1f470590488acf40512da3892ca153f482a.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_dvo.h
Jani Nikula [Tue, 12 Sep 2023 11:06:43 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_dvo.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d43b27742297083b37d52222c4bb72b062ef4967.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to g4x_hdmi.h
Jani Nikula [Tue, 12 Sep 2023 11:06:42 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to g4x_hdmi.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ba2eea7ac081d0858a573062f197e00f3b186faf.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to i9xx_wm.h
Jani Nikula [Tue, 12 Sep 2023 11:06:41 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to i9xx_wm.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/bf15b14d3d060fdb256c78d4b8514d642a8958e6.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to vlv_dsi.h
Jani Nikula [Tue, 12 Sep 2023 11:06:40 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to vlv_dsi.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9f538824f15096b0c1444ee50d175a0a22d7bd5e.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_crt.h
Jani Nikula [Tue, 12 Sep 2023 11:06:39 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_crt.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/89a6daca98f87ed1a8a54367a977f146216330d2.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_dpio_phy.h
Jani Nikula [Tue, 12 Sep 2023 11:06:38 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_dpio_phy.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/978bc7263e8de10ffc1ef16086341dd629347c8e.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to g4x_dp.h
Jani Nikula [Tue, 12 Sep 2023 11:06:37 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to g4x_dp.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ba92fc1dee1f71018179dbe10b91982c9c93e7e6.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_overlay.h
Jani Nikula [Tue, 12 Sep 2023 11:06:36 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_overlay.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/45a127d37816ac97dfe493beeed060e323047014.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_sprite.h
Jani Nikula [Tue, 12 Sep 2023 11:06:35 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_sprite.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b9680203b0b93dc3472260d7e4128984e533b421.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_pch_display.h
Jani Nikula [Tue, 12 Sep 2023 11:06:34 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_pch_display.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/02de0089de58c9fb19b6b56121f6c917f51b4561.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_pch_refclk.h
Jani Nikula [Tue, 12 Sep 2023 11:06:33 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_pch_refclk.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/4359b34cbcff6199b5e42b5311c815aa6f4a167c.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_lpe_audio.h
Jani Nikula [Tue, 12 Sep 2023 11:06:32 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_lpe_audio.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7c10d8c4a2a628cba17b3b0f89b657dfbc91eaa9.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to i9xx_plane.h
Jani Nikula [Tue, 12 Sep 2023 11:06:31 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to i9xx_plane.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/4ad1864c66adcf691906c37b554f640d04069fb2.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to hsw_ips.h
Jani Nikula [Tue, 12 Sep 2023 11:06:30 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to hsw_ips.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/04469b92be51b8394d74a508174f041aa7e011e8.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915/display: add I915 conditional build to intel_lvds.h
Jani Nikula [Tue, 12 Sep 2023 11:06:29 +0000 (14:06 +0300)]
drm/i915/display: add I915 conditional build to intel_lvds.h

Add stubs for !I915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f06a88a69b7e326ff0914baca5e6a0e5f06e1867.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915: define I915 during i915 driver build
Jani Nikula [Tue, 12 Sep 2023 11:06:28 +0000 (14:06 +0300)]
drm/i915: define I915 during i915 driver build

The xe driver will reuse i915 display code by compiling it separately as
part of xe. We'll want to be able to distinguish between building the
i915 display code for i915 and xe. Define I915 when building i915.

Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/97558201836115b91cbe32840239df855d0c2e4c.1694514689.git.jani.nikula@intel.com
13 months agodrm/i915: Update DRIVER_DATE to 20230929
Jani Nikula [Fri, 29 Sep 2023 09:43:23 +0000 (12:43 +0300)]
drm/i915: Update DRIVER_DATE to 20230929

Signed-off-by: Jani Nikula <jani.nikula@intel.com>