Skip to content

Commit 7971deb

Browse files
committed
Merge tag 'drm-intel-next-2023-10-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
drm/i915 feature pull #2 for v6.7: Features and functionality: - Preparation for i915 display code reuse in upcoming Xe driver (Jani) - Drop the fastboot module parameter and use the platform defaults (Arun) - Enable new LNL FBC features (Vinod) - Add LNL display feature capability reads (Vinod) Refactoring and cleanups: - Locally enable W=1 warnings by default in i915 (Jani) - Move HDCP GSC message code to a separate file (Suraj) - GVT include cleanups (Jani) - Move more display init under display/ (Jani) - DPLL ID refactoring (Ville) - Better abstraction of GT0 (Jani) - Move VGA decode function to GMCH code (Uma) - Use local64_try_cmpxchg() to optimize PMU event read (Uros Bizjak) - Clean up FBC checks (Ville) - Constify and unify state checker calling conventions (Ville) - Add display step name helper (Chaitanya) Documentation: - Update CCS and GSC CS documentation (Rodrigo) - Fix a number of documentation typos (Randy Dunlap) Fixes: - VLV DSI fixes and quirks (Hans) - Fix crtc state memory leaks (Suraj) - Increase LSPCON mode settle timeout (Niko Tsirakis) - Stop clobbering old crtc state during state check (Ville) - Fix VLV color state readout (Ville) - Fix cx0 PHY pipe reset to allow S0iX (Khaled) - Ensure DP MST pbn_div is up-to-date after sink reconnect (Imre) - Drop an unnecessary NULL check to fix static analyzer warning (Suraj) - Use an explicit rather than implicit include for frontbuffer tracking (Jouni) Merges: - Backmerge drm-next to fix a conflict (Jani) Signed-off-by: Dave Airlie <[email protected]> From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents d32ce5a + a6028af commit 7971deb

Some content is hidden

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

83 files changed

+2265
-1413
lines changed

Documentation/gpu/i915.rst

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -267,19 +267,22 @@ i915 driver.
267267
Intel GPU Basics
268268
----------------
269269

270-
An Intel GPU has multiple engines. There are several engine types.
271-
272-
- RCS engine is for rendering 3D and performing compute, this is named
273-
`I915_EXEC_RENDER` in user space.
274-
- BCS is a blitting (copy) engine, this is named `I915_EXEC_BLT` in user
275-
space.
276-
- VCS is a video encode and decode engine, this is named `I915_EXEC_BSD`
277-
in user space
278-
- VECS is video enhancement engine, this is named `I915_EXEC_VEBOX` in user
279-
space.
280-
- The enumeration `I915_EXEC_DEFAULT` does not refer to specific engine;
281-
instead it is to be used by user space to specify a default rendering
282-
engine (for 3D) that may or may not be the same as RCS.
270+
An Intel GPU has multiple engines. There are several engine types:
271+
272+
- Render Command Streamer (RCS). An engine for rendering 3D and
273+
performing compute.
274+
- Blitting Command Streamer (BCS). An engine for performing blitting and/or
275+
copying operations.
276+
- Video Command Streamer. An engine used for video encoding and decoding. Also
277+
sometimes called 'BSD' in hardware documentation.
278+
- Video Enhancement Command Streamer (VECS). An engine for video enhancement.
279+
Also sometimes called 'VEBOX' in hardware documentation.
280+
- Compute Command Streamer (CCS). An engine that has access to the media and
281+
GPGPU pipelines, but not the 3D pipeline.
282+
- Graphics Security Controller (GSCCS). A dedicated engine for internal
283+
communication with GSC controller on security related tasks like
284+
High-bandwidth Digital Content Protection (HDCP), Protected Xe Path (PXP),
285+
and HuC firmware authentication.
283286

284287
The Intel GPU family is a family of integrated GPU's using Unified
285288
Memory Access. For having the GPU "do work", user space will feed the

drivers/gpu/drm/i915/Makefile

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,45 @@
33
# Makefile for the drm device driver. This driver provides support for the
44
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
55

6-
# Add a set of useful warning flags and enable -Werror for CI to prevent
7-
# trivial mistakes from creeping in. We have to do this piecemeal as we reject
8-
# any patch that isn't warning clean, so turning on -Wall -Wextra (or W=1) we
9-
# need to filter out dubious warnings. Still it is our interest
10-
# to keep running locally with W=1 C=1 until we are completely clean.
11-
#
12-
# Note the danger in using -Wall -Wextra is that when CI updates gcc we
13-
# will most likely get a sudden build breakage... Hopefully we will fix
14-
# new warnings before CI updates!
15-
subdir-ccflags-y := -Wall -Wextra
16-
subdir-ccflags-y += -Wno-format-security
17-
subdir-ccflags-y += -Wno-unused-parameter
18-
subdir-ccflags-y += -Wno-type-limits
6+
# Unconditionally enable W=1 warnings locally
7+
# --- begin copy-paste W=1 warnings from scripts/Makefile.extrawarn
8+
subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter
9+
subdir-ccflags-y += -Wmissing-declarations
10+
subdir-ccflags-y += $(call cc-option, -Wrestrict)
11+
subdir-ccflags-y += -Wmissing-format-attribute
12+
subdir-ccflags-y += -Wmissing-prototypes
13+
subdir-ccflags-y += -Wold-style-definition
14+
subdir-ccflags-y += -Wmissing-include-dirs
15+
subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
16+
subdir-ccflags-y += $(call cc-option, -Wunused-const-variable)
17+
subdir-ccflags-y += $(call cc-option, -Wpacked-not-aligned)
18+
subdir-ccflags-y += $(call cc-option, -Wformat-overflow)
19+
subdir-ccflags-y += $(call cc-option, -Wformat-truncation)
20+
subdir-ccflags-y += $(call cc-option, -Wstringop-overflow)
21+
subdir-ccflags-y += $(call cc-option, -Wstringop-truncation)
22+
# The following turn off the warnings enabled by -Wextra
23+
ifeq ($(findstring 2, $(KBUILD_EXTRA_WARN)),)
1924
subdir-ccflags-y += -Wno-missing-field-initializers
20-
subdir-ccflags-y += -Wno-sign-compare
25+
subdir-ccflags-y += -Wno-type-limits
2126
subdir-ccflags-y += -Wno-shift-negative-value
22-
subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
23-
subdir-ccflags-y += $(call cc-disable-warning, frame-address)
27+
endif
28+
ifeq ($(findstring 3, $(KBUILD_EXTRA_WARN)),)
29+
subdir-ccflags-y += -Wno-sign-compare
30+
endif
31+
# --- end copy-paste
32+
33+
# Enable -Werror in CI and development
2434
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
2535

2636
# Fine grained warnings disable
2737
CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
2838
CFLAGS_display/intel_display_device.o = $(call cc-disable-warning, override-init)
2939
CFLAGS_display/intel_fbdev.o = $(call cc-disable-warning, override-init)
3040

41+
# Support compiling the display code separately for both i915 and xe
42+
# drivers. Define I915 when building i915.
43+
subdir-ccflags-y += -DI915
44+
3145
subdir-ccflags-y += -I$(srctree)/$(src)
3246

3347
# Please keep these build lists sorted!
@@ -265,6 +279,7 @@ i915-y += \
265279
display/intel_global_state.o \
266280
display/intel_hdcp.o \
267281
display/intel_hdcp_gsc.o \
282+
display/intel_hdcp_gsc_message.o \
268283
display/intel_hotplug.o \
269284
display/intel_hotplug_irq.o \
270285
display/intel_hti.o \

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ struct intel_crtc_state;
1717
struct intel_dp;
1818
struct intel_encoder;
1919

20+
#ifdef I915
2021
const struct dpll *vlv_get_dpll(struct drm_i915_private *i915);
2122
enum pipe vlv_active_pipe(struct intel_dp *intel_dp);
2223
void g4x_dp_set_clock(struct intel_encoder *encoder,
@@ -26,5 +27,30 @@ bool g4x_dp_port_enabled(struct drm_i915_private *dev_priv,
2627
enum pipe *pipe);
2728
bool g4x_dp_init(struct drm_i915_private *dev_priv,
2829
i915_reg_t output_reg, enum port port);
30+
#else
31+
static inline const struct dpll *vlv_get_dpll(struct drm_i915_private *i915)
32+
{
33+
return NULL;
34+
}
35+
static inline int vlv_active_pipe(struct intel_dp *intel_dp)
36+
{
37+
return 0;
38+
}
39+
static inline void g4x_dp_set_clock(struct intel_encoder *encoder,
40+
struct intel_crtc_state *pipe_config)
41+
{
42+
}
43+
static inline bool g4x_dp_port_enabled(struct drm_i915_private *dev_priv,
44+
i915_reg_t dp_reg, int port,
45+
enum pipe *pipe)
46+
{
47+
return false;
48+
}
49+
static inline bool g4x_dp_init(struct drm_i915_private *dev_priv,
50+
i915_reg_t output_reg, int port)
51+
{
52+
return false;
53+
}
54+
#endif
2955

3056
#endif

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,21 @@ struct drm_atomic_state;
1515
struct drm_connector;
1616
struct drm_i915_private;
1717

18+
#ifdef I915
1819
void g4x_hdmi_init(struct drm_i915_private *dev_priv,
1920
i915_reg_t hdmi_reg, enum port port);
2021
int g4x_hdmi_connector_atomic_check(struct drm_connector *connector,
2122
struct drm_atomic_state *state);
23+
#else
24+
static inline void g4x_hdmi_init(struct drm_i915_private *dev_priv,
25+
i915_reg_t hdmi_reg, int port)
26+
{
27+
}
28+
static inline int g4x_hdmi_connector_atomic_check(struct drm_connector *connector,
29+
struct drm_atomic_state *state)
30+
{
31+
return 0;
32+
}
33+
#endif
2234

2335
#endif

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ struct intel_atomic_state;
1212
struct intel_crtc;
1313
struct intel_crtc_state;
1414

15+
#ifdef I915
1516
bool hsw_ips_disable(const struct intel_crtc_state *crtc_state);
1617
bool hsw_ips_pre_update(struct intel_atomic_state *state,
1718
struct intel_crtc *crtc);
@@ -23,5 +24,39 @@ int hsw_ips_compute_config(struct intel_atomic_state *state,
2324
struct intel_crtc *crtc);
2425
void hsw_ips_get_config(struct intel_crtc_state *crtc_state);
2526
void hsw_ips_crtc_debugfs_add(struct intel_crtc *crtc);
27+
#else
28+
static inline bool hsw_ips_disable(const struct intel_crtc_state *crtc_state)
29+
{
30+
return false;
31+
}
32+
static inline bool hsw_ips_pre_update(struct intel_atomic_state *state,
33+
struct intel_crtc *crtc)
34+
{
35+
return false;
36+
}
37+
static inline void hsw_ips_post_update(struct intel_atomic_state *state,
38+
struct intel_crtc *crtc)
39+
{
40+
}
41+
static inline bool hsw_crtc_supports_ips(struct intel_crtc *crtc)
42+
{
43+
return false;
44+
}
45+
static inline bool hsw_crtc_state_ips_capable(const struct intel_crtc_state *crtc_state)
46+
{
47+
return false;
48+
}
49+
static inline int hsw_ips_compute_config(struct intel_atomic_state *state,
50+
struct intel_crtc *crtc)
51+
{
52+
return 0;
53+
}
54+
static inline void hsw_ips_get_config(struct intel_crtc_state *crtc_state)
55+
{
56+
}
57+
static inline void hsw_ips_crtc_debugfs_add(struct intel_crtc *crtc)
58+
{
59+
}
60+
#endif
2661

2762
#endif /* __HSW_IPS_H__ */

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ struct intel_initial_plane_config;
1515
struct intel_plane;
1616
struct intel_plane_state;
1717

18+
#ifdef I915
1819
unsigned int i965_plane_max_stride(struct intel_plane *plane,
1920
u32 pixel_format, u64 modifier,
2021
unsigned int rotation);
@@ -25,4 +26,26 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe);
2526

2627
void i9xx_get_initial_plane_config(struct intel_crtc *crtc,
2728
struct intel_initial_plane_config *plane_config);
29+
#else
30+
static inline unsigned int i965_plane_max_stride(struct intel_plane *plane,
31+
u32 pixel_format, u64 modifier,
32+
unsigned int rotation)
33+
{
34+
return 0;
35+
}
36+
static inline int i9xx_check_plane_surface(struct intel_plane_state *plane_state)
37+
{
38+
return 0;
39+
}
40+
static inline struct intel_plane *
41+
intel_primary_plane_create(struct drm_i915_private *dev_priv, int pipe)
42+
{
43+
return NULL;
44+
}
45+
static inline void i9xx_get_initial_plane_config(struct intel_crtc *crtc,
46+
struct intel_initial_plane_config *plane_config)
47+
{
48+
}
49+
#endif
50+
2851
#endif

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,26 @@ struct drm_i915_private;
1212
struct intel_crtc_state;
1313
struct intel_plane_state;
1414

15+
#ifdef I915
1516
bool ilk_disable_lp_wm(struct drm_i915_private *i915);
1617
void ilk_wm_sanitize(struct drm_i915_private *i915);
1718
bool intel_set_memory_cxsr(struct drm_i915_private *i915, bool enable);
1819
void i9xx_wm_init(struct drm_i915_private *i915);
20+
#else
21+
static inline bool ilk_disable_lp_wm(struct drm_i915_private *i915)
22+
{
23+
return false;
24+
}
25+
static inline void ilk_wm_sanitize(struct drm_i915_private *i915)
26+
{
27+
}
28+
static inline bool intel_set_memory_cxsr(struct drm_i915_private *i915, bool enable)
29+
{
30+
return false;
31+
}
32+
static inline void i9xx_wm_init(struct drm_i915_private *i915)
33+
{
34+
}
35+
#endif
1936

2037
#endif /* __I9XX_WM_H__ */

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3702,6 +3702,7 @@ static const struct intel_color_funcs vlv_color_funcs = {
37023702
.read_luts = i965_read_luts,
37033703
.lut_equal = i965_lut_equal,
37043704
.read_csc = vlv_read_csc,
3705+
.get_config = i9xx_get_config,
37053706
};
37063707

37073708
static const struct intel_color_funcs i965_color_funcs = {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ intel_crt_detect(struct drm_connector *connector,
838838
connector->base.id, connector->name,
839839
force);
840840

841-
if (!INTEL_DISPLAY_ENABLED(dev_priv))
841+
if (!intel_display_device_enabled(dev_priv))
842842
return connector_status_disconnected;
843843

844844
if (dev_priv->params.load_detect_test) {

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,23 @@ enum pipe;
1212
struct drm_encoder;
1313
struct drm_i915_private;
1414

15+
#ifdef I915
1516
bool intel_crt_port_enabled(struct drm_i915_private *dev_priv,
1617
i915_reg_t adpa_reg, enum pipe *pipe);
1718
void intel_crt_init(struct drm_i915_private *dev_priv);
1819
void intel_crt_reset(struct drm_encoder *encoder);
20+
#else
21+
static inline bool intel_crt_port_enabled(struct drm_i915_private *dev_priv,
22+
i915_reg_t adpa_reg, enum pipe *pipe)
23+
{
24+
return false;
25+
}
26+
static inline void intel_crt_init(struct drm_i915_private *dev_priv)
27+
{
28+
}
29+
static inline void intel_crt_reset(struct drm_encoder *encoder)
30+
{
31+
}
32+
#endif
1933

2034
#endif /* __INTEL_CRT_H__ */

0 commit comments

Comments
 (0)