]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
5 weeks agodrm/msm/dp: drop the msm_dp_catalog module
Dmitry Baryshkov [Sun, 18 May 2025 11:21:44 +0000 (14:21 +0300)] 
drm/msm/dp: drop the msm_dp_catalog module

Now as the msm_dp_catalog module became nearly empty, drop it, accessing
registers directly from the corresponding submodules.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/654332/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-11-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: move interrupt handling to dp_ctrl
Dmitry Baryshkov [Sun, 18 May 2025 11:21:43 +0000 (14:21 +0300)] 
drm/msm/dp: move interrupt handling to dp_ctrl

It makes it easier to keep all interrupts-related code in dp_ctrl
submodule. Move all functions to dp_ctrl.c.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654330/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-10-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: move more AUX functions to dp_aux.c
Dmitry Baryshkov [Sun, 18 May 2025 11:21:42 +0000 (14:21 +0300)] 
drm/msm/dp: move more AUX functions to dp_aux.c

Move several misnamed functions accessing AUX bus to dp_aux.c, further
cleaning up dp_catalog submodule.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654333/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-9-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: move/inline ctrl register functions
Dmitry Baryshkov [Sun, 18 May 2025 11:21:41 +0000 (14:21 +0300)] 
drm/msm/dp: move/inline ctrl register functions

Move CTRL-related functions to dp_ctrl.c, inlining one line wrappers
during this process. The enable/disable functions have been split to the
enable/disable or enter/exit pairs. The IRQ and HPD related functions
are left in dp_catalog.c, pending later cleanup.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654328/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-8-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: move/inline audio related functions
Dmitry Baryshkov [Sun, 18 May 2025 11:21:40 +0000 (14:21 +0300)] 
drm/msm/dp: move/inline audio related functions

Move audio-related functions to dp_audio.c, following up the cleanup
done by the rest of the submodules. Inline functions with simple
register access patterns.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654325/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-7-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: move/inline panel related functions
Dmitry Baryshkov [Sun, 18 May 2025 11:21:39 +0000 (14:21 +0300)] 
drm/msm/dp: move/inline panel related functions

Move panel-related functions to dp_panel.c, following up the cleanup
done by the rest of the submodules.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654321/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-6-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: move/inline AUX register functions
Dmitry Baryshkov [Sun, 18 May 2025 11:21:38 +0000 (14:21 +0300)] 
drm/msm/dp: move/inline AUX register functions

Move all register-level functions to dp_aux.c, inlining one line
wrappers during this process.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654322/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-5-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: move I/O functions to global header
Dmitry Baryshkov [Sun, 18 May 2025 11:21:37 +0000 (14:21 +0300)] 
drm/msm/dp: move I/O functions to global header

Move msm_dp_read()/msm_write_foo() functions to the dp_catalog.h,
allowing other modules to access the data directly.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654318/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-4-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: pull I/O data out of msm_dp_catalog_private()
Dmitry Baryshkov [Sun, 18 May 2025 11:21:36 +0000 (14:21 +0300)] 
drm/msm/dp: pull I/O data out of msm_dp_catalog_private()

Having I/O regions inside a msm_dp_catalog_private() results in extra
layers of one-line wrappers for accessing the data. Move I/O region base
and size to the globally visible struct msm_dp_catalog.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654319/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-3-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: read hw revision only once
Dmitry Baryshkov [Sun, 18 May 2025 11:21:35 +0000 (14:21 +0300)] 
drm/msm/dp: read hw revision only once

There is little point in rereading DP controller revision over and over
again. Read it once, after the first software reset.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654316/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-2-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dp: split MMSS_DP_DSC_DTO register write to a separate function
Dmitry Baryshkov [Sun, 18 May 2025 11:21:34 +0000 (14:21 +0300)] 
drm/msm/dp: split MMSS_DP_DSC_DTO register write to a separate function

It's the dp_panel's duty to clear the MMSS_DP_DSC_DTO register. Once DP
driver gets DSC support, it will handle that register in other places
too. Split a call to write 0x0 to that register to a separate function.

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # sc7180-trogdor
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/654314/
Link: https://lore.kernel.org/r/20250518-fd-dp-audio-fixup-v6-1-2f0ec3ec000d@oss.qualcomm.com
5 weeks agodrm/msm/dpu: move features out of the DPU_HW_BLK_INFO
Dmitry Baryshkov [Thu, 22 May 2025 19:03:49 +0000 (22:03 +0300)] 
drm/msm/dpu: move features out of the DPU_HW_BLK_INFO

As features bits are now unused by some of the hardware block
configuration structures, remove the 'features' from the DPU_HW_BLK_INFO
so that it doesn't get included into hw info structures by default and
only include it when necessary.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655420/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-30-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: drop ununused MIXER features
Dmitry Baryshkov [Thu, 22 May 2025 19:03:48 +0000 (22:03 +0300)] 
drm/msm/dpu: drop ununused MIXER features

Drop unused LM features from the current codebase.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655411/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-29-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: drop ununused PINGPONG features
Dmitry Baryshkov [Thu, 22 May 2025 19:03:47 +0000 (22:03 +0300)] 
drm/msm/dpu: drop ununused PINGPONG features

All existing PINGPONG feature bits are completely unused. Drop them from
the current codebase.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655409/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-28-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: drop unused MDP TOP features
Dmitry Baryshkov [Thu, 22 May 2025 19:03:46 +0000 (22:03 +0300)] 
drm/msm/dpu: drop unused MDP TOP features

Drop unused MDP TOP features from the current codebase.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655412/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-27-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_SSPP_QOS_8LVL
Dmitry Baryshkov [Thu, 22 May 2025 19:03:45 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_SSPP_QOS_8LVL

Continue migration to the MDSS-revision based checks and replace
DPU_SSPP_QOS_8LVL feature bit with the core_major_ver >= 4 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655406/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-26-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_WB_INPUT_CTRL
Dmitry Baryshkov [Thu, 22 May 2025 19:03:44 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_WB_INPUT_CTRL

Continue migration to the MDSS-revision based checks and replace
DPU_WB_INPUT_CTRL feature bit with the core_major_ver >= 5 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655407/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-25-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_DSC_OUTPUT_CTRL
Dmitry Baryshkov [Thu, 22 May 2025 19:03:43 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_DSC_OUTPUT_CTRL

Continue migration to the MDSS-revision based checks and replace
DPU_DSC_OUTPUT_CTRL feature bit with the core_major_ver >= 5 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655404/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-24-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_DSC_HW_REV_1_2
Dmitry Baryshkov [Thu, 22 May 2025 19:03:42 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_DSC_HW_REV_1_2

Continue migration to the MDSS-revision based checks and replace
DPU_DSC_HW_REV_1_2 feature bit with the core_major_ver >= 7 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655403/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-23-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_DIM_LAYER
Dmitry Baryshkov [Thu, 22 May 2025 19:03:41 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_DIM_LAYER

Continue migration to the MDSS-revision based checks and drop the
DPU_DIM_LAYER feature bit. It is currently unused, but can be replaed
with the core_major_ver >= 4 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655418/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-22-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_MIXER_COMBINED_ALPHA
Dmitry Baryshkov [Thu, 22 May 2025 19:03:40 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_MIXER_COMBINED_ALPHA

Continue migration to the MDSS-revision based checks and replace
DPU_MIXER_COMBINED_ALPHA feature bit with the core_major_ver >= 4 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655398/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-21-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_MDP_AUDIO_SELECT
Dmitry Baryshkov [Thu, 22 May 2025 19:03:39 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_MDP_AUDIO_SELECT

Continue migration to the MDSS-revision based checks and replace
DPU_MDP_AUDIO_SELECT feature bit with the core_major_ver == 4 ||
core_major_ver == 5 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/655399/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-20-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_MDP_PERIPH_0_REMOVED
Dmitry Baryshkov [Thu, 22 May 2025 19:03:38 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_MDP_PERIPH_0_REMOVED

Continue migration to the MDSS-revision based checks and replace
DPU_MDP_PERIPH_0_REMOVED feature bit with the core_major_ver >= 8 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655400/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-19-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_MDP_VSYNC_SEL
Dmitry Baryshkov [Thu, 22 May 2025 19:03:37 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_MDP_VSYNC_SEL

Continue migration to the MDSS-revision based checks and replace
DPU_MDP_VSYNC_SEL feature bit with the core_major_ver < 5 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655395/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-18-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_PINGPONG_DITHER
Dmitry Baryshkov [Thu, 22 May 2025 19:03:36 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_PINGPONG_DITHER

Continue migration to the MDSS-revision based checks and replace
DPU_PINGPONG_DITHER feature bit with the core_major_ver >= 3 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655393/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-17-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_PINGPONG_DSC
Dmitry Baryshkov [Thu, 22 May 2025 19:03:35 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_PINGPONG_DSC

Continue migration to the MDSS-revision based checks and replace
DPU_PINGPONG_DSC feature bit with the core_major_ver < 7 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655390/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-16-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_INTF_INPUT_CTRL
Dmitry Baryshkov [Thu, 22 May 2025 19:03:34 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_INTF_INPUT_CTRL

Continue migration to the MDSS-revision based checks and replace
DPU_INTF_INPUT_CTRL feature bit with the core_major_ver >= 5 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655389/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-15-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_INTF_STATUS_SUPPORTED
Dmitry Baryshkov [Thu, 22 May 2025 19:03:33 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_INTF_STATUS_SUPPORTED

Continue migration to the MDSS-revision based checks and replace
DPU_INTF_STATUS_SUPPORTED feature bit with the core_major_ver >= 5
check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655384/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-14-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_DATA_HCTL_EN
Dmitry Baryshkov [Thu, 22 May 2025 19:03:32 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_DATA_HCTL_EN

Continue migration to the MDSS-revision based checks and replace
DPU_DATA_HCTL_EN feature bit with the core_major_ver >= 5 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655381/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-13-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_CTL_VM_CFG
Dmitry Baryshkov [Thu, 22 May 2025 19:03:31 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_CTL_VM_CFG

Continue migration to the MDSS-revision based checks and replace
DPU_CTL_VM_CFG feature bit with the core_major_ver >= 7 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655385/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-12-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_CTL_DSPP_SUB_BLOCK_FLUSH
Dmitry Baryshkov [Thu, 22 May 2025 19:03:30 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_CTL_DSPP_SUB_BLOCK_FLUSH

Continue migration to the MDSS-revision based checks and replace
DPU_CTL_DSPP_SUB_BLOCK_FLUSH feature bit with the core_major_ver >= 7
check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655380/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-11-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_CTL_FETCH_ACTIVE
Dmitry Baryshkov [Thu, 22 May 2025 19:03:29 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_CTL_FETCH_ACTIVE

Continue migration to the MDSS-revision based checks and replace
DPU_CTL_FETCH_ACTIVE feature bit with the core_major_ver >= 7 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655379/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-10-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_CTL_ACTIVE_CFG
Dmitry Baryshkov [Thu, 22 May 2025 19:03:28 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_CTL_ACTIVE_CFG

Continue migration to the MDSS-revision based checks and replace
DPU_CTL_ACTIVE_CFG feature bit with the core_major_ver >= 5 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655376/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-9-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: get rid of DPU_CTL_HAS_LAYER_EXT4
Dmitry Baryshkov [Thu, 22 May 2025 19:03:27 +0000 (22:03 +0300)] 
drm/msm/dpu: get rid of DPU_CTL_HAS_LAYER_EXT4

Continue migration to the MDSS-revision based checks and replace
DPU_CTL_HAS_LAYER_EXT4 feature bit with the core_major_ver >= 9 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655371/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-8-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: remove DSPP_SC7180_MASK
Dmitry Baryshkov [Thu, 22 May 2025 19:03:26 +0000 (22:03 +0300)] 
drm/msm/dpu: remove DSPP_SC7180_MASK

Stop declaring DPU_DSPP_PCC as a part of the DSPP features, use the
presence of the PCC sblk to check whether PCC is present in the hardware
or not.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655373/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-7-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: inline _setup_mixer_ops()
Dmitry Baryshkov [Thu, 22 May 2025 19:03:25 +0000 (22:03 +0300)] 
drm/msm/dpu: inline _setup_mixer_ops()

Inline the _setup_mixer_ops() function, it makes it easier to handle
different conditions involving LM configuration.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655369/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-6-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: inline _setup_dspp_ops()
Dmitry Baryshkov [Thu, 22 May 2025 19:03:24 +0000 (22:03 +0300)] 
drm/msm/dpu: inline _setup_dspp_ops()

Inline the _setup_dspp_ops() function, it makes it easier to handle
different conditions involving DSPP configuration.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655372/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-5-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: inline _setup_dsc_ops()
Dmitry Baryshkov [Thu, 22 May 2025 19:03:23 +0000 (22:03 +0300)] 
drm/msm/dpu: inline _setup_dsc_ops()

Inline the _setup_dsc_ops() function, it makes it easier to handle
different conditions involving DSC configuration.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655365/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-4-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: inline _setup_ctl_ops()
Dmitry Baryshkov [Thu, 22 May 2025 19:03:22 +0000 (22:03 +0300)] 
drm/msm/dpu: inline _setup_ctl_ops()

Inline the _setup_ctl_ops() function, it makes it easier to handle
different conditions involving CTL configuration.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655367/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-3-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: drop INTF_SC7280_MASK
Dmitry Baryshkov [Thu, 22 May 2025 19:03:21 +0000 (22:03 +0300)] 
drm/msm/dpu: drop INTF_SC7280_MASK

The INTF_SC7280_MASK is equal to the INTF_SC7180_MASK. Stop defining a
separate symbol and use the INTF_SC7180_MASK instead.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655364/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-2-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/msm/dpu: stop passing mdss_ver to setup_timing_gen()
Dmitry Baryshkov [Thu, 22 May 2025 19:03:20 +0000 (22:03 +0300)] 
drm/msm/dpu: stop passing mdss_ver to setup_timing_gen()

As a preparation to further MDSS-revision cleanups stop passing MDSS
revision to the setup_timing_gen() callback. Instead store a pointer to
it inside struct dpu_hw_intf and use it diretly. It's not that the MDSS
revision can chance between dpu_hw_intf_init() and
dpu_encoder_phys_vid_setup_timing_engine().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655362/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-1-3b2085a07884@oss.qualcomm.com
5 weeks agodrm/ci: i915: cml: Fix the runner tag
Vignesh Raman [Thu, 26 Jun 2025 10:26:57 +0000 (15:56 +0530)] 
drm/ci: i915: cml: Fix the runner tag

The GitLab runner tags are case sensitive, and Flip-hatch's tag was
incorrectly lowercase. This prevented jobs from being picked up
by the runner. Fix the runner tag for Flip-hatch.

Based on https://gitlab.freedesktop.org/mesa/mesa/-/commit/03b480d3

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
5 weeks agodrm/ci: Remove sdm845/cheza jobs
Rob Clark [Sun, 29 Jun 2025 13:29:10 +0000 (06:29 -0700)] 
drm/ci: Remove sdm845/cheza jobs

These runners are no more.  So remove the jobs.

Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
5 weeks agodrm/ci: uprev mesa and ci-templates
Vignesh Raman [Mon, 5 May 2025 14:42:43 +0000 (20:12 +0530)] 
drm/ci: uprev mesa and ci-templates

The current s3cp stopped working after the migration. Update to the
latest mesa and ci-templates to get s3cp working again and adapt to
recent changes in mesa-ci.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Helen Koike <helen.fornazier@gmail.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
5 weeks agodrm/ci: python-artifacts: use shallow clone
Vignesh Raman [Wed, 30 Apr 2025 01:51:00 +0000 (07:21 +0530)] 
drm/ci: python-artifacts: use shallow clone

The python-artifacts job has a timeout of 10 minutes, which causes
build failures as it was unable to clone the repository within the
specified limits. Set GIT_DEPTH to 10 to speed up cloning and avoid
build failures due to timeouts when fetching the full repository.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Helen Koike <helen.fornazier@gmail.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
5 weeks agoMerge remote-tracking branch 'drm/drm-next' into msm-next
Rob Clark [Sun, 29 Jun 2025 02:54:49 +0000 (19:54 -0700)] 
Merge remote-tracking branch 'drm/drm-next' into msm-next

Back-merge drm-next to (indirectly) get arm-smmu updates for making
stall-on-fault more reliable.

Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
6 weeks agoMerge tag 'drm-misc-next-2025-06-26' of https://gitlab.freedesktop.org/drm/misc/kerne...
Dave Airlie [Thu, 26 Jun 2025 23:57:43 +0000 (09:57 +1000)] 
Merge tag 'drm-misc-next-2025-06-26' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next

drm-misc-next for 6.17:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:
- ci: Add Device tree validation and kunit
- connector: Move HDR sink metadat to drm_display_info

Driver Changes:
- bochs: drm_panic Support
- panfrost: MT8370 Support

- bridge:
  - tc358767: Convert to devm_drm_bridge_alloc()

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <mripard@redhat.com>
Link: https://lore.kernel.org/r/20250626-sincere-loon-of-effort-6dbdf9@houat
6 weeks agodrm/nouveau/disp: Use dev->dev to get the device
Sakari Ailus [Wed, 9 Apr 2025 10:33:44 +0000 (13:33 +0300)] 
drm/nouveau/disp: Use dev->dev to get the device

The local variable dev points to drm->dev already, use dev directly.

Link: https://lore.kernel.org/r/20250409103344.3661603-1-sakari.ailus@linux.intel.com
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
6 weeks agodrm/connector: move HDR sink metadata to display info
Jani Nikula [Mon, 19 May 2025 11:29:00 +0000 (14:29 +0300)] 
drm/connector: move HDR sink metadata to display info

Information parsed from the display EDID should be stored in display
info. Move HDR sink metadata there.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250519112900.1383997-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
6 weeks agodrm/ci: Add jobs to run KUnit tests
Vignesh Raman [Mon, 23 Jun 2025 08:50:28 +0000 (14:20 +0530)] 
drm/ci: Add jobs to run KUnit tests

Add jobs to run KUnit tests using tools/testing/kunit/kunit.py tool.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Acked-by: Helen Koike <helen.fornazier@gmail.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250623085033.39680-3-vignesh.raman@collabora.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
6 weeks agodrm/ci: Add jobs to validate devicetrees
Vignesh Raman [Mon, 23 Jun 2025 08:50:27 +0000 (14:20 +0530)] 
drm/ci: Add jobs to validate devicetrees

Add jobs to run dt_binding_check and dtbs_check. If warnings are seen,
exit with a non-zero error code while configuring them as warning in
the GitLab CI pipeline.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Acked-by: Helen Koike <helen.fornazier@gmail.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250623085033.39680-2-vignesh.raman@collabora.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
6 weeks agodrm/bochs: Add support for drm_panic
Ryosuke Yasuoka [Fri, 13 Jun 2025 13:20:14 +0000 (22:20 +0900)] 
drm/bochs: Add support for drm_panic

Add drm_panic module for bochs drm so that panic screen can be displayed
on panic.

Signed-off-by: Ryosuke Yasuoka <ryasuoka@redhat.com>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250613132023.106946-1-ryasuoka@redhat.com
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
6 weeks agoMerge tag 'drm-intel-next-2025-06-18' of https://gitlab.freedesktop.org/drm/i915...
Dave Airlie [Mon, 23 Jun 2025 00:49:25 +0000 (10:49 +1000)] 
Merge tag 'drm-intel-next-2025-06-18' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next

drm/i915 feature pull for v6.17:

Features and functionality:
- Add support for DSC fractional link bpp on DP MST (Imre)
- Add support for simultaneous Panel Replay and Adaptive Sync (Jouni)
- Add support for PTL+ double buffered LUT registers (Chaitanya, Ville)
- Add PIPEDMC event handling in preparation for flip queue (Ville)

Refactoring and cleanups:
- Rename lots of DPLL interfaces to unify them (Suraj)
- Allocate struct intel_display dynamically (Jani)
- Abstract VLV IOSF sideband better (Jani)
- Use str_true_false() helper (Yumeng Fang)
- Refactor DSB code in preparation for flip queue (Ville)
- Use drm_modeset_lock_assert_held() instead of open coding (Luca)
- Remove unused arg from skl_scaler_get_filter_select() (Luca)
- Split out a separate display register header (Jani)
- Abstract DRAM detection better (Jani)
- Convert LPT/WPT SBI sideband to struct intel_display (Jani)

Fixes:
- Fix DSI HS command dispatch with forced pipeline flush (Gareth Yu)
- Fix BMG and LNL+ DP adaptive sync SDP programming (Ankit)
- Fix error path for xe display workqueue allocation (Haoxiang Li)
- Disable DP AUX access probe where not required (Imre)
- Fix DKL PHY access if the port is invalid (Luca)
- Fix PSR2_SU_STATUS access on ADL+ (Jouni)
- Add sanity checks for porch and sync on BXT/GLK DSI (Ville)

DRM core changes:
- Change AUX DPCD access probe address (Imre)
- Refactor EDID quirks, amd make them available to drivers (Imre)
- Add quirk for DPCD access probe (Imre)
- Add DPCD definitions for Panel Replay capabilities (Jouni)

Merges:
- Backmerges to sync with v6.15-rcs and v6.16-rc1 (Jani)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://lore.kernel.org/r/fff9f231850ed410bd81b53de43eff0b98240d31@intel.com
7 weeks agoarm64: dts: mediatek: mt8370: Enable gpu support
Louis-Alexis Eyraud [Fri, 9 May 2025 10:12:51 +0000 (12:12 +0200)] 
arm64: dts: mediatek: mt8370: Enable gpu support

Add a new gpu node in mt8370.dtsi to enable support for the
ARM Mali G57 MC2 GPU (Valhall-JM) found on the MT8370 SoC, using the
Panfrost driver.

On a Mediatek Genio 510 EVK board, the panfrost driver probed with the
following message:
```
panfrost 13000000.gpu: clock rate = 390000000
panfrost 13000000.gpu: mali-g57 id 0x9093 major 0x0 minor 0x0 status 0x0
panfrost 13000000.gpu: features: 00000000,000019f7, issues: 00000003,
   80000400
panfrost 13000000.gpu: Features: L2:0x08130206 Shader:0x00000000
   Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
panfrost 13000000.gpu: shader_present=0x5 l2_present=0x1
[drm] Initialized panfrost 1.3.0 for 13000000.gpu on minor 0
```

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250509-mt8370-enable-gpu-v6-5-2833888cb1d3@collabora.com
7 weeks agodrm/panfrost: Add support for Mali on the MT8370 SoC
Louis-Alexis Eyraud [Fri, 9 May 2025 10:12:50 +0000 (12:12 +0200)] 
drm/panfrost: Add support for Mali on the MT8370 SoC

Add a compatible for the MediaTek MT8370 SoC, with an integrated ARM
Mali G57 MC2 GPU (Valhall-JM, dual core), with new platform data for
its support in the panfrost driver.
It uses the same data as MT8186 for the power management features to
describe power supplies, pm_domains and enablement (one regulator, two
power domains) but also sets the FORCE_AARCH64_PGTABLE flag in the GPU
configuration quirks bitfield to enable AARCH64 4K page table format
mode.
As MT8186 and MT8370 SoC have different GPU architecture (Mali G52 2EE
MC2 for MT8186), making them not compatible, and this mode is only
enabled for Mediatek SoC that are Mali G57 based (compatible with
mediatek,mali-mt8188 or mediatek,mali-8192), having specific platform
data allows to set this flag for MT8370 without modifying MT8186
configuration and behaviour.

Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250509-mt8370-enable-gpu-v6-4-2833888cb1d3@collabora.com
7 weeks agodrm/panfrost: Commonize Mediatek power domain array definitions
Louis-Alexis Eyraud [Fri, 9 May 2025 10:12:49 +0000 (12:12 +0200)] 
drm/panfrost: Commonize Mediatek power domain array definitions

In the panfrost driver, the platform data of several Mediatek SoC
declares and uses several different power domains arrays according to
GPU core number present in the SoC:
- mediatek_mt8186_pm_domains (2 cores)
- mediatek_mt8183_pm_domains (3 cores)
- mediatek_mt8192_pm_domains (5 cores)

As they all are fixed arrays, starting with the same entries and the
platform data also has a power domains array length field
(num_pm_domains), they can be replaced by a single array, containing
all entries, if the num_pm_domains field of the platform data is also
set to the matching core number.

So, create a generic power domain array (mediatek_pm_domains) and use
it in the mt8183(b), mt8186, mt8188 and mt8192 platform data instead.

Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250509-mt8370-enable-gpu-v6-3-2833888cb1d3@collabora.com
7 weeks agodrm/panfrost: Drop duplicated Mediatek supplies arrays
Louis-Alexis Eyraud [Fri, 9 May 2025 10:12:48 +0000 (12:12 +0200)] 
drm/panfrost: Drop duplicated Mediatek supplies arrays

In the panfrost driver, the platform data of several Mediatek SoC
declares and uses custom supplies array definitions
(mediatek_mt8192_supplies, mediatek_mt8183_b_supplies), that are the
same as default_supplies (used by default platform data).

So drop these duplicated definitions and use default_supplies instead.
Also, rename mediatek_mt8183_supplies to a more generic name too
(legacy_supplies).

Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250509-mt8370-enable-gpu-v6-2-2833888cb1d3@collabora.com
7 weeks agodt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
Louis-Alexis Eyraud [Fri, 9 May 2025 10:12:47 +0000 (12:12 +0200)] 
dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC

Add a compatible for the MediaTek MT8370 SoC, with an
integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core).
None of the already existing SoC specific compatibles is usable as
fallback, as those either do not match the number of cores (and number
of power domains), or are for a different GPU architecture.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250509-mt8370-enable-gpu-v6-1-2833888cb1d3@collabora.com
7 weeks agoMerge tag 'drm-misc-next-2025-06-19' of https://gitlab.freedesktop.org/drm/misc/kerne...
Dave Airlie [Fri, 20 Jun 2025 01:33:41 +0000 (11:33 +1000)] 
Merge tag 'drm-misc-next-2025-06-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next

drm-misc-next for 6.17:

UAPI Changes:
- Add Task Information for the wedge API

Cross-subsystem Changes:

Core Changes:
- Fix warnings related to export.h
- fbdev: Make CONFIG_FIRMWARE_EDID available on all architectures
- fence: Fix UAF issues
- format-helper: Improve tests

Driver Changes:
- ivpu: Add turbo flag, Add Wildcat Lake Support
- rz-du: Improve MIPI-DSI Support
- vmwgfx: fence improvement

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <mripard@redhat.com>
Link: https://lore.kernel.org/r/20250619-perfect-industrious-whippet-8ed3db@houat
7 weeks agoMerge tag 'drm-xe-next-2025-06-18' of https://gitlab.freedesktop.org/drm/xe/kernel...
Dave Airlie [Thu, 19 Jun 2025 23:07:49 +0000 (09:07 +1000)] 
Merge tag 'drm-xe-next-2025-06-18' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next

UAPI Changes:
- Expose media OA units (Ashutosh)

Merge:
 - Restore GuC submit UAF fix around queue destruction
   accidentally removed in a drm-xe-fixes merge (Auld)

Core Changes:
- drm/gpusvm: Introduce devmem_only flag for allocation (Himal)
- drm/gpusvm: Add timeslicing support to GPU SVM (Brost)

Driver Changes:
 - Make gem shrinker drm managed (Thomas)
 - SRIOV VF Post-migration recovery of GGTT nodes and CTB (Tomasz)
 - Some W/A additions and updates (Aradhya, Shekhar, Vinay, Daniele)
 - Prefetch Support for svm ranges (Himal, Brost)
 - Don't allocate managed BO for each policy change (Michal)
 - Simplify and fix diff calculation in GuC submit (Lucas)
 - Track FAST_REQ GuC H2Gs to report where errors came from (John)
 - SRIOV PF: Don't allow LMEM provisioning if LMTT isn't available (Piotr)
 - Check if all domains awake for MOCS dump (Tejas)
 - Make creation of SLPC debugfs files conditional (Aradhya)
 - Default auto_link_downgrade status to false (Aradhya)
 - Use xe_mmio_read32() to read mtcfg register (Shuicheng)
 - Updates in PCI ID tables (Atwood, Shekhar)
 - SRIOV VF:  Fail migration recovery if fixups needed but not supported (Tomasz)
 - Add missing documentation around freq and RPa (Rodrigo)
 - Some other SVM related fixes (Himal, Auld, Brost, Maarten)
 - Allow to trigger GT resets using debugfs writes (Michal)
 - Optimise CCS case for WB pages (Auld)
 - Create LRC BO without VM (Niranjana)
 - Initialize MOCS index early (Bala)
 - HWMON fixes for BMG (Karthik, Lucas)
 - Drop redundant conversion to bool (Raag)
 - Rework eviction rejection of bound external bos (Thomas)
 - Stop re-submitting signalled jobs (Auld)
 - Small fixes and cleanups for PXP (Daniele)
 - Convert some print messages to GT-oriented ones (Michal)
 - Resend potentially lost GuC H2G MMIO request (Michal)
 - Add configfs to load with fewer engines (Lucas)
 - Remove unmatched xe_vm_unlock from __xe_exec_queue_init (Maciej)
 - SRIOV VF: Small updates around GGTT handling (Michal)
 - Make VMA tile_present, tile_invalidated access rules clear (Brost)
 - Xe3 Tuning: Disable NULL query for Anyhit Shader (Nitin)
 - Fixes for VF GuC version (Daniele)
 - Don't store the xe device pointer inside xe_ttm_tt (Dave)
 - Small improvements in topology code (Michal)
 - Stop relying on GGTT internals (Maarten)
 - GSM size should be constant on most platforms (Roper)
 - Reorder 'Get pages failed' message (Brost)
 - WA BB related fixes and improvements (Lucas, Brost)
 - Fix early wedge on GuC load failure (Daniele)
 - Add helper function to inject fault into ct_dead_capture (Satyanarayana)
 - Determine ATS / PTA programming during early sw init (Roper)
 - Consolidate PAT programming logic for pre-Xe2 and post-Xe2 (Roper)
 - Fix kconfig prompt (Lucas)
 - Convert xe_pci tests to parametrized tests (Michal)
 - Do not kill VM in PT code on -ENODATA (Brost)
 - Move LRC_ENGINE_ID_PPHWSP_OFFSET outside of parallel offset (Brost)
 - Enable media OA (Ashutosh)
 - GuC log level tuning (Lucas)
 - Add xe_vm_has_valid_gpu_mapping helper (Brost)
 - Opportunistically skip TLB invalidaion on unbind (Brost)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/aFMb_NVF_oCW7UVl@intel.com
7 weeks agodrm/bridge: tc358767: convert to devm_drm_bridge_alloc() API
Luca Ceresoli [Wed, 28 May 2025 09:29:36 +0000 (11:29 +0200)] 
drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Converting this driver is a bit complex because the drm_bridge funcs
pointer differs based on the bridge mode. So the current code does:

 * tc_probe()
   * devm_kzalloc() private struct embedding drm_bridge
   * call tc_probe_bridge_endpoint() which
     * parses DT description into struct fields
     * computes the mode
     * calls different bridge init functions based on the mode
       * each sets a different bridge.funcs pointer

The new API expects the funcs pointer to be known at alloc time, which does
not fit in the current code structure.

Solve this by splitting tc_probe_bridge_endpoint() in two functions:

 * tc_probe_get_mode(), computing the mode without needing the private
   driver structure
 * tc_probe_bridge_endpoint(), only initializing the endpoints

So now the mode is known before allocation and so
is the funcs pointer, while all other operations are still happening after
allocation, directly into the private struct data, as they used to.

The new code flow is:

 * tc_probe()
   * tc_probe_get_mode()
     * parses DT description
     * computes and returns the mode
   * based onf the mode, pick the funcs pointer
   * devm_drm_bridfge_alloc(..., funcs)
   * call tc_probe_bridge_endpoint() which
     * calls different bridge init functions based on the mode
       * these don't set the funcs pointer, it was done by _alloc

This solution is chosen to minimize the changes in the driver logical code
flow. The drawback is we now iterate twice over the endpoints during probe.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250528-drm-bridge-convert-to-alloc-api-v4-1-f04e698c9a77@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
7 weeks agodrm/xe/hwmon: Fix xe_hwmon_power_max_write
Karthik Poosa [Tue, 17 Jun 2025 12:00:30 +0000 (17:30 +0530)] 
drm/xe/hwmon: Fix xe_hwmon_power_max_write

Prevent other bits of mailbox power limit from being overwritten with 0.
This issue was due to a missing read and modify of current power limit,
before setting a requested mailbox power limit, which is added in this
patch.

v2:
 - Improve commit message. (Anshuman)

v3:
 - Rebase.
 - Rephrase commit message. (Riana)
 - Add read-modify-write variant of xe_hwmon_pcode_write_power_limit()
   i.e. xe_hwmon_pcode_rmw_power_limit(). (Badal)
 - Use xe_hwmon_pcode_rmw_power_limit() to set mailbox power limits.
 - Remove xe_hwmon_pcode_write_power_limit() as all mailbox power limits
   writes use xe_hwmon_pcode_rmw_power_limit() only.

v4:
 - Use PWR_LIM in place of (PWR_LIM_EN | PWR_LIM_VAL) wherever
   applicable. (Riana)

Fixes: 7596d839f6228 ("drm/xe/hwmon: Add support to manage power limits though mailbox")
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
Link: https://lore.kernel.org/r/20250617120030.612819-1-karthik.poosa@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
7 weeks agodrm/format-helper: Move drm_fb_build_fourcc_list() to sysfb helpers
Thomas Zimmermann [Mon, 16 Jun 2025 08:37:06 +0000 (10:37 +0200)] 
drm/format-helper: Move drm_fb_build_fourcc_list() to sysfb helpers

Only sysfb drivers use drm_fb_build_fourcc_list(). Move the function
to sysfb helpers and rename it accordingly. Update drivers and tests.

v3:
- update naming in tests
v2:
- select DRM_SYSFB_HELPER (kernel test robot)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250616083846.221396-4-tzimmermann@suse.de
7 weeks agodrm/tests: Test drm_fb_build_fourcc_list() in separate test suite
Thomas Zimmermann [Mon, 16 Jun 2025 08:37:05 +0000 (10:37 +0200)] 
drm/tests: Test drm_fb_build_fourcc_list() in separate test suite

Only sysfb drivers use drm_fb_build_fourcc_list(). The helper will
be moved from format helpers to sysfb helpers. Moving the related
tests to their own test suite.

v3:
- rename tests according to filename (José)
v2:
- rename filename to match tested code (Maxime)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250616083846.221396-3-tzimmermann@suse.de
7 weeks agodrm/tests: Do not use drm_fb_blit() in format-helper tests
Thomas Zimmermann [Mon, 16 Jun 2025 08:37:04 +0000 (10:37 +0200)] 
drm/tests: Do not use drm_fb_blit() in format-helper tests

Export additional helpers from the format-helper library and open-code
drm_fb_blit() in tests. Prepares for the removal of drm_fb_blit(). Only
sysfb drivers use drm_fb_blit(). The function will soon be removed from
format helpers and be refactored within sysfb helpers.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20250616083846.221396-2-tzimmermann@suse.de
7 weeks agodrm/vmwgfx: Fix Host-Backed userspace on Guest-Backed kernel
Ian Forbes [Tue, 29 Apr 2025 20:34:27 +0000 (15:34 -0500)] 
drm/vmwgfx: Fix Host-Backed userspace on Guest-Backed kernel

Running 3D applications with SVGA_FORCE_HOST_BACKED=1 or using an
ancient version of mesa was broken because the buffer was pinned in
VMW_BO_DOMAIN_SYS and could not be moved to VMW_BO_DOMAIN_MOB during
validation.

The compat_shader buffer should not pinned.

Fixes: 668b206601c5 ("drm/vmwgfx: Stop using raw ttm_buffer_object's")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Reviewed-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/r/20250429203427.1742331-1-ian.forbes@broadcom.com
7 weeks agodrm/vmwgfx: Implement dma_fence_ops properly
Ian Forbes [Fri, 30 May 2025 18:35:09 +0000 (13:35 -0500)] 
drm/vmwgfx: Implement dma_fence_ops properly

vmwgfx's fencing predates dma_fence and as a result dma_fence_ops was never
properly implemented, especially with respect to enabling signaling.

Because of this dma_fence callbacks don't work properly. This change
implements enable_signaling properly so that dma_fence callbacks now
work as expected.

It also removes vmwgfx's custom implementation of fence callbacks
and removes vmwgfx's custom dma_fence_ops::wait function which is no
longer necessary now that enable_signaling works.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/r/20250530183510.733175-2-ian.forbes@broadcom.com
7 weeks agodrm/vmwgfx: Update last_read_seqno under the fence lock
Ian Forbes [Fri, 30 May 2025 18:35:08 +0000 (13:35 -0500)] 
drm/vmwgfx: Update last_read_seqno under the fence lock

There was a possible race in vmw_update_seqno. Because of this race it
was possible for last_read_seqno to go backwards. Remove this function
and replace it with vmw_update_fences which now sets and returns the
last_read_seqno while holding the fence lock. This serialization via the
fence lock ensures that last_read_seqno is monotonic again.

Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/r/20250530183510.733175-1-ian.forbes@broadcom.com
7 weeks agodrm/xe: Opportunistically skip TLB invalidaion on unbind
Matthew Brost [Mon, 16 Jun 2025 06:30:24 +0000 (23:30 -0700)] 
drm/xe: Opportunistically skip TLB invalidaion on unbind

If a range or VMA is invalidated and scratch page is disabled, there
is no reason to issue a TLB invalidation on unbind, skip TLB
innvalidation is this condition is true. This is an opportunistic check
as it is done without the notifier lock, thus it possible for the range
to be invalidated after this check is performed.

This should improve performance of the SVM garbage collector, for
example, xe_exec_system_allocator --r many-stride-new-prefetch, went
~20s to ~9.5s on a BMG.

v2:
 - Use helper for valid check (Thomas)
v3:
 - Avoid skipping TLB invalidation if PTEs are removed at a higher
   level than the range
 - Never skip TLB invalidations for VMA
 - Drop Himal's RB

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://lore.kernel.org/r/20250616063024.2059829-3-matthew.brost@intel.com
7 weeks agodrm/xe: Add xe_vm_has_valid_gpu_mapping helper
Matthew Brost [Mon, 16 Jun 2025 06:30:23 +0000 (23:30 -0700)] 
drm/xe: Add xe_vm_has_valid_gpu_mapping helper

Rather than having multiple READ_ONCE of the tile_* fields and comments
in code, use helper with kernel doc for single access point and clear
rules.

v3:
 - s/xe_vm_has_valid_gpu_pages/xe_vm_has_valid_gpu_mapping

Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://lore.kernel.org/r/20250616063024.2059829-2-matthew.brost@intel.com
7 weeks agoMerge tag 'drm-misc-next-2025-06-12' of https://gitlab.freedesktop.org/drm/misc/kerne...
Dave Airlie [Tue, 17 Jun 2025 22:09:27 +0000 (08:09 +1000)] 
Merge tag 'drm-misc-next-2025-06-12' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next

drm-misc-next for 6.17:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:
 - atomic-helpers: Tune the enable / disable sequence
 - bridge: Add destroy hook
 - color management: Add helpers for hardware gamma LUT handling
 - HDMI: Add CEC handling, YUV420 output support
 - sched: tracing improvements

Driver Changes:
 - hyperv: Move out of simple-kms, drm_panic support
 - i915: drm_panel_follower support
 - imx: Add IMX8qxq Display Controller Support
 - lima: Add Rockchip RK3528 GPU Support
 - nouveau: fence handling cleanup
 - panfrost: Add BO labeling, 64-bit registers access
 - qaic: Add RAS Support
 - rz-du: Add RZ/V2H(P) Support, MIPI-DSI DCS Support
 - sun4i: Add H616 Support
 - tidss: Add TI AM62L Support
 - vkms: YUV and R* formats support

 - bridges:
   - Switched to reference counted drm_bridge allocations

 - panels:
   - Switched to reference counted drm_panel allocations
   - Add support for fwnode-based panel lookup
   - himax-hx8394: Support for Huiling hl055fhv028c
   - ilitek-ili9881c: Support for 7" Raspberry Pi 720x1280
   - panel-edp: Support for KDC KD116N3730A05, N160JCE-ELL CMN,
   - panel-simple: Support for AUO P238HAN01
   - st7701: Support for Winstar wf40eswaa6mnn0
   - visionox-rm69299: Support for rm69299-shift
   - New panels: Renesas R61307, Renesas R69328

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <mripard@redhat.com>
Link: https://lore.kernel.org/r/20250612-coucal-of-impossible-cleaning-a5eecf@houat
7 weeks agodrm/xe: Extend WA 14018094691 to BMG
Daniele Ceraolo Spurio [Fri, 13 Jun 2025 23:11:29 +0000 (16:11 -0700)] 
drm/xe: Extend WA 14018094691 to BMG

This WA is applicable to BMG as well.

Note that this is a GSC WA and we don't load the GSC on BMG, so
extending the WA to BMG won't do anything right now. However, it helps
future-proof the driver so that if we ever turn the GSC on we won't have
to remember to extend this WA.

v2: don't use VERSION_RANGE from 2001 to 2004 (Matt)

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20250613231128.1261815-2-daniele.ceraolospurio@intel.com
7 weeks agodrm/xe: Fix memset on iomem
Lucas De Marchi [Thu, 12 Jun 2025 22:14:12 +0000 (15:14 -0700)] 
drm/xe: Fix memset on iomem

It should rather use xe_map_memset() as the BO is created with
XE_BO_FLAG_VRAM_IF_DGFX in xe_guc_pc_init().

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: stable@vger.kernel.org
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250612-vmap-vaddr-v1-1-26238ed443eb@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
7 weeks agodrm/xe: Annotate default for guc_log_level param
Lucas De Marchi [Fri, 13 Jun 2025 20:00:38 +0000 (13:00 -0700)] 
drm/xe: Annotate default for guc_log_level param

Reword the parameter description so it's clear what's the default and
what are the verbose levels.

Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://lore.kernel.org/r/20250613-guc-log-level-v2-2-cb84a63e49fe@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
7 weeks agodrm/xe/guc: Default log level to non-verbose
Lucas De Marchi [Fri, 13 Jun 2025 20:00:37 +0000 (13:00 -0700)] 
drm/xe/guc: Default log level to non-verbose

Currently xe sets the guc log level to a verbose level since it's useful
to debug hangs and general development. However the verbose level may
already be too much and affect performance.

Michal Mrozek did some tests with the L0 compute stack for submission
latency with ULLS disabled. Below are the normalized numbers with log
level 3 (the current default) as baseline for each test:

                          Test \ Log Level                        3      0      1      2
 ----------------------------------------------------------- ------ ------ ------ ------
  BestWalkerNthCommandListSubmission(CmdListCount=2)           1.00   0.63   0.63   0.96
  BestWalkerNthSubmission(KernelCount=2)                       1.00   0.62   0.63   0.96
  BestWalkerNthSubmissionImmediate(KernelCount=2)              1.00   0.58   0.58   0.85
  BestWalkerSubmission                                         1.00   0.62   0.62   0.96
  BestWalkerSubmissionImmediate                                1.00   0.63   0.62   0.96
  BestWalkerSubmissionImmediateMultiCmdlists(cmdlistCount=2)   1.00   0.58   0.58   0.86
  BestWalkerSubmissionImmediateMultiCmdlists(cmdlistCount=4)   1.00   0.70   0.70   0.83
  BestWalkerSubmissionImmediateMultiCmdlists(cmdlistCount=8)   1.00   0.53   0.52   0.78

Log level 2 is the first "verbose level" for GuC, where the biggest
difference happens. Keep log level 3 for CONFIG_DRM_XE_DEBUG, but switch
to 1, i.e.  GUC_LOG_LEVEL_NON_VERBOSE, for "normal" builds.

Cc: Michal Mrozek <michal.mrozek@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://lore.kernel.org/r/20250613-guc-log-level-v2-1-cb84a63e49fe@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
7 weeks agodrm/xe/oa: Enable OAM latency measurement
Ashutosh Dixit [Fri, 6 Jun 2025 19:26:17 +0000 (12:26 -0700)] 
drm/xe/oa: Enable OAM latency measurement

Enable OAM latency measurement for Xe3+ platforms.

Bspec: 58840

v2: Introduce DRM_XE_OA_UNIT_TYPE_OAM_SAG
v3: Also add LNCF_MISC_CONFIG_REGISTER0 needed by MDAPI

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://lore.kernel.org/r/20250606192618.4133817-6-ashutosh.dixit@intel.com
7 weeks agodrm/xe/oa: Assign hwe for OAM_SAG
Ashutosh Dixit [Fri, 6 Jun 2025 19:26:16 +0000 (12:26 -0700)] 
drm/xe/oa: Assign hwe for OAM_SAG

Because OAM_SAG doesn't have an attached hwe, assign another hwe belonging
to the same gt (and different OAM unit) to OAM_SAG. A hwe is needed for
batch submissions to program OA HW.

v2: Assign an engine with a valid OA unit for OAM_SAG (Umesh)

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://lore.kernel.org/r/20250606192618.4133817-5-ashutosh.dixit@intel.com
7 weeks agodrm/xe/oa: Introduce stream->oa_unit
Ashutosh Dixit [Fri, 6 Jun 2025 19:26:15 +0000 (12:26 -0700)] 
drm/xe/oa: Introduce stream->oa_unit

Previously, the oa_unit associated with an OA stream was derived from hwe
associated with the stream (stream->hwe->oa_unit). This breaks with OAM_SAG
since OAM_SAG does not have any attached hardware engines. Resolve this by
introducing stream->oa_unit and stop depending on stream->hwe.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://lore.kernel.org/r/20250606192618.4133817-4-ashutosh.dixit@intel.com
7 weeks agodrm/xe/oa: Print hwe to OA unit mapping
Ashutosh Dixit [Fri, 6 Jun 2025 19:26:14 +0000 (12:26 -0700)] 
drm/xe/oa: Print hwe to OA unit mapping

Print hwe to OA unit mapping to dmesg, to help debug for current and new
platforms.

v2: Separate out xe_oa_print_gt_oa_units() (Umesh)

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://lore.kernel.org/r/20250606192618.4133817-3-ashutosh.dixit@intel.com
7 weeks agodrm/xe/oa/uapi: Expose media OA units
Ashutosh Dixit [Fri, 6 Jun 2025 19:26:13 +0000 (12:26 -0700)] 
drm/xe/oa/uapi: Expose media OA units

On Xe2+ platforms, media engines are attached to "SCMI" OA media (OAM)
units. One or more SCMI OAM units might be present on a platform. In
addition there is another OAM unit for global events, called
OAM-SAG. Performance metrics for media workloads can be obtained from these
OAM units, similar to OAG.

Expose these OAM units for userspace to use. OAM-SAG is exposed as an OA
unit without any attached engines.

Bspec: 70819, 67103, 63844, 72572, 74476, 61284

v2: Fix xe_gt_WARN_ON in __hwe_oam_unit for < 12.7 platforms
v3: Return XE_OA_UNIT_INVALID for < 12.7 to indicate no OAM units
v4: Move xe_oa_print_oa_units() to separate patch
v5: Introduce DRM_XE_OA_UNIT_TYPE_OAM_SAG
v6: Introduce DRM_XE_OA_CAPS_OAM

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://lore.kernel.org/r/20250606192618.4133817-2-ashutosh.dixit@intel.com
7 weeks agodrm/i915/dsb: Disable the GOSUB interrupt
Ville Syrjälä [Thu, 12 Jun 2025 14:50:18 +0000 (17:50 +0300)] 
drm/i915/dsb: Disable the GOSUB interrupt

Current DSB hardware is apparently a bit borked and likes to signal
spurious GOSUB errors. We already have most for the workarounds for
this in place, but the last part is simply not enabling the corresponding
interrupt.

While at it polish up the w/a comments with the w/a number,
and consistently take the short blurp from the w/a page.

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/20250612145018.8735-7-ville.syrjala@linux.intel.com
7 weeks agodrm/i915/dsb: Move the DSB_PMCTRL* reset out of intel_dsb_finish()
Ville Syrjälä [Thu, 12 Jun 2025 14:50:17 +0000 (17:50 +0300)] 
drm/i915/dsb: Move the DSB_PMCTRL* reset out of intel_dsb_finish()

When using the flip queue, due to the DMC vs. DSB register corruption
problem, we must not issue any register writes from the DSB after
unhalting the DMC. Currently we are doing just that by trying to
restore DSB_PMCTRL* back to a sane state from intel_dsb_finish().

Since the only place left that pokes at DSB_PMCTRL* is intel_dsb_chain()
we can just do DSB_PMCTRL_2/DSB_FORCE_DEWAKE reset in the same place.

The DSB_PMCTRL reset is trickier since we'd have to do it from the
chained DSB itself. But based on my earlier testing
DSB_PMCTRL/DSB_ENABLE_DEWAKE doesn't actually do anything if the DSB
isn't actually enabled, so we can omit the reset to keep things a bit
simpler. We do need to reset DSB_PMCTRL/DSB_ENABLE_DEWAKE before
tarting the DSB however, in case it was left enabled from a previous
use.

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/20250612145018.8735-6-ville.syrjala@linux.intel.com
7 weeks agodrm/i915/dsb: Garbage collect the MMIO DEwake stuff
Ville Syrjälä [Thu, 12 Jun 2025 14:50:16 +0000 (17:50 +0300)] 
drm/i915/dsb: Garbage collect the MMIO DEwake stuff

Since the introduction of DSB chaining we no longer need the
DEwake tricks in intel_dsb_commit().

I also need to relocate the DSB_PMCTRL* writes out of
intel_dsb_finish() (due to the flip queue DMC vs. DSB register
corruption issues), and it'll be a bit more straightforward if
I don't have to worry about the non-chained DSB path anymore.

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/20250612145018.8735-5-ville.syrjala@linux.intel.com
7 weeks agodrm/i915/dsb: Introduce intel_dsb_exec_time_us()
Ville Syrjälä [Thu, 12 Jun 2025 14:50:15 +0000 (17:50 +0300)] 
drm/i915/dsb: Introduce intel_dsb_exec_time_us()

Pull the magic 20 usec DSB execution deadline into
intel_dsb_arm_exec_time_us(), and also add its counterpart
for the non-arming register write section. For the non-arming
part we'll just throw in a random 80 usec for now so the total
is 100usec. The total exec time will be needed by the upcoming
flip queue code.

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/20250612145018.8735-4-ville.syrjala@linux.intel.com
7 weeks agodrm/i915/dsb: Provide intel_dsb_head() and intel_dsb_size()
Ville Syrjälä [Thu, 12 Jun 2025 14:50:14 +0000 (17:50 +0300)] 
drm/i915/dsb: Provide intel_dsb_head() and intel_dsb_size()

The upcoming flip queue implementation will need to know the
DSB buffer head and size. Expose those outside intel_dsb.c.

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/20250612145018.8735-3-ville.syrjala@linux.intel.com
7 weeks agodrm/i915/dsb: Use intel_dsb_ins_align() in intel_dsb_align_tail()
Ville Syrjälä [Thu, 12 Jun 2025 14:50:13 +0000 (17:50 +0300)] 
drm/i915/dsb: Use intel_dsb_ins_align() in intel_dsb_align_tail()

If the free_post is not QW aligned we don't have to memset the
extra DW needed to make it so, as the only way that can happen
is via intel_dsb_reg_write_indexed() which already makes sure
the next DW is zeroed.

Not a big deal, but this is more consistent how all the other
stuff operates that puts instructions into the DSB buffer, and
we'll get a few more of those soon.

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/20250612145018.8735-2-ville.syrjala@linux.intel.com
7 weeks agodrm/xe: Move LRC_ENGINE_ID_PPHWSP_OFFSET outside of parallel offset
Matthew Brost [Thu, 12 Jun 2025 17:28:50 +0000 (10:28 -0700)] 
drm/xe: Move LRC_ENGINE_ID_PPHWSP_OFFSET outside of parallel offset

The parallel scratch layout spans 2k and LRC_ENGINE_ID_PPHWSP_OFFSET
lands within than space. This happens to be ok as the offset lands in
reserved part of guc_sched_wq_desc, but for future safety move
LRC_ENGINE_ID_PPHWSP_OFFSET to the unused offset of 1024 below parallel
scratch layout.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://lore.kernel.org/r/20250612172850.4170428-1-matthew.brost@intel.com
7 weeks agodrm/xe: Do not kill VM in PT code on -ENODATA
Matthew Brost [Fri, 13 Jun 2025 23:18:08 +0000 (16:18 -0700)] 
drm/xe: Do not kill VM in PT code on -ENODATA

No need kill on -ENODATA as is this non-fatal error can occur when MMU
notifiers race with prefetches.

Fixes: 09ba0a8f06cd ("drm/xe/svm: Implement prefetch support for SVM ranges")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>>
Link: https://lore.kernel.org/r/20250613231808.752616-1-matthew.brost@intel.com
7 weeks agodrm/amdgpu: Make use of drm_wedge_task_info
André Almeida [Tue, 17 Jun 2025 12:49:49 +0000 (09:49 -0300)] 
drm/amdgpu: Make use of drm_wedge_task_info

To notify userspace about which task (if any) made the device get in a
wedge state, make use of drm_wedge_task_info parameter, filling it with
the task PID and name.

Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250617124949.2151549-7-andrealmeid@igalia.com
Signed-off-by: André Almeida <andrealmeid@igalia.com>
7 weeks agodrm: amdgpu: Use struct drm_wedge_task_info inside of struct amdgpu_task_info
André Almeida [Tue, 17 Jun 2025 12:49:48 +0000 (09:49 -0300)] 
drm: amdgpu: Use struct drm_wedge_task_info inside of struct amdgpu_task_info

To avoid a cast when calling drm_dev_wedged_event(), replace pid and
task name inside of struct amdgpu_task_info with struct
drm_wedge_task_info.

Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250617124949.2151549-6-andrealmeid@igalia.com
Signed-off-by: André Almeida <andrealmeid@igalia.com>
7 weeks agodrm/doc: Add a section about "Task information" for the wedge API
André Almeida [Tue, 17 Jun 2025 12:49:47 +0000 (09:49 -0300)] 
drm/doc: Add a section about "Task information" for the wedge API

Add a section about "Task information" for the wedge API.

Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250617124949.2151549-5-andrealmeid@igalia.com
Signed-off-by: André Almeida <andrealmeid@igalia.com>
7 weeks agodrm: Create a task info option for wedge events
André Almeida [Tue, 17 Jun 2025 12:49:46 +0000 (09:49 -0300)] 
drm: Create a task info option for wedge events

When a device get wedged, it might be caused by a guilty application.
For userspace, knowing which task was involved can be useful for some
situations, like for implementing a policy, logs or for giving a chance
for the compositor to let the user know what task was involved in the
problem.  This is an optional argument, when the task info is not
available, the PID and TASK string won't appear in the event string.

Sometimes just the PID isn't enough giving that the task might be already
dead by the time userspace will try to check what was this PID's name,
so to make the life easier also notify what's the task's name in the user
event.

Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250617124949.2151549-4-andrealmeid@igalia.com
Signed-off-by: André Almeida <andrealmeid@igalia.com>
7 weeks agodrm: amdgpu: Create amdgpu_vm_print_task_info()
André Almeida [Tue, 17 Jun 2025 12:49:45 +0000 (09:49 -0300)] 
drm: amdgpu: Create amdgpu_vm_print_task_info()

To avoid repetitive code in amdgpu, create a function that prints the
content of struct amdgpu_task_info.

Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250617124949.2151549-3-andrealmeid@igalia.com
Signed-off-by: André Almeida <andrealmeid@igalia.com>
7 weeks agodrm: amdgpu: Allow NULL pointers at amdgpu_vm_put_task_info()
André Almeida [Tue, 17 Jun 2025 12:49:44 +0000 (09:49 -0300)] 
drm: amdgpu: Allow NULL pointers at amdgpu_vm_put_task_info()

Allow NULL pointers at amdgpu_vm_put_task_info() as it common practice
for "put" or "free" functions. This avoid an extra check for NULL for
callers.

Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250617124949.2151549-2-andrealmeid@igalia.com
Signed-off-by: André Almeida <andrealmeid@igalia.com>
7 weeks agoaccel/amdxdna: Revise device bo creation and free
Lizhi Hou [Mon, 16 Jun 2025 09:14:16 +0000 (02:14 -0700)] 
accel/amdxdna: Revise device bo creation and free

The device bo is allocated from the device heap memory. (a trunk of
memory dedicated to device)

Rename amdxdna_gem_insert_node_locked to amdxdna_gem_heap_alloc
and move related sanity checks into it.

Add amdxdna_gem_dev_obj_free and move device bo free code into it.

Calculate the kernel virtual address of device bo by the device
heap memory address and offset.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250616091418.2605476-1-lizhi.hou@amd.com
7 weeks agodrm/bridge: ti-sn65dsi86: use new GPIO line value setter callbacks
Bartosz Golaszewski [Tue, 10 Jun 2025 12:34:46 +0000 (14:34 +0200)] 
drm/bridge: ti-sn65dsi86: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250610-gpiochip-set-rv-gpu-v1-1-ac0a21e74b71@linaro.org
7 weeks agodrm/bridge: ti-sn65dsi86: use the auxiliary device
Jerome Brunet [Tue, 18 Feb 2025 19:29:48 +0000 (20:29 +0100)] 
drm/bridge: ti-sn65dsi86: use the auxiliary device

The auxiliary device creation of this driver is simple enough to
use the available auxiliary device creation helper.

Use it and remove some boilerplate code.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250218-aux-device-create-helper-v4-3-c3d7dfdea2e6@baylibre.com
7 weeks agodrm/xe/tests: Convert xe_pci tests to parametrized tests
Michal Wajdeczko [Sat, 14 Jun 2025 18:24:46 +0000 (20:24 +0200)] 
drm/xe/tests: Convert xe_pci tests to parametrized tests

Instead of looping over known IP descriptors within single test
case, without any diagnostics which IP descriptor is eventually
broken, define kunit parameter generators with IP descriptors,
and make existing xe_pci tests fully parametrized:

 [ ] =================== xe_pci (2 subtests) ====================
 [ ] ==================== check_graphics_ip  ====================
 [ ] [PASSED] 12.70 Xe_LPG
 [ ] [PASSED] 12.71 Xe_LPG
 [ ] [PASSED] 12.74 Xe_LPG+
 [ ] [PASSED] 20.01 Xe2_HPG
 [ ] [PASSED] 20.04 Xe2_LPG
 [ ] [PASSED] 30.00 Xe3_LPG
 [ ] [PASSED] 30.01 Xe3_LPG
 [ ] ================ [PASSED] check_graphics_ip ================
 [ ] ===================== check_media_ip  ======================
 [ ] [PASSED] 13.00 Xe_LPM+
 [ ] [PASSED] 13.01 Xe2_HPM
 [ ] [PASSED] 20.00 Xe2_LPM
 [ ] [PASSED] 30.00 Xe3_LPM
 [ ] ================= [PASSED] check_media_ip ==================
 [ ] ===================== [PASSED] xe_pci ======================

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20250614182446.2024-1-michal.wajdeczko@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
7 weeks agodrm/xe/tests: Drop unused xe_device_fn typedef
Michal Wajdeczko [Fri, 13 Jun 2025 19:19:37 +0000 (21:19 +0200)] 
drm/xe/tests: Drop unused xe_device_fn typedef

We missed to drop it in commit 50680d1698f4 ("drm/xe/tests: remove
unused leftover xe_call_for_each_device()") so drop it now.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20250613191938.1980-2-michal.wajdeczko@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
7 weeks agodrm/xe: Fix kconfig prompt
Lucas De Marchi [Wed, 11 Jun 2025 19:38:37 +0000 (12:38 -0700)] 
drm/xe: Fix kconfig prompt

The xe driver is the official driver for Intel Xe2 and later, while
maintaining experimental support for earlier GPUs. Reword the help
message accordingly.

Reviewed-by: Maarten Lankhorst <dev@lankhorst.se>
Link: https://lore.kernel.org/r/20250611-xe-kconfig-help-v1-1-8bcc6b47d11a@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>