]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
2 months agodrm/i915/dp: Ack only the handled link service IRQs
Imre Deak [Wed, 25 Feb 2026 16:46:18 +0000 (18:46 +0200)] 
drm/i915/dp: Ack only the handled link service IRQs

Ack only those SST link service IRQs that will be handled, similarly to
device service IRQs. While at it add asserts that only the known/acked
link service IRQs are handled both in the MST and SST case.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-21-imre.deak@intel.com
2 months agodrm/i915/dp: Ack only the handled device service IRQs
Imre Deak [Wed, 25 Feb 2026 16:46:17 +0000 (18:46 +0200)] 
drm/i915/dp: Ack only the handled device service IRQs

Only those IRQs should be acked that are handled, however for SST all
IRQs triggered by the sink are acked. This can be a problem for flags
that are reserved/reading zero at a given moment, but become used for
some purpose - with a side-effect if set - in a future DPCD revision.

Fix the above by acking only those device service IRQs that will be
handled. While at it add asserts that only the known/acked device
service IRQs are handled both in the MST and SST case.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-20-imre.deak@intel.com
2 months agodrm/i915/dp_mst: Reuse intel_dp_handle_link_service_irq()
Imre Deak [Wed, 25 Feb 2026 16:46:16 +0000 (18:46 +0200)] 
drm/i915/dp_mst: Reuse intel_dp_handle_link_service_irq()

Use intel_dp_handle_link_service_irq() while handling an MST HPD IRQ,
instead of open-coding this.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-19-imre.deak@intel.com
2 months agodrm/i915/dp: Check SST link status while handling link service IRQs
Imre Deak [Wed, 25 Feb 2026 16:46:15 +0000 (18:46 +0200)] 
drm/i915/dp: Check SST link status while handling link service IRQs

Move checking the link status for SST to
intel_dp_handle_link_service_irq(). This is the logical place for the
check which should only happen in response to a LINK_STATUS_CHANGE sink
IRQ. This IRQ is only supported by DPCD revision >= 1.2, so for sinks
with an older DPCD revision the link status is checked in response to
any HPD IRQ. For newer DPCD revisions however the link status check can
be made conditional on LINK_STATUS_CHANGE.

For now keep the current behavior of always forcing a link status check
regardless of LINK_STATUS_CHANGE being set or not.

This also prepares for a follow-up change sharing the link service IRQ
handler for SST and MST (on MST the link status check only happening in
response to a LINK_STATUS_CHANGE IRQ).

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-18-imre.deak@intel.com
2 months agodrm/i915/dp: Print debug message for a sink connected off request
Imre Deak [Wed, 25 Feb 2026 16:46:14 +0000 (18:46 +0200)] 
drm/i915/dp: Print debug message for a sink connected off request

So far the CONNECTED_OFF_ENTRY_REQUESTED request was accepted only
implicitly, by acking all the IRQs raised by the sink. Make this
explicit by printing a debug message.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-17-imre.deak@intel.com
2 months agodrm/i915/dp: Read/ack sink count and sink IRQs for SST as it's done for MST
Imre Deak [Wed, 25 Feb 2026 16:46:13 +0000 (18:46 +0200)] 
drm/i915/dp: Read/ack sink count and sink IRQs for SST as it's done for MST

Read and ack the sink count, sink device and link service IRQs for SST
the same way this is done for MST, the read/ack happening in separate
steps via an ESI (Event Status Indicator) vector.

The above way is more efficient, since on newer (DPCD_REV >= 1.2) sinks
the DP_SINK_COUNT_ESI..DP_LINK_SERVICE_IRQ_VECTOR_ESI0 registers can be
read out in one AUX transaction - and the 3 last one written in one
transaction. Also this allows sharing more of the SST and MST IRQ
handling code (done as a follow-up).

For now keep the current behavior of always reading the legacy
DP_SINK_COUNT, DP_DEVICE_SERVICE_IRQ_VECTOR registers and not reading
the DP_DEVICE_SERVICE_IRQ_VECTOR_ESI1 register.

v2: Document the ESI vector get/ack helper fnuctions' return value.
    (Jani, Luca)

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-16-imre.deak@intel.com
2 months agodrm/i915/dp: Return early if getting/ackink link service IRQs fails
Imre Deak [Wed, 25 Feb 2026 16:46:12 +0000 (18:46 +0200)] 
drm/i915/dp: Return early if getting/ackink link service IRQs fails

If getting/acking the link service IRQs fail, the short HPD handler
should bail out, falling back to a full connector detection as in case
of any AUX access failures during the HPD handling. Do this by
separating the getting/acking and handling steps of the IRQs.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-15-imre.deak@intel.com
2 months agodrm/i915/dp: Return early if getting/acking device service IRQs fails
Imre Deak [Wed, 25 Feb 2026 16:46:11 +0000 (18:46 +0200)] 
drm/i915/dp: Return early if getting/acking device service IRQs fails

If getting/acking the device service IRQs fail, the short HPD handler
should bail out, falling back to a full connector detection as in case
of any AUX access failures during the HPD handling. Do this by
separating the getting/acking and handling steps of the IRQs.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-14-imre.deak@intel.com
2 months agodrm/i915/dp: Reprobe connector if getting/acking link service IRQs fails
Imre Deak [Wed, 25 Feb 2026 16:46:10 +0000 (18:46 +0200)] 
drm/i915/dp: Reprobe connector if getting/acking link service IRQs fails

An AUX access failure during HPD IRQ handling should be handled by
falling back to a full connector detection, ensure that if the failure
happens while reading/acking a link service IRQ.

While at it add code comment documenting the return value of
intel_dp_check_link_service_irq().

v2: Docuement intel_dp_check_link_service_irq()'s return value. (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-13-imre.deak@intel.com
2 months agodrm/i915/dp: Reprobe connector if getting/acking device IRQs fails
Imre Deak [Wed, 25 Feb 2026 16:46:09 +0000 (18:46 +0200)] 
drm/i915/dp: Reprobe connector if getting/acking device IRQs fails

An AUX access failure during HPD IRQ handling should be handled by
falling back to a full connector detection, ensure that if the failure
happens while reading/acking a device service IRQ.

v2: Document intel_dp_check_device_service_irq()'s return value.
    (Jani, Luca)

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-12-imre.deak@intel.com
2 months agodrm/i915/dp: Fix the link service IRQ DPCD_REV check
Imre Deak [Wed, 25 Feb 2026 16:46:08 +0000 (18:46 +0200)] 
drm/i915/dp: Fix the link service IRQ DPCD_REV check

The DP_LINK_SERVICE_IRQ_VECTOR_ESI0 DPCD register is supported only
since DPCD REV 1.2, so fix the revision check accordingly.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-11-imre.deak@intel.com
2 months agodrm/i915/dp: Fix the device service IRQ DPCD_REV check
Imre Deak [Wed, 25 Feb 2026 16:46:07 +0000 (18:46 +0200)] 
drm/i915/dp: Fix the device service IRQ DPCD_REV check

The DP_DEVICE_SERVICE_IRQ_VECTOR DPCD register is supported since DPCD
REV 1.0, so read it out always. Flags added only by later DPCD revisions
are defined as reserved/must-be-zero by earlier DP Standard versions.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-10-imre.deak@intel.com
2 months agodrm/i915/dp: Remove the device service IRQ handling from connector detect
Imre Deak [Wed, 25 Feb 2026 16:46:06 +0000 (18:46 +0200)] 
drm/i915/dp: Remove the device service IRQ handling from connector detect

The device service IRQ handling was added to the connector detect
function by

commit 09b1eb130e43 ("drm/i915: Move Displayport test request and sink
IRQ logic to intel_dp_detect()")

since some Automated Test Request IRQs couldn't be handled in the short
HPD IRQ handler context. This has been fixed meanwhile by deferring the
handling of all test request events from the IRQ handler to the hotplug
handler (intel_dp_short_pulse() -> intel_dp_test_short_pulse() ->
reprobe) and by handling all hotplug events (both for short and long HPD
pulses) in the test application.

Handling device IRQs during connector detection is not standard
compliant (the IRQs should be handled when an HPD IRQ is raised) and it
happens in a racy way with the same device IRQ handling happening from
the HPD IRQ handler (since the detect and HPD IRQ handler can run in
parallel).

Based on the above, remove the redundant call from the detect function.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-9-imre.deak@intel.com
2 months agodrm/i915/dp: Don't clobber the encoder state in the HPD IRQ handler
Imre Deak [Wed, 25 Feb 2026 16:46:05 +0000 (18:46 +0200)] 
drm/i915/dp: Don't clobber the encoder state in the HPD IRQ handler

The intel_dp_get_dpcd() function called from an HPD IRQ handler reads
out the DPRX capabilities from the sink and updates these in the
intel_dp encoder state. Since the IRQ handler can run in parallel with
the encoder/connector detection (intel_dp_detect()) which also calls
intel_dp_get_dpcd(), the encoder state can get corrupted, since the two
updates happen in a racy way.

Fix the above by checking only for any change in the sink count value in
the HPD IRQ handler, without updating the encoder state.

Note that any state change in the sink requiring an update of the
encoder state is handled via the sink's SINK_COUNT change,
RX_CAPS_CHANGED, DOWNSTREAM_PORT_STATUS_CHANGED signaling, which all
should result in a full connector detection.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-8-imre.deak@intel.com
2 months agodrm/i915/dp: Handle the DOWNSTREAM_PORT_STATUS_CHANGED event
Imre Deak [Wed, 25 Feb 2026 16:46:04 +0000 (18:46 +0200)] 
drm/i915/dp: Handle the DOWNSTREAM_PORT_STATUS_CHANGED event

Handle the DOWNSTREAM_PORT_STATUS_CHANGED event a branch device can use
to indicate the state change of a DFP connector on the branch device.
The event is signaled in the DP_LANE_ALIGN_STATUS_UPDATED DPCD register
setting a clear-on-read flag and triggering an HPD IRQ. Accordingly keep
a cached version of the flag, updating it whenever
DP_LANE_ALIGN_STATUS_UPDATED is read. Schedule a full connector
detection from the HPD IRQ handler if the cached flag is set and clear
the cached flag at the start of detection.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-7-imre.deak@intel.com
2 months agodrm/i915/dp: Handle the RX_CAP_CHANGED HPD IRQ
Imre Deak [Wed, 25 Feb 2026 16:46:03 +0000 (18:46 +0200)] 
drm/i915/dp: Handle the RX_CAP_CHANGED HPD IRQ

Handle the RX_CAP_CHANGED IRQ, which a sink can use to indicate a DPRX
capability change without disconnecting and reconnecting itself (i.e.
through a short vs. long HPD pulse). Handle the IRQ by doing a full
connector detection.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-6-imre.deak@intel.com
2 months agodrm/i915/dp: Handle a tunneling IRQ after acking it
Imre Deak [Wed, 25 Feb 2026 16:46:02 +0000 (18:46 +0200)] 
drm/i915/dp: Handle a tunneling IRQ after acking it

HPD IRQs in general should be handled after acking them. The

1. Read IRQ register (read DP_DEVICE_SERVICE_IRQ_VECTOR,
   DP_LINK_SERVICE_IRQ_VECTOR_ESI0)
2. Handle IRQ
3. Ack IRQ (write DP_DEVICE_SERVICE_IRQ_VECTOR,
   DP_LINK_SERVICE_IRQ_VECTOR_ESI0)

sequence would miss a new interrupt triggered after 2. and before 3.,
since the flag set in the IRQ register for this interrupt would be
cleared in step 3.

Fix the above by handling the IRQ after acking it.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-5-imre.deak@intel.com
2 months agodrm/i915/dp_mst: Reuse intel_dp_check_link_state() in the HPD IRQ handler
Imre Deak [Wed, 25 Feb 2026 16:46:01 +0000 (18:46 +0200)] 
drm/i915/dp_mst: Reuse intel_dp_check_link_state() in the HPD IRQ handler

Use intel_dp_check_link_state() in the MST HPD IRQ handler instead of
open-coding it.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-4-imre.deak@intel.com
2 months agodrm/i915/dp_mst: Verify the link status always the same way
Imre Deak [Wed, 25 Feb 2026 16:46:00 +0000 (18:46 +0200)] 
drm/i915/dp_mst: Verify the link status always the same way

The MST link status should be always verified from the same DPCD
registers after link training. Atm, both the legacy (0x202 - 0x205) and
the ESI (0x200C - 0x200F) link status registers are used. Use always the
latter ESI version of link status registers.

v2: Propagate error from intel_dp_read_link_status(). (Jani, Luca)

Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-3-imre.deak@intel.com
2 months agodrm/i915/dp_mst: Reprobe connector if the IRQ ESI read failed
Imre Deak [Wed, 25 Feb 2026 16:45:59 +0000 (18:45 +0200)] 
drm/i915/dp_mst: Reprobe connector if the IRQ ESI read failed

An AUX access failure during HPD IRQ handling should be handled by
falling back to a full connector detection, do so.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-2-imre.deak@intel.com
2 months agodrm/xe/display: clean up xe_initial_plane.c includes
Jani Nikula [Fri, 27 Feb 2026 17:17:14 +0000 (19:17 +0200)] 
drm/xe/display: clean up xe_initial_plane.c includes

Remove excess includes, group and sort include directives.

Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Link: https://patch.msgid.link/637eab7df00a540df6b7ca1ca345302864b6342f.1772212579.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2 months agodrm/xe/compat: remove i915_vma.h from compat
Jani Nikula [Fri, 27 Feb 2026 17:17:13 +0000 (19:17 +0200)] 
drm/xe/compat: remove i915_vma.h from compat

Move compat i915_vma.h to xe_display_vma.h, and remove all extra
cruft. Drop the i915_ggtt_offset() wrapper in favour of using
xe_ggtt_node_addr() directly.

The usefulness of the I915_TILING_X and I915_TILING_Y undef/define is
unclear, since uapi/drm/i915_drm.h is included in other paths as well.

The naming of struct i915_vma is a bit unfortunate in xe, but (at least
for now) a necessity for maintaining type safety on the opaque type.

Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Link: https://patch.msgid.link/ecd5d75981b4b21c3da3b1831faceccfe385d898.1772212579.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2 months agodrm/i915: add VMA to parent interface
Jani Nikula [Fri, 27 Feb 2026 17:17:12 +0000 (19:17 +0200)] 
drm/i915: add VMA to parent interface

It's unclear what the direction of the VMA abstraction in the parent
interface should be, but convert i915_vma_fence_id() to parent interface
for starters. This paves the way for making struct i915_vma opaque
towards display.

Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Link: https://patch.msgid.link/036f4b2d20cc1b0a7ab814beb5bb914c53b6eb53.1772212579.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2 months agodrm/i915/fbdev: stop debug logging i915_ggtt_offset()
Jani Nikula [Fri, 27 Feb 2026 17:17:11 +0000 (19:17 +0200)] 
drm/i915/fbdev: stop debug logging i915_ggtt_offset()

The debug logging in fbdev is the only user of i915_ggtt_offset() in
display code. Just stop doing it to drop a dependency on i915_vma.h.

Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Link: https://patch.msgid.link/c3b84cb572c7ee94389e702aba4dcacb26c41673.1772212579.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2 months agodrm/i915/dp: Fix DSC state computation
Imre Deak [Mon, 2 Mar 2026 10:28:38 +0000 (12:28 +0200)] 
drm/i915/dp: Fix DSC state computation

When computing the encoder/CRTC state multiple times, such as during
iteration over the possible pipe joiner configurations, it must be
ensured that all state is explicitly initialized each time. At the
moment, this is not guaranteed for the DSC/FEC state within the
encoder/CRTC state. In one iteration trying a pipe joiner configuration,
the DSC state may get initialized without computing the full
CRTC/encoder state due to the given joiner configuration being
impossible. When the same CRTC/encoder state is recomputed in a
subsequent iteration, the previously set non-zero - now stale - DSC/FEC
state may still be present, which is unexpected if a non-DSC
configuration is being computed.

This can lead to a DSC state mismatch error if multiple joiner
configurations are evaluated and the working configuration ultimately
turns out to be a non-DSC one.

Follow the existing pattern and compute the full (DSC/FEC) state on all
code paths (including now the non-DSC path as well) to fix the issue.

Fixes: 1f1e3e5c65f6 ("drm/i915/dp: Rework pipe joiner logic in compute_config")
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/7512
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260302102838.1522499-1-imre.deak@intel.com
2 months agodrm/i915/backlight: Provide clear description on how backlight level is controlled
Suraj Kandpal [Mon, 2 Mar 2026 04:06:12 +0000 (09:36 +0530)] 
drm/i915/backlight: Provide clear description on how backlight level is controlled

Currently it takes us multiple log prints to arrive at the conclusion
on how we are actually controlling backlight level. Make the logging
concise.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patch.msgid.link/20260302040613.3324049-8-suraj.kandpal@intel.com
2 months agodrm/i915/backlight: Update debug log during backlight setup
Suraj Kandpal [Mon, 2 Mar 2026 04:06:11 +0000 (09:36 +0530)] 
drm/i915/backlight: Update debug log during backlight setup

With luminance_set which represents PANEL_LUMINANCE_OVERRIDE, we
have another variable to decide if we use PWM or DPCD.
Make drm_dbg_kms log represent that.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patch.msgid.link/20260302040613.3324049-7-suraj.kandpal@intel.com
2 months agodrm/i915/backlight: Short circuit intel_dp_aux_supports_hdr_backlight
Suraj Kandpal [Mon, 2 Mar 2026 04:06:10 +0000 (09:36 +0530)] 
drm/i915/backlight: Short circuit intel_dp_aux_supports_hdr_backlight

intel_dp_aux_supports_hdr_backlight() prints debug message for
intel HDR backlight version. This is fine when dealing with eDP 1.4b
and lower. When we are talking about eDP 1.5 it causes confusion in
logs since we need to use VESA AUX backlight functions but this
print causes confusion as to which path code take.
Short circuit this function with a eDP version check. Make sure this
is only called if eDP <= 1.4b

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patch.msgid.link/20260302040613.3324049-6-suraj.kandpal@intel.com
2 months agodrm/i915/backlight: Check luminance_set when disabling PWM via AUX VESA backlight
Suraj Kandpal [Mon, 2 Mar 2026 04:06:09 +0000 (09:36 +0530)] 
drm/i915/backlight: Check luminance_set when disabling PWM via AUX VESA backlight

When deciding what if PWM funcs need to be disabled take into account
luminance_set too. We do this since it is also used to decide if
we are enabling PWM backlight funcs or not.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15671
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patch.msgid.link/20260302040613.3324049-5-suraj.kandpal@intel.com
2 months agodrm/i915/backlight: Take luminance_set into account for VESA backlight
Suraj Kandpal [Mon, 2 Mar 2026 04:06:08 +0000 (09:36 +0530)] 
drm/i915/backlight: Take luminance_set into account for VESA backlight

When deciding what functions to enable to help control backlight we
used to only check aux_enable. Now with PANEL_LUMINANCE_OVERRIDE in
picture we need to take care that we do not enable PWM function if
luminance_set is set.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15671
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patch.msgid.link/20260302040613.3324049-4-suraj.kandpal@intel.com
2 months agodrm/i915/backlight: Use intel_panel variable instead of intel_connector
Suraj Kandpal [Mon, 2 Mar 2026 04:06:07 +0000 (09:36 +0530)] 
drm/i915/backlight: Use intel_panel variable instead of intel_connector

Use the intel_panel variable since it has already been declared and
looks cleaner.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://patch.msgid.link/20260302040613.3324049-3-suraj.kandpal@intel.com
3 months agodrm/i915/overlay: Convert overlay to parent interface
Ville Syrjälä [Thu, 26 Feb 2026 13:01:50 +0000 (15:01 +0200)] 
drm/i915/overlay: Convert overlay to parent interface

Convert the direct i915_overlay_*() calls from the display
side to go over a new parent interface instead.

v2: Correctly handle the ERR_PTR returned by
    i915_overlay_obj_lookup() (Jani)
v3: Rebase due to the NULL check in intel_overlay_cleanup()

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226130150.16816-1-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Move i915 specific code into i915_overlay.c
Ville Syrjälä [Thu, 26 Feb 2026 13:38:55 +0000 (15:38 +0200)] 
drm/i915/overlay: Move i915 specific code into i915_overlay.c

Relocate the i915 driver specific parts of the overlay code
into i915_overlay.c. This leaves intel_overlay.c with just
the display specific code.

The one annoyance here is the DSPCLK_GATE_D register access
being done from i830_overlay_clock_gating(). The register
definition lives on the display side as we do need to access
it on other platforms there. Since it's just one register
and bit, I decided to just duplicate that part in i915_reg.h.

v2: Use kzalloc_obj()

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226133855.17690-1-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Don't use fetch_and_zero() in display code
Ville Syrjälä [Thu, 26 Feb 2026 13:01:13 +0000 (15:01 +0200)] 
drm/i915/overlay: Don't use fetch_and_zero() in display code

We don't generally want fetch_and_zero() on the display side, so
stop using it in the display side intel_overlay_cleanup().
Fortunately we don't really have anything to do here apart from
freeing the data. And we'll keep on clearing the pointer, just
in case something somewhere cares about it.

Note that once i915_overlay_cleanup() is converted to the parent
interface we can't call it unconditionally (as xe won't have it).
So we need to keep the early bailout for overlay==NULL.

v2: Adjust the commit message since we do apparently
    have fetch_and_zero() in display code as well (Jani)
v3: Skip i915_overlay_cleanup() if the overlay wasn't initialized

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226130113.16714-1-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Split 'struct intel_overlay'
Ville Syrjälä [Thu, 26 Feb 2026 10:07:35 +0000 (12:07 +0200)] 
drm/i915/overlay: Split 'struct intel_overlay'

Split the i915 driver specific bits from 'struct intel_overlay'
into a seaarate 'struct i915_overlay'. The latter will move to
the i915 side of the parent vs. display driver split.

The display side will also need to know the virtual address of
the register map. That now gets passed as the return value
from i915_overlay_setup(), so that the display side doesn't
need to know how the mapping was achieved.

v2: Use kzalloc_obj()

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-17-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: s/dev_priv/i915/
Ville Syrjälä [Thu, 26 Feb 2026 10:07:34 +0000 (12:07 +0200)] 
drm/i915/overlay: s/dev_priv/i915/

Rename the one lingering 'dev_priv' variable to the
more modern 'i915' in the overlay code.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-16-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Make i830_overlay_clock_gating() i915 specific
Ville Syrjälä [Thu, 26 Feb 2026 10:07:33 +0000 (12:07 +0200)] 
drm/i915/overlay: Make i830_overlay_clock_gating() i915 specific

i830_overlay_clock_gating() will remain on the i915 side of the
parent vs. display driver split. Stop using display specific stuff
inside it.

The one annoyance here is access to the display engine's
DSPCLK_GATE_D register. The proper way to deal with that might
be to move it to the display side, but that seems a bit hard right
now. So leave it where it is for now.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-15-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Adjust i915 specific interfaces
Ville Syrjälä [Thu, 26 Feb 2026 10:07:32 +0000 (12:07 +0200)] 
drm/i915/overlay: Adjust i915 specific interfaces

Adjust the names ("i915_overlay_" prefix) and calling
convention (pass the driver agnostic 'struct drm_device'()
of the functions that will provide the remainder of the
parent driver interface to be used by the overlay display
code.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-14-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Rename low level i915 specific functions
Ville Syrjälä [Thu, 26 Feb 2026 10:07:31 +0000 (12:07 +0200)] 
drm/i915/overlay: Rename low level i915 specific functions

Some of the lower level functions in the overlay code will
move to the i915 side of the upcoming parent vs. display
driver split. Move all such functions to the "i915_overlay_"
namespace to make it easier to see what belongs where.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-13-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Abstract buffer (un)pinning
Ville Syrjälä [Thu, 26 Feb 2026 10:07:30 +0000 (12:07 +0200)] 
drm/i915/overlay: Abstract buffer (un)pinning

Make the buffer (un)pinning a bit more abstract so that
the display side of the code doesn't need to know about i915
specific things (i915_ggtt_offset() and i915_vma_unpin()).

In preparation for the full parent vs. display driver split
we'll also pass in the drm_device to these functions, although
not strictly needed yet.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-12-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Extract i915_overlay_cleanup()
Ville Syrjälä [Thu, 26 Feb 2026 10:07:29 +0000 (12:07 +0200)] 
drm/i915/overlay: Extract i915_overlay_cleanup()

Pull the i915 specific bits of the overlay cleanup into
a separate function (i915_overlay_cleanup()) to accommodate
the upcoming parent vs. display driver split.

For now we'll also have to pass in the overlay struct, but
that will disappear once the i915 vs. display split is completed.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-11-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Extract i915_overlay_setup()
Ville Syrjälä [Thu, 26 Feb 2026 10:07:28 +0000 (12:07 +0200)] 
drm/i915/overlay: Extract i915_overlay_setup()

Pull the gem/gt related bits of the overlay setup into
a separate function (i915_overlay_setup()) that will eventually
move to the i915 side of the parent vs. display driver split.

For now we'll also have to pass in the overlay struct, but
that will disappear once the i915 vs. display split is completed.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-10-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Extract i915_overlay_reset()
Ville Syrjälä [Thu, 26 Feb 2026 10:07:27 +0000 (12:07 +0200)] 
drm/i915/overlay: Extract i915_overlay_reset()

overlay->frontbuffer_bits tracking will move to the i915 side
of the parent vs. display driver split, so extract the reset
part of that into a new function (i915_overlay_reset()).

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-9-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Use struct drm_gem_object as the type
Ville Syrjälä [Thu, 26 Feb 2026 10:07:26 +0000 (12:07 +0200)] 
drm/i915/overlay: Use struct drm_gem_object as the type

Use 'struct drm_gem_object' for the BO instead of 'struct
drm_i915_gem_object', to avoid having the display side
know anything about the i915 specific BO type.

v2: Correctly handle the ERR_PTR returned by
    i915_overlay_obj_lookup() (Jani)

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-8-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Introduce i915_overlay_obj_lookup()
Ville Syrjälä [Thu, 26 Feb 2026 10:07:25 +0000 (12:07 +0200)] 
drm/i915/overlay: Introduce i915_overlay_obj_lookup()

Extract the BO lookup and tiling check into a new
helper called i915_overlay_obj_lookup(). This will have to
move to the i915 side of the parent vs. display driver split.

There is a slight change here in that we now do the tiling
check before taking the modeset locks, but those locks don't
protect the BO tiling stuff in any way, so nothing is really
different here.

Note that the hardware should support X-tiled scanout also
for the overlay, but I guess no one ever bothered to hook
it up and test it. So the check should stay at least for now.

v2: Correctly handle the ERR_PTR returned by
    i915_overlay_obj_lookup() (Jani)

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-7-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Relocate the underrun check
Ville Syrjälä [Thu, 26 Feb 2026 10:07:24 +0000 (12:07 +0200)] 
drm/i915/overlay: Relocate the underrun check

Move the underrun check out from intel_overlay_continue()
so that the DOVSTA register access can stay on the display
side of the parent vs. display driver split.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-6-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Remove redundant overlay->active
Ville Syrjälä [Thu, 26 Feb 2026 10:07:23 +0000 (12:07 +0200)] 
drm/i915/overlay: Remove redundant overlay->active

Now that we have overlay->frontbuffer_bits, overlay->active
is completely redundant, so remove it.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-5-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Extract i915_overlay_is_active()
Ville Syrjälä [Thu, 26 Feb 2026 10:07:22 +0000 (12:07 +0200)] 
drm/i915/overlay: Extract i915_overlay_is_active()

Pull the "is the overlay active?" check to a helper
(i915_overlay_is_active()). This will have to move to the
i915 side of the parent vs. display driver split.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-4-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Track current frontbuffer_bits
Ville Syrjälä [Thu, 26 Feb 2026 10:07:21 +0000 (12:07 +0200)] 
drm/i915/overlay: Track current frontbuffer_bits

Store the current frontbuffer_bits in the overlay data. The
main benefit here is that we get rid of the 'crtc->pipe'
usage from intel_overlay_flip_prepare() which will have to
move to the i915 side of the parent vs. display driver split.

And since the goal is to get rid of the crtc stuff, move those
out from intel_overlay_off_tail() into intel_overlay_switch_off()
since the i915 side doesn't use those anymore, and the display
side doesn't need those anymore after that anyway.
intel_overlay_off_tail() will itself move to the i915 side of
the fence once the driver split is done.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-3-ville.syrjala@linux.intel.com
3 months agodrm/i915/overlay: Remove GPU hang snapshot stuff
Ville Syrjälä [Thu, 26 Feb 2026 10:07:20 +0000 (12:07 +0200)] 
drm/i915/overlay: Remove GPU hang snapshot stuff

The overlay snapshot stuff is a bit annoying because some of
it more or less of belongs on the gt side, and some on the
display side. Remove the whole thing to avoid having to deal
with it when splitting the overlay code around the i915
vs. display boundary. I don't think I've ever actually used
this for anything, so no real loss from my POV. And it can
always be resurrected later should the need arise.

v2: Rebase due to kmalloc_obj()

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-2-ville.syrjala@linux.intel.com
3 months agodrm/xe/compat: Remove unused i915_reg.h from compat header
Uma Shankar [Thu, 26 Feb 2026 17:55:31 +0000 (23:25 +0530)] 
drm/xe/compat: Remove unused i915_reg.h from compat header

Display Code is made independent of i915_reg.h, hence
it can be dropped from compat header.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/20260226175531.2324526-1-uma.shankar@intel.com
3 months agodrm/i915/backlight: Remove try_vesa_interface
Suraj Kandpal [Tue, 24 Feb 2026 03:13:22 +0000 (08:43 +0530)] 
drm/i915/backlight: Remove try_vesa_interface

Some panels need VESA DPCD AUX backlight but VBT says otherwise.
This is why we try with Intel backlight interface over VESA backlight
interface. This causes a blankout on such panels without any fallback
mechanism.
Remove try_vesa_interface and use VESA AUX backlight interface as a
fallback mechanism.
While at in sneak in a small comment cleanup too.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15679
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patch.msgid.link/20260224031322.2568874-1-suraj.kandpal@intel.com
3 months agodrm/i915/dpt: pass opaque struct intel_dpt around instead of i915_address_space
Jani Nikula [Wed, 25 Feb 2026 14:49:16 +0000 (16:49 +0200)] 
drm/i915/dpt: pass opaque struct intel_dpt around instead of i915_address_space

struct i915_address_space is used in an opaque fashion in the display
parent interface, but it's just one include away from being
non-opaque. And anyway the name is rather specific.

Switch to using the struct intel_dpt instead, which embeds struct
i915_address_space anyway. With the definition hidden in i915_dpt.c,
this can't be accidentally made non-opaque, and the type seems rather
more generic anyway.

We do have to add a new helper i915_dpt_to_vm(), as there's one case in
intel_fb_pin_to_dpt() that requires direct access to struct
i915_address_space. But this just underlines the point about opacity.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/daa39178c0b0305b010564952d691f06e3cd63ca.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dpt: rename struct i915_dpt to intel_dpt
Jani Nikula [Wed, 25 Feb 2026 14:49:15 +0000 (16:49 +0200)] 
drm/i915/dpt: rename struct i915_dpt to intel_dpt

Rename struct i915_dpt to intel_dpt. This may seem rather inconsistent
considering we just renamed the functions the other way round, but the
intent here is to lift struct intel_dpt to the display parent interface
as the generic opaque type for DPT instead of the very specific struct
i915_address_space.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/afb89dcce35c5b0cff2007b58d6ee20fd3200c24.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dpt: rename i915 specific functions to i915_dpt_ prefix
Jani Nikula [Wed, 25 Feb 2026 14:49:14 +0000 (16:49 +0200)] 
drm/i915/dpt: rename i915 specific functions to i915_dpt_ prefix

Follow the common convention of naming functions by file name, in this
case also clarifying which functions are i915 specific.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/9bb94942ed4a15bcdd89be3f0029a2cb6cdf170d.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dpt: switch to i915 runtime pm calls
Jani Nikula [Wed, 25 Feb 2026 14:49:13 +0000 (16:49 +0200)] 
drm/i915/dpt: switch to i915 runtime pm calls

The i915 specific code doesn't need to, and should not, call the display
runtime pm functions. Just call the i915 functions directly, instead of
routing through the parent interface.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/e8e00552ebf439b5f7b5d293014cce950c9c2999.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dpt: drop _common from the DPT file names
Jani Nikula [Wed, 25 Feb 2026 14:49:12 +0000 (16:49 +0200)] 
drm/i915/dpt: drop _common from the DPT file names

With the intel_dpt.[ch] file names vacated, and i915 specific code moved
away, we can rename the intel_dpt_common.[ch] files to the simpler name.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/3f2da737a26bb71a7bc05a3e6c456302e3c72656.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dpt: remove display/intel_dpt.h
Jani Nikula [Wed, 25 Feb 2026 14:49:11 +0000 (16:49 +0200)] 
drm/i915/dpt: remove display/intel_dpt.h

The remaining functions declared in intel_dpt.h are i915 specific, and
so are the users, so we can move them to i915_dpt.h. There are some
useless intel_dpt.h includes around that we can remove.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/de16eddbb49110b56ff44899d9498e3081da91fa.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dpt: move suspend/resume to parent interface
Jani Nikula [Wed, 25 Feb 2026 14:49:10 +0000 (16:49 +0200)] 
drm/i915/dpt: move suspend/resume to parent interface

Add per-vm DPT suspend/resume calls to the display parent interface, and
lift the generic code away from i915 specific code.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/080945a49559ec1f5183ad409e1526736e828d90.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dpt: move create/destroy to parent interface
Jani Nikula [Wed, 25 Feb 2026 14:49:09 +0000 (16:49 +0200)] 
drm/i915/dpt: move create/destroy to parent interface

Move the DPT create/destroy calls to the display parent interface.

With this, we can remove the dummy xe implementation.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/9753b21466c668872f468ccff827eab7be034b0c.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dpt: pass obj, size instead of framebuffer to intel_dpt_create()
Jani Nikula [Wed, 25 Feb 2026 14:49:08 +0000 (16:49 +0200)] 
drm/i915/dpt: pass obj, size instead of framebuffer to intel_dpt_create()

Split the size determination between caller and callee to drop the
dependency on struct intel_framebuffer from DPT code, but avoid adding a
dependency on I915_GTT_PAGE_SIZE in the caller side.

Pass zero size to let intel_dpt_create() handle the regular obj->size
case, but remapped size if fb needs stride remap.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/3a6e987ce8bb9f2c8d90c35342de14494a64de1b.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dpt: move display/intel_dpt.c to i915_dpt.c
Jani Nikula [Wed, 25 Feb 2026 14:49:07 +0000 (16:49 +0200)] 
drm/i915/dpt: move display/intel_dpt.c to i915_dpt.c

The DPT implementation is i915 specific. The xe driver has a different
implementation. Move display/intel_dpt.c to i915_dpt.c. Cleanups will
follow.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patch.msgid.link/20a3bfb2762f39f9666d9a5752b8d2fb133583b0.1772030909.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/dp_tunnel: Send BW change notification after tunnel creation
Imre Deak [Thu, 19 Feb 2026 18:28:23 +0000 (20:28 +0200)] 
drm/i915/dp_tunnel: Send BW change notification after tunnel creation

Detecting a bandwidth change for a sink connected through a DP tunnel
depends on updating the sink's DPRX link rate and lane count.

detect_new_tunnel() -> update_tunnel_state() updates the link
configuration only if the tunnel state changes. However, after the
tunnel is created and bandwidth allocation mode is enabled, the tunnel
state itself may remain unchanged.

Record the sink bandwidth before creating the tunnel and compare it to
the bandwidth after tunnel creation and enabling bandwidth allocation
mode, ensuring that any bandwidth change is detected and userspace is
notified accordingly.

Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260219182823.926702-6-imre.deak@intel.com
3 months agodrm/i915/dp_tunnel: Sanitize documentation of intel_dp_tunnel_detect()
Imre Deak [Thu, 19 Feb 2026 18:28:22 +0000 (20:28 +0200)] 
drm/i915/dp_tunnel: Sanitize documentation of intel_dp_tunnel_detect()

Clarify the documentation of detect_new_tunnel() return values,
including the failure case.

Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260219182823.926702-5-imre.deak@intel.com
3 months agodrm/i915/dp_tunnel: Split update_tunnel_state()
Imre Deak [Thu, 19 Feb 2026 18:28:21 +0000 (20:28 +0200)] 
drm/i915/dp_tunnel: Split update_tunnel_state()

Split update_tunnel_state() into two helpers: one that updates the
tunnel state, and another that detects whether the tunnel bandwidth
has changed.

This prepares for a follow-up change that needs to compare the current
bandwidth against the value from before the DP tunnel was detected and
bandwidth allocation mode was enabled.

While at it, document the return value of update_tunnel_state().

Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260219182823.926702-4-imre.deak@intel.com
3 months agodrm/i915/dp_tunnel: Simplify detection of link BW change
Imre Deak [Thu, 19 Feb 2026 18:28:20 +0000 (20:28 +0200)] 
drm/i915/dp_tunnel: Simplify detection of link BW change

update_tunnel_state() checks whether a tunnel state change (e.g.
available tunnel bandwidth) affects the list of valid modes for the
sink connected through the tunnel. If so, its caller sends a hotplug
event so userspace can re-enumerate the modes.

A change in tunnel bandwidth does not affect the mode list if the
bandwidth was above the sink's DPRX bandwidth both before and after the
update, since in that case the effective bandwidth remains limited by
the DPRX.

As get_current_link_bw() via intel_dp_max_link_data_rate() already
returns bandwidth values clamped to the DPRX limit, the condition for
detecting a mode list change can be simplified to:

    old_bw != new_bw

Remove the explicit checks for whether the bandwidth was below the
maximum DPRX bandwidth before and after the update, and rely on the
clamped bandwidth values instead.

Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260219182823.926702-3-imre.deak@intel.com
3 months agodrm/i915/dp_tunnel: Don't update tunnel state during system resume
Imre Deak [Thu, 19 Feb 2026 18:28:19 +0000 (20:28 +0200)] 
drm/i915/dp_tunnel: Don't update tunnel state during system resume

During system resume, restoring the pre-suspend display state must not
fail. This requires preserving the sink capabilities from before
suspend, including the available link bandwidth.

If these capabilities are not preserved, the restore modeset may fail,
either due to a missing sink capability or insufficient link bandwidth
for the restored mode.

When the sink is connected through a DP tunnel, prevent such capability
changes by skipping tunnel state updates during resume. This also avoids
updating the sink state via the tunnel while it is being resumed.

Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260219182823.926702-2-imre.deak@intel.com
3 months agodrm/i915/fbdev: print info about stolen memory preference for fbdev
Vinod Govindapillai [Fri, 20 Feb 2026 17:09:08 +0000 (19:09 +0200)] 
drm/i915/fbdev: print info about stolen memory preference for fbdev

If stolen memory cannot be allocated for the fbdev because of the
preference for fbc, have an info about that in the log.

v2: log text changed

Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patch.msgid.link/20260220170908.201422-7-vinod.govindapillai@intel.com
3 months agodrm/xe/fbdev: print info about stolen memory preference for fbdev
Vinod Govindapillai [Fri, 20 Feb 2026 17:09:07 +0000 (19:09 +0200)] 
drm/xe/fbdev: print info about stolen memory preference for fbdev

If stolen memory cannot be allocated for the fbdev and initial plane
bo because of the preference for fbc, have an info about that in
the log.

v2: log text changed

Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patch.msgid.link/20260220170908.201422-6-vinod.govindapillai@intel.com
3 months agodrm/xe/fbdev: Extract intel_fbdev_fb_prefer_stolen()
Ville Syrjälä [Fri, 20 Feb 2026 17:09:06 +0000 (19:09 +0200)] 
drm/xe/fbdev: Extract intel_fbdev_fb_prefer_stolen()

Pull the "should we keep the bios fb in stolen?" logic into
into a helper function, same as was done for i915. Gives us
a single place where to tweak the heuristics.

v2: changes related to rebase and consolidated other conditions
    for the stolen preference into this single function (Vinod)

v3: avoid including intel_display_core.h (Jani Nikula)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patch.msgid.link/20260220170908.201422-5-vinod.govindapillai@intel.com
3 months agodrm/i915/fbdev: Extract intel_fbdev_fb_prefer_stolen()
Ville Syrjälä [Fri, 20 Feb 2026 17:09:05 +0000 (19:09 +0200)] 
drm/i915/fbdev: Extract intel_fbdev_fb_prefer_stolen()

Consolidate the "should we allocate fbdev fb in stolen?"
check into a helper function. Makes it easier to change the
heuristics without having to change so many places.

v2: rebase related changes and consolidate all the prefer
    stolen conditions into a single function (Vinod)

v3: avoid including intel_display_core.h (Jani)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patch.msgid.link/20260220170908.201422-4-vinod.govindapillai@intel.com
3 months agodrm/i915/display: remove the usage of dev_priv
Vinod Govindapillai [Fri, 20 Feb 2026 17:09:04 +0000 (19:09 +0200)] 
drm/i915/display: remove the usage of dev_priv

Remove the remaining usage of dev_priv in intel_fbdev_fb.c
and use i915 instead.

Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patch.msgid.link/20260220170908.201422-3-vinod.govindapillai@intel.com
3 months agodrm/xe/fbdev: Fix BIOS FB vs. stolen size check
Ville Syrjälä [Fri, 20 Feb 2026 17:09:03 +0000 (19:09 +0200)] 
drm/xe/fbdev: Fix BIOS FB vs. stolen size check

Looks like stolen->size is in bytes, not pages. Remove the
bogus PAGE_SHIFT stuff.

Also for some random reason xe rejects the FB if it takes up
exactly half of stolen, whereas i915 allows it to be used
in that case. Adjust xe to follow the i915 rule for consistency.

v2: rebase related updates

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Acked-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patch.msgid.link/20260220170908.201422-2-vinod.govindapillai@intel.com
3 months agoMerge drm/drm-next into drm-intel-next
Jani Nikula [Wed, 25 Feb 2026 11:23:04 +0000 (13:23 +0200)] 
Merge drm/drm-next into drm-intel-next

Sync with v7.0-rc1 which contains a few treewide changes affecting i915.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
3 months agodrm/i915/lt_phy_regs: Add SoC/OS turnaround time
Arun R Murthy [Mon, 16 Feb 2026 04:59:40 +0000 (10:29 +0530)] 
drm/i915/lt_phy_regs: Add SoC/OS turnaround time

On top the timeouts mentioned in the spec which includes only the PHY
timeouts include the SoC and the OS turnaround time.
The overhead value is based on the stress test results with multiple
available panels.

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260216-timeout-v3-2-055522c22560@intel.com
3 months agodrm/i915/cx0_phy_regs: Include SoC and OS turnaround time
Arun R Murthy [Mon, 16 Feb 2026 04:59:39 +0000 (10:29 +0530)] 
drm/i915/cx0_phy_regs: Include SoC and OS turnaround time

The port refclk enable timeout and the soc ready timeout value mentioned
in the spec is the PHY timings and doesn't include the turnaround time
from the SoC or OS. So add an overhead timeout value on top of the
recommended timeouts from the PHY spec.
The overhead value is based on the stress test results with multiple
available panels.

Reported-by: Cole Leavitt <cole@unwrap.rs>
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14713
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260216-timeout-v3-1-055522c22560@intel.com
3 months agoLinux 7.0-rc1 v7.0-rc1
Linus Torvalds [Sun, 22 Feb 2026 21:18:59 +0000 (13:18 -0800)] 
Linux 7.0-rc1

3 months agoMerge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux
Linus Torvalds [Sun, 22 Feb 2026 21:12:04 +0000 (13:12 -0800)] 
Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux

Pull fsverity fixes from Eric Biggers:

 - Fix a build error on parisc

 - Remove the non-large-folio-aware function fsverity_verify_page()

* tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux:
  fsverity: fix build error by adding fsverity_readahead() stub
  fsverity: remove fsverity_verify_page()
  f2fs: make f2fs_verify_cluster() partially large-folio-aware
  f2fs: remove unnecessary ClearPageUptodate in f2fs_verify_cluster()

3 months agoMerge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 22 Feb 2026 21:09:33 +0000 (13:09 -0800)] 
Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux

Pull crypto library fix from Eric Biggers:
 "Fix a big endian specific issue in the PPC64-optimized AES code"

* tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  lib/crypto: powerpc/aes: Fix rndkey_from_vsx() on big endian CPUs

3 months agoCREDITS: Add -next to Stephen Rothwell's entry
Mark Brown [Tue, 17 Feb 2026 13:10:46 +0000 (13:10 +0000)] 
CREDITS: Add -next to Stephen Rothwell's entry

Stephen retired and stepped back from -next maintainership, update his
entry in CREDITS to recognise his 18 years of hard work making it what
it is today and all the impact it's had on our development process.

Also update to his current GnuPG key while we're here.

Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agox509: select CONFIG_CRYPTO_LIB_SHA256
Arnd Bergmann [Tue, 17 Feb 2026 08:26:49 +0000 (08:26 +0000)] 
x509: select CONFIG_CRYPTO_LIB_SHA256

The x509 public key code gained a dependency on the sha256 hash
implementation, causing a rare link time failure in randconfig
builds:

  arm-linux-gnueabi-ld: crypto/asymmetric_keys/x509_public_key.o: in function `x509_get_sig_params':
  x509_public_key.c:(.text.x509_get_sig_params+0x12): undefined reference to `sha256'
  arm-linux-gnueabi-ld: (sha256): Unknown destination type (ARM/Thumb) in crypto/asymmetric_keys/x509_public_key.o
  x509_public_key.c:(.text.x509_get_sig_params+0x12): dangerous relocation: unsupported relocation

Select the necessary library code from Kconfig.

Fixes: 2c62068ac86b ("x509: Separately calculate sha256 for blacklist")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoxz: fix arm fdt compile error for kmalloc replacement
Haiyue Wang [Sun, 22 Feb 2026 12:11:00 +0000 (20:11 +0800)] 
xz: fix arm fdt compile error for kmalloc replacement

Align to the commit bf4afc53b77a ("Convert 'alloc_obj' family to use the
new default GFP_KERNEL argument") update the 'kmalloc_obj' declaration
for userspace to fix below compile error:

  In file included from arch/arm/boot/compressed/../../../../lib/decompress_unxz.c:241,
                   from arch/arm/boot/compressed/decompress.c:56:
  arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c: In function 'xz_dec_init':
  arch/arm/boot/compressed/../../../../lib/xz/xz_dec_stream.c:787:28: error: implicit declaration of function 'kmalloc_obj'; did you mean 'kmalloc'? [-Wimplicit-function-declaration]
     787 |         struct xz_dec *s = kmalloc_obj(*s);
         |                            ^~~~~~~~~~~
         |                            kmalloc

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
Fixes: 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")
Fixes: bf4afc53b77a ("Convert 'alloc_obj' family to use the new default GFP_KERNEL argument")
Reviewed-by: Kees Cook <kees@kernel.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoMerge tag 'rtc-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Linus Torvalds [Sun, 22 Feb 2026 17:43:11 +0000 (09:43 -0800)] 
Merge tag 'rtc-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC updates from Alexandre Belloni:

 - loongson: Loongson-2K0300 support

 - s35390a: nvmem support

 - zynqmp: rework calibration

* tag 'rtc-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: ds1390: fix number of bytes read from RTC
  rtc: class: Remove duplicate check for alarm
  rtc: optee: simplify OP-TEE context match
  rtc: interface: Alarm race handling should not discard preceding error
  rtc: s35390a: implement nvmem support
  rtc: loongson: Add Loongson-2K0300 support
  dt-bindings: rtc: loongson: Document Loongson-2K0300 compatible
  dt-bindings: rtc: loongson: Correct Loongson-1C interrupts property
  dt-bindings: rtc: renesas,rz-rtca3: Add RZ/V2N support
  dt-bindings: rtc: cpcap: convert to schema
  rtc: zynqmp: use dynamic max and min offset ranges
  rtc: zynqmp: rework set_offset
  rtc: zynqmp: rework read_offset
  rtc: zynqmp: check calibration max value
  rtc: zynqmp: correct frequency value
  rtc: amlogic-a4: Remove IRQF_ONESHOT
  rtc: pcf8563: use correct of_node for output clock
  rtc: max31335: use correct CONFIG symbol in IS_REACHABLE()
  rtc: nvvrs: Add ARCH_TEGRA to the NV VRS RTC driver

3 months agoMerge tag 'rust-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda...
Linus Torvalds [Sun, 22 Feb 2026 16:43:31 +0000 (08:43 -0800)] 
Merge tag 'rust-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull rust fixes from Miguel Ojeda:
 "Toolchain and infrastructure:

   - Pass '-Zunstable-options' flag required by the future Rust 1.95.0

   - Fix 'objtool' warning for Rust 1.84.0

  'kernel' crate:

   - 'irq' module: add missing bound detected by the future Rust 1.95.0

   - 'list' module: add missing 'unsafe' blocks and placeholder safety
     comments to macros (an issue for future callers within the crate)

  'pin-init' crate:

   - Clean Clippy warning that changed behavior in the future Rust
     1.95.0"

* tag 'rust-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux:
  rust: list: Add unsafe blocks for container_of and safety comments
  rust: pin-init: replace clippy `expect` with `allow`
  rust: irq: add `'static` bounds to irq callbacks
  objtool/rust: add one more `noreturn` Rust function
  rust: kbuild: pass `-Zunstable-options` for Rust 1.95.0

3 months agoMerge tag 'trace-rv-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Sun, 22 Feb 2026 16:40:13 +0000 (08:40 -0800)] 
Merge tag 'trace-rv-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull runtime verifier fix from Steven Rostedt:

 - Fix multiple definition of __pcpu_unique_da_mon_this

   After refactoring monitors, we used static per-cpu variables with the
   same names across different per-cpu monitors. This is explicitly
   disallowed for modules on some architectures (alpha) or if
   CONFIG_DEBUG_FORCE_WEAK_PER_CPU is enabled (e.g. Fedora's debug
   kernel). Make sure all those variables have different names to avoid
   compilation issues.

* tag 'trace-rv-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  rv: Fix multiple definition of __pcpu_unique_da_mon_this

3 months agoConvert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Kees Cook [Sun, 22 Feb 2026 07:46:04 +0000 (23:46 -0800)] 
Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses

Conversion performed via this Coccinelle script:

  // SPDX-License-Identifier: GPL-2.0-only
  // Options: --include-headers-for-types --all-includes --include-headers --keep-comments
  virtual patch

  @gfp depends on patch && !(file in "tools") && !(file in "samples")@
  identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
      kzalloc_obj,kzalloc_objs,kzalloc_flex,
    kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
    kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
  @@

   ALLOC(...
  - , GFP_KERNEL
   )

  $ make coccicheck MODE=patch COCCI=gfp.cocci

Build and boot tested x86_64 with Fedora 42's GCC and Clang:

Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoConvert more 'alloc_obj' cases to default GFP_KERNEL arguments
Linus Torvalds [Sun, 22 Feb 2026 04:03:00 +0000 (20:03 -0800)] 
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments

This converts some of the visually simpler cases that have been split
over multiple lines.  I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.

Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script.  I probably had made it a bit _too_ trivial.

So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.

The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoConvert 'alloc_flex' family to use the new default GFP_KERNEL argument
Linus Torvalds [Sun, 22 Feb 2026 01:06:51 +0000 (17:06 -0800)] 
Convert 'alloc_flex' family to use the new default GFP_KERNEL argument

This is the exact same thing as the 'alloc_obj()' version, only much
smaller because there are a lot fewer users of the *alloc_flex()
interface.

As with alloc_obj() version, this was done entirely with mindless brute
force, using the same script, except using 'flex' in the pattern rather
than 'objs*'.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoConvert 'alloc_obj' family to use the new default GFP_KERNEL argument
Linus Torvalds [Sun, 22 Feb 2026 00:37:42 +0000 (16:37 -0800)] 
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument

This was done entirely with mindless brute force, using

    git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoadd default_gfp() helper macro and use it in the new *alloc_obj() helpers
Linus Torvalds [Sun, 22 Feb 2026 00:14:11 +0000 (16:14 -0800)] 
add default_gfp() helper macro and use it in the new *alloc_obj() helpers

Most simple allocations use GFP_KERNEL, and with the new allocation
helpers being introduced, let's just take advantage of that to simplify
that default case.

It's a numbers game:

    git grep 'alloc_obj(' |
sed 's/.*\(GFP_[_A-Z]*\).*/\1/' |
sort | uniq -c | sort -n | tail

shows that about 90% of all those new allocator instances just use that
standard GFP_KERNEL.

Those helpers are already macros, and we can easily just make it be the
default case when the gfp argument is missing.

And yes, we could do that for all the legacy interfaces too, but let's
keep it to just the new ones at least for now, since those all got
converted recently anyway, so this is not any "extra" noise outside of
that limited conversion.

And, in fact, I want to do this before doing the -rc1 release, exactly
so that we don't get extra merge conflicts.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoslab.h: disable completely broken overflow handling in flex allocations
Linus Torvalds [Sat, 21 Feb 2026 23:12:09 +0000 (15:12 -0800)] 
slab.h: disable completely broken overflow handling in flex allocations

Commit 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for
non-scalar types") started using the new allocation helpers, and in the
process showed that they were completely non-working.

The overflow logic in overflows_flex_counter_type() is completely the
wrong way around, and that broke __alloc_flex() completely.  By chance,
the resulting code was then such a mess that clang generated
sufficiently garbage code that objtool warned about it all.  Which made
it somewhat quicker to narrow things down.

While fixing overflows_flex_counter_type() would presumably fix this
all, I'm excising the whole broken overflow logic from __alloc_flex(),
because we don't want that kind of code in basic allocation functions
anyway.

That (no longer) broken overflows_flex_counter_type() thing needs to be
inserted into the actual __set_flex_counter() logic in the unlikely case
that we ever want this at all.  And made conditional.

Fixes: 81cee9166a90 ("compiler_types: Introduce __flex_counter() and family")
Fixes: 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")
Cc: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/all/CAHk-=whEd020BYzGTzYrENjD9Z5_82xx6h8HsQvH5xDSnv0=Hw@mail.gmail.com/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 months agoMerge tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Sat, 21 Feb 2026 19:02:58 +0000 (11:02 -0800)] 
Merge tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull kmalloc_obj conversion from Kees Cook:
 "This does the tree-wide conversion to kmalloc_obj() and friends using
  coccinelle, with a subsequent small manual cleanup of whitespace
  alignment that coccinelle does not handle.

  This uncovered a clang bug in __builtin_counted_by_ref(), so the
  conversion is preceded by disabling that for current versions of
  clang.  The imminent clang 22.1 release has the fix.

  I've done allmodconfig build tests for x86_64, arm64, i386, and arm. I
  did defconfig builds for alpha, m68k, mips, parisc, powerpc, riscv,
  s390, sparc, sh, arc, csky, xtensa, hexagon, and openrisc"

* tag 'kmalloc_obj-treewide-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  kmalloc_obj: Clean up after treewide replacements
  treewide: Replace kmalloc with kmalloc_obj for non-scalar types
  compiler_types: Disable __builtin_counted_by_ref for Clang

3 months agoMerge tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 21 Feb 2026 18:51:08 +0000 (10:51 -0800)] 
Merge tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools updates from Arnaldo Carvalho de Melo:

 - Introduce 'perf sched stats' tool with record/report/diff workflows
   using schedstat counters

 - Add a faster libdw based addr2line implementation and allow selecting
   it or its alternatives via 'perf config addr2line.style='

 - Data-type profiling fixes and improvements including the ability to
   select fields using 'perf report''s -F/-fields, e.g.:

     'perf report --fields overhead,type'

 - Add 'perf test' regression tests for Data-type profiling with C and
   Rust workloads

 - Fix srcline printing with inlines in callchains, make sure this has
   coverage in 'perf test'

 - Fix printing of leaf IP in LBR callchains

 - Fix display of metrics without sufficient permission in 'perf stat'

 - Print all machines in 'perf kvm report -vvv', not just the host

 - Switch from SHA-1 to BLAKE2s for build ID generation, remove SHA-1
   code

 - Fix 'perf report's histogram entry collapsing with '-F' option

 - Use system's cacheline size instead of a hardcoded value in 'perf
   report'

 - Allow filtering conversion by time range in 'perf data'

 - Cover conversion to CTF using 'perf data' in 'perf test'

 - Address newer glibc const-correctness (-Werror=discarded-qualifiers)
   issues

 - Fixes and improvements for ARM's CoreSight support, simplify ARM SPE
   event config in 'perf mem', update docs for 'perf c2c' including the
   ARM events it can be used with

 - Build support for generating metrics from arch specific python
   script, add extra AMD, Intel, ARM64 metrics using it

 - Add AMD Zen 6 events and metrics

 - Add JSON file with OpenHW Risc-V CVA6 hardware counters

 - Add 'perf kvm' stats live testing

 - Add more 'perf stat' tests to 'perf test'

 - Fix segfault in `perf lock contention -b/--use-bpf`

 - Fix various 'perf test' cases for s390

 - Build system cleanups, bump minimum shellcheck version to 0.7.2

 - Support building the capstone based annotation routines as a plugin

 - Allow passing extra Clang flags via EXTRA_BPF_FLAGS

* tag 'perf-tools-for-v7.0-1-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (255 commits)
  perf test script: Add python script testing support
  perf test script: Add perl script testing support
  perf script: Allow the generated script to be a path
  perf test: perf data --to-ctf testing
  perf test: Test pipe mode with data conversion --to-json
  perf json: Pipe mode --to-ctf support
  perf json: Pipe mode --to-json support
  perf check: Add libbabeltrace to the listed features
  perf build: Allow passing extra Clang flags via EXTRA_BPF_FLAGS
  perf test data_type_profiling.sh: Skip just the Rust tests if code_with_type workload is missing
  tools build: Fix feature test for rust compiler
  perf libunwind: Fix calls to thread__e_machine()
  perf stat: Add no-affinity flag
  perf evlist: Reduce affinity use and move into iterator, fix no affinity
  perf evlist: Missing TPEBS close in evlist__close()
  perf evlist: Special map propagation for tool events that read on 1 CPU
  perf stat-shadow: In prepare_metric fix guard on reading NULL perf_stat_evsel
  Revert "perf tool_pmu: More accurately set the cpus for tool events"
  tools build: Emit dependencies file for test-rust.bin
  tools build: Make test-rust.bin be removed by the 'clean' target
  ...

3 months agoMerge tag 'cocci-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall...
Linus Torvalds [Sat, 21 Feb 2026 18:25:42 +0000 (10:25 -0800)] 
Merge tag 'cocci-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux

Pull coccinelle updates from Julia Lawall:
 "This simplifies and clarifies the handling of output generated by
  Coccinelle that is sent to standard error.

  By default, this goes to /dev/null. Remind the user of that and
  encourage them to provide another file name (Benjamin Philip)"

* tag 'cocci-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
  Documentation: Coccinelle: document debug log handling
  scripts: coccicheck: warn on unset debug file
  scripts: coccicheck: simplify debug file handling

3 months agoMerge tag 'ntb-7.0' of https://github.com/jonmason/ntb
Linus Torvalds [Sat, 21 Feb 2026 18:20:32 +0000 (10:20 -0800)] 
Merge tag 'ntb-7.0' of https://github.com/jonmason/ntb

Pull NTB (PCIe non-transparent bridge) updates from Jon Mason:
 "NTB updates include debugfs improvements, correctness fixes, cleanups,
  and new hardware support:

  ntb_transport QP stats are converted to seq_file, a tx_memcpy_offload
  module parameter is introduced with associated ordering fixes, and a
  debugfs queue name truncation bug is corrected.

  Additional fixes address format specifier mismatches in ntb_tool and
  boundary conditions in the Switchtec driver, while unused MSI helpers
  are removed and the codebase migrates to dma_map_phys().

  Intel Gen6 (Diamond Rapids) NTB support is also added"

* tag 'ntb-7.0' of https://github.com/jonmason/ntb:
  NTB: ntb_transport: Use seq_file for QP stats debugfs
  NTB: ntb_transport: Fix too small buffer for debugfs_name
  ntb/ntb_tool: correct sscanf format for u64 and size_t in tool_peer_mw_trans_write
  ntb: intel: Add Intel Gen6 NTB support for DiamondRapids
  NTB/msi: Remove unused functions
  ntb: ntb_hw_switchtec: Increase MAX_MWS limit to 256
  ntb: ntb_hw_switchtec: Fix array-index-out-of-bounds access
  ntb: ntb_hw_switchtec: Fix shift-out-of-bounds for 0 mw lut
  NTB: epf: allow built-in build
  ntb: migrate to dma_map_phys instead of map_page
  NTB: ntb_transport: Add 'tx_memcpy_offload' module option
  NTB: ntb_transport: Remove unused 'retries' field from ntb_queue_entry

3 months agoMerge tag 'io_uring-20260221' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe...
Linus Torvalds [Sat, 21 Feb 2026 18:05:49 +0000 (10:05 -0800)] 
Merge tag 'io_uring-20260221' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull io_uring fixes from Jens Axboe:

 - A fix for a missing URING_CMD128 opcode check, fixing an issue with
   the SQE mixed mode support introduced in 6.19. Merged late due to
   having multiple dependencies

 - Add sqe->cmd size checking for big SQEs, similar to what we have for
   normal sized SQEs

 - Fix a race condition in zcrx, that leads to a double free

* tag 'io_uring-20260221' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
  io_uring: Add size check for sqe->cmd
  io_uring: add IORING_OP_URING_CMD128 to opcode checks
  io_uring/zcrx: fix user_ref race between scrub and refill paths

3 months agoMerge tag 'fixes-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt...
Linus Torvalds [Sat, 21 Feb 2026 17:58:22 +0000 (09:58 -0800)] 
Merge tag 'fixes-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock

Pull memblock fix from Mike Rapoport:
 "Fix detection of NUMA node for CXL windows

  phys_to_target_node() may assign a CXL Fixed Memory Window to the
  wrong NUMA node when a CXL node resides in the gap of discontinuous
  System RAM node.

  Fix this by checking both numa_meminfo and numa_reserved_meminfo,
  preferring the reserved NID when the address appears in both"

* tag 'fixes-2026-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
  mm: numa_memblks: Identify the accurate NUMA ID of CFMW

3 months agoMerge tag 'sched_ext-for-7.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 21 Feb 2026 17:38:59 +0000 (09:38 -0800)] 
Merge tag 'sched_ext-for-7.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext

Pull sched_ext fixes from Tejun Heo:

 - Various bug fixes for the example schedulers and selftests

* tag 'sched_ext-for-7.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext:
  tools/sched_ext: fix getopt not re-parsed on restart
  tools/sched_ext: scx_userland: fix data races on shared counters
  tools/sched_ext: scx_pair: fix stride == 0 crash on single-CPU systems
  tools/sched_ext: scx_central: fix CPU_SET and skeleton leak on early exit
  tools/sched_ext: scx_userland: fix stale data on restart
  tools/sched_ext: scx_flatcg: fix potential stack overflow from VLA in fcg_read_stats
  selftests/sched_ext: Fix rt_stall flaky failure
  tools/sched_ext: scx_userland: fix restart and stats thread lifecycle bugs
  tools/sched_ext: scx_central: fix sched_setaffinity() call with the set size
  tools/sched_ext: scx_flatcg: zero-initialize stats counter array

3 months agoMerge tag 'v7.0-rc-part2-ksmbd-server-fixes' of git://git.samba.org/ksmbd
Linus Torvalds [Sat, 21 Feb 2026 17:11:32 +0000 (09:11 -0800)] 
Merge tag 'v7.0-rc-part2-ksmbd-server-fixes' of git://git.samba.org/ksmbd

Pull smb server fixes from Steve French:
 "Two small fixes:

   - fix potential deadlock

   - minor cleanup"

* tag 'v7.0-rc-part2-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
  ksmbd: call ksmbd_vfs_kern_path_end_removing() on some error paths
  smb: server: Remove duplicate include of misc.h

3 months agoDocumentation: Coccinelle: document debug log handling
Benjamin Philip [Tue, 6 Jan 2026 19:08:36 +0000 (00:38 +0530)] 
Documentation: Coccinelle: document debug log handling

The current debug documentation does not mention that logs are printed
to stdout unless DEBUG_FILE is set. It also doesn't mention that
Coccinelle cannot overwrite debug files.

Document this behaviour in the examples and reference it in the
debugging section.

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>