Skip to content

Commit 69d09a2

Browse files
committed
Merge tag 'drm-intel-next-2025-07-04' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next
drm/i915 feature pull #2 for v6.17: Features and functionality: - Add drm_panic support for both i915 and xe drivers (Jocelyn Falempe) - Add initial flip queue implementation, disabled by default, for LNL and PTL (Ville) - Add support for Wildcat Lake (WCL) display, version 30.02 (Matt Roper, Matt Atwood, Dnyaneshwar) - Extend drm_panel and follower support to DDI eDP (Arun) Refactoring and cleanups: - Make all global state objects opaque (Jani) - Move display works to display specific unordered workqueue (Luca) - Add and use struct drm_device based pcode interface (Jani, Lucas) - Use clamp() instead of max()+min() combo (Ankit) - Simplify wait for power well disable (Jani) - Various stylistics cleanups and renames (Jani) Fixes: - Deal with loss of pipe DMC state (Ville) - Fix PTL HDCP2 stream status check (Suraj) - Add workaround for ADL-P DKL PHY DP and HDMI (Nemesa) - Fix skl_print_wm_changes() stack usage with KMSAN (Arnd Bergmann) - Fix PCON capability reads on non-branch devices (Chaitanya) - Fix which platforms have ultra joiner (Ankit) DRM core changes: - Add ttm_bo_kmap_try_from_panic() for xe drm_panic support (Jocelyn Falempe) - Add private pointer to struct drm_scanout buffer for xe/i915 drm_panic support (Jocelyn Falempe) Merges: - Backmerge drm-next for drm_panel and xe changes (Jani) Signed-off-by: Simona Vetter <[email protected]> From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 17d081e + d6a59ee commit 69d09a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2637
-903
lines changed

Documentation/gpu/i915.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ panel self refresh.
112112
Atomic Plane Helpers
113113
--------------------
114114

115-
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_atomic_plane.c
115+
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_plane.c
116116
:doc: atomic plane helpers
117117

118-
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_atomic_plane.c
118+
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_plane.c
119119
:internal:
120120

121121
Asynchronous Page Flip
@@ -204,6 +204,12 @@ DMC Firmware Support
204204
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dmc.c
205205
:internal:
206206

207+
DMC Flip Queue
208+
--------------------
209+
210+
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_flipq.c
211+
:doc: DMC Flip Queue
212+
207213
DMC wakelock support
208214
--------------------
209215

drivers/gpu/drm/i915/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,11 @@ i915-$(CONFIG_HWMON) += \
218218
# modesetting core code
219219
i915-y += \
220220
display/hsw_ips.o \
221-
display/i9xx_plane.o \
222221
display/i9xx_display_sr.o \
222+
display/i9xx_plane.o \
223223
display/i9xx_wm.o \
224224
display/intel_alpm.o \
225225
display/intel_atomic.o \
226-
display/intel_atomic_plane.o \
227226
display/intel_audio.o \
228227
display/intel_bios.o \
229228
display/intel_bo.o \
@@ -265,6 +264,7 @@ i915-y += \
265264
display/intel_fbc.o \
266265
display/intel_fdi.o \
267266
display/intel_fifo_underrun.o \
267+
display/intel_flipq.o \
268268
display/intel_frontbuffer.o \
269269
display/intel_global_state.o \
270270
display/intel_hdcp.o \
@@ -283,6 +283,7 @@ i915-y += \
283283
display/intel_pch.o \
284284
display/intel_pch_display.o \
285285
display/intel_pch_refclk.o \
286+
display/intel_plane.o \
286287
display/intel_plane_initial.o \
287288
display/intel_pmdemand.o \
288289
display/intel_psr.o \

drivers/gpu/drm/i915/display/hsw_ips.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
#include <linux/debugfs.h>
77

8+
#include <drm/drm_print.h>
9+
810
#include "hsw_ips.h"
9-
#include "i915_drv.h"
1011
#include "i915_reg.h"
1112
#include "intel_color_regs.h"
1213
#include "intel_de.h"
@@ -18,8 +19,6 @@
1819
static void hsw_ips_enable(const struct intel_crtc_state *crtc_state)
1920
{
2021
struct intel_display *display = to_intel_display(crtc_state);
21-
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
22-
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
2322
u32 val;
2423

2524
if (!crtc_state->ips_enabled)
@@ -40,8 +39,8 @@ static void hsw_ips_enable(const struct intel_crtc_state *crtc_state)
4039

4140
if (display->platform.broadwell) {
4241
drm_WARN_ON(display->drm,
43-
snb_pcode_write(&i915->uncore, DISPLAY_IPS_CONTROL,
44-
val | IPS_PCODE_CONTROL));
42+
intel_pcode_write(display->drm, DISPLAY_IPS_CONTROL,
43+
val | IPS_PCODE_CONTROL));
4544
/*
4645
* Quoting Art Runyan: "its not safe to expect any particular
4746
* value in IPS_CTL bit 31 after enabling IPS through the
@@ -66,16 +65,14 @@ static void hsw_ips_enable(const struct intel_crtc_state *crtc_state)
6665
bool hsw_ips_disable(const struct intel_crtc_state *crtc_state)
6766
{
6867
struct intel_display *display = to_intel_display(crtc_state);
69-
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
70-
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
7168
bool need_vblank_wait = false;
7269

7370
if (!crtc_state->ips_enabled)
7471
return need_vblank_wait;
7572

7673
if (display->platform.broadwell) {
7774
drm_WARN_ON(display->drm,
78-
snb_pcode_write(&i915->uncore, DISPLAY_IPS_CONTROL, 0));
75+
intel_pcode_write(display->drm, DISPLAY_IPS_CONTROL, 0));
7976
/*
8077
* Wait for PCODE to finish disabling IPS. The BSpec specified
8178
* 42ms timeout value leads to occasional timeouts so use 100ms
@@ -268,7 +265,7 @@ int hsw_ips_compute_config(struct intel_atomic_state *state,
268265
return PTR_ERR(cdclk_state);
269266

270267
/* pixel rate mustn't exceed 95% of cdclk with IPS on BDW */
271-
if (crtc_state->pixel_rate > cdclk_state->logical.cdclk * 95 / 100)
268+
if (crtc_state->pixel_rate > intel_cdclk_logical(cdclk_state) * 95 / 100)
272269
return 0;
273270
}
274271

drivers/gpu/drm/i915/display/i9xx_plane.c

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
#include "i9xx_plane.h"
1616
#include "i9xx_plane_regs.h"
1717
#include "intel_atomic.h"
18-
#include "intel_atomic_plane.h"
18+
#include "intel_bo.h"
1919
#include "intel_de.h"
2020
#include "intel_display_irq.h"
2121
#include "intel_display_regs.h"
2222
#include "intel_display_types.h"
2323
#include "intel_fb.h"
2424
#include "intel_fbc.h"
2525
#include "intel_frontbuffer.h"
26+
#include "intel_plane.h"
2627
#include "intel_sprite.h"
2728

2829
/* Primary plane formats for gen <= 3 */
@@ -336,10 +337,10 @@ i9xx_plane_check(struct intel_crtc_state *crtc_state,
336337
if (ret)
337338
return ret;
338339

339-
ret = intel_atomic_plane_check_clipping(plane_state, crtc_state,
340-
DRM_PLANE_NO_SCALING,
341-
DRM_PLANE_NO_SCALING,
342-
i9xx_plane_has_windowing(plane));
340+
ret = intel_plane_check_clipping(plane_state, crtc_state,
341+
DRM_PLANE_NO_SCALING,
342+
DRM_PLANE_NO_SCALING,
343+
i9xx_plane_has_windowing(plane));
343344
if (ret)
344345
return ret;
345346

@@ -905,6 +906,27 @@ static const struct drm_plane_funcs i8xx_plane_funcs = {
905906
.format_mod_supported_async = intel_plane_format_mod_supported_async,
906907
};
907908

909+
static void i9xx_disable_tiling(struct intel_plane *plane)
910+
{
911+
struct intel_display *display = to_intel_display(plane);
912+
enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
913+
u32 dspcntr;
914+
u32 reg;
915+
916+
dspcntr = intel_de_read_fw(display, DSPCNTR(display, i9xx_plane));
917+
dspcntr &= ~DISP_TILED;
918+
intel_de_write_fw(display, DSPCNTR(display, i9xx_plane), dspcntr);
919+
920+
if (DISPLAY_VER(display) >= 4) {
921+
reg = intel_de_read_fw(display, DSPSURF(display, i9xx_plane));
922+
intel_de_write_fw(display, DSPSURF(display, i9xx_plane), reg);
923+
924+
} else {
925+
reg = intel_de_read_fw(display, DSPADDR(display, i9xx_plane));
926+
intel_de_write_fw(display, DSPADDR(display, i9xx_plane), reg);
927+
}
928+
}
929+
908930
struct intel_plane *
909931
intel_primary_plane_create(struct intel_display *display, enum pipe pipe)
910932
{
@@ -1047,6 +1069,8 @@ intel_primary_plane_create(struct intel_display *display, enum pipe pipe)
10471069
}
10481070
}
10491071

1072+
plane->disable_tiling = i9xx_disable_tiling;
1073+
10501074
modifiers = intel_fb_plane_get_modifiers(display, INTEL_PLANE_CAP_TILING_X);
10511075

10521076
if (DISPLAY_VER(display) >= 5 || display->platform.g4x)
@@ -1151,7 +1175,7 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
11511175

11521176
drm_WARN_ON(display->drm, pipe != crtc->pipe);
11531177

1154-
intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
1178+
intel_fb = intel_bo_alloc_framebuffer();
11551179
if (!intel_fb) {
11561180
drm_dbg_kms(display->drm, "failed to alloc fb\n");
11571181
return;

drivers/gpu/drm/i915/display/intel_atomic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* The functions here implement the state management and hardware programming
2828
* dispatch required by the atomic modeset infrastructure.
29-
* See intel_atomic_plane.c for the plane-specific atomic functionality.
29+
* See intel_plane.c for the plane-specific atomic functionality.
3030
*/
3131

3232
#include <drm/display/drm_dp_tunnel.h>

drivers/gpu/drm/i915/display/intel_audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ static int glk_force_audio_cdclk_commit(struct intel_atomic_state *state,
951951
if (IS_ERR(cdclk_state))
952952
return PTR_ERR(cdclk_state);
953953

954-
cdclk_state->force_min_cdclk = enable ? 2 * 96000 : 0;
954+
intel_cdclk_force_min_cdclk(cdclk_state, enable ? 2 * 96000 : 0);
955955

956956
return drm_atomic_commit(&state->base);
957957
}

drivers/gpu/drm/i915/display/intel_bo.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: MIT
22
/* Copyright © 2024 Intel Corporation */
33

4+
#include <drm/drm_panic.h>
5+
#include "display/intel_display_types.h"
46
#include "gem/i915_gem_mman.h"
57
#include "gem/i915_gem_object.h"
68
#include "gem/i915_gem_object_frontbuffer.h"
@@ -57,3 +59,18 @@ void intel_bo_describe(struct seq_file *m, struct drm_gem_object *obj)
5759
{
5860
i915_debugfs_describe_obj(m, to_intel_bo(obj));
5961
}
62+
63+
struct intel_framebuffer *intel_bo_alloc_framebuffer(void)
64+
{
65+
return i915_gem_object_alloc_framebuffer();
66+
}
67+
68+
int intel_bo_panic_setup(struct drm_scanout_buffer *sb)
69+
{
70+
return i915_gem_object_panic_setup(sb);
71+
}
72+
73+
void intel_bo_panic_finish(struct intel_framebuffer *fb)
74+
{
75+
return i915_gem_object_panic_finish(fb);
76+
}

drivers/gpu/drm/i915/display/intel_bo.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#include <linux/types.h>
88

99
struct drm_gem_object;
10+
struct drm_scanout_buffer;
11+
struct intel_framebuffer;
1012
struct seq_file;
1113
struct vm_area_struct;
1214

@@ -23,5 +25,8 @@ struct intel_frontbuffer *intel_bo_set_frontbuffer(struct drm_gem_object *obj,
2325
struct intel_frontbuffer *front);
2426

2527
void intel_bo_describe(struct seq_file *m, struct drm_gem_object *obj);
28+
struct intel_framebuffer *intel_bo_alloc_framebuffer(void);
29+
int intel_bo_panic_setup(struct drm_scanout_buffer *sb);
30+
void intel_bo_panic_finish(struct intel_framebuffer *fb);
2631

2732
#endif /* __INTEL_BO__ */

0 commit comments

Comments
 (0)