Skip to content

Commit c5fb82d

Browse files
committed
Merge tag 'drm-intel-next-2025-12-19' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next
Beyond Display related: - Switch to use kernel standard fault injection in i915 (Juha-Pekka) Display uAPI related: - Display uapi vs. hw state fixes (Ville) - Expose sharpness only if num_scalers is >= 2 (Nemesa) Display related: - More display driver refactor and clean-ups, specially towards separation (Jani) - Add initial support Xe3p_LPD for NVL (Gustavo, Sai, ) - BMG FBC W/a (Vinod) - RPM fix (Dibin) - Add MTL+ platforms to support dpll framework (Mika, Imre) - Other PLL related fixes (Imre) - Fix DIMM_S DRAM decoding on ICL (Ville) - Async flip refactor (Ville, Jouni) - Go back to using AUX interrupts (Ville) - Reduce severity of failed DII FEC enabling (Grzelak) - Enable system cache support for FBC (Vinod) - Move PSR/Panel Replay sink data into intel_connector and other PSR changes (Jouni) - Detect AuxCCS support via display parent interface (Tvrtko) - Clean up link BW/DSC slice config computation(Imre) - Toggle powerdown states for C10 on HDMI (Gustavo) - Add parent interface for PC8 forcewake tricks (Ville) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/aUW3bVDdE63aSFOJ@intel.com
2 parents 7bc0f87 + 35ec712 commit c5fb82d

176 files changed

Lines changed: 3796 additions & 2506 deletions

File tree

Some content is hidden

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

drivers/gpu/drm/display/drm_dp_helper.c

Lines changed: 66 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2704,6 +2704,71 @@ u8 drm_dp_dsc_sink_bpp_incr(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
27042704
}
27052705
EXPORT_SYMBOL(drm_dp_dsc_sink_bpp_incr);
27062706

2707+
/**
2708+
* drm_dp_dsc_slice_count_to_mask() - Convert a slice count to a slice count mask
2709+
* @slice_count: slice count
2710+
*
2711+
* Convert @slice_count to a slice count mask.
2712+
*
2713+
* Returns the slice count mask.
2714+
*/
2715+
u32 drm_dp_dsc_slice_count_to_mask(int slice_count)
2716+
{
2717+
return BIT(slice_count - 1);
2718+
}
2719+
EXPORT_SYMBOL(drm_dp_dsc_slice_count_to_mask);
2720+
2721+
/**
2722+
* drm_dp_dsc_sink_slice_count_mask() - Get the mask of valid DSC sink slice counts
2723+
* @dsc_dpcd: the sink's DSC DPCD capabilities
2724+
* @is_edp: %true for an eDP sink
2725+
*
2726+
* Get the mask of supported slice counts from the sink's DSC DPCD register.
2727+
*
2728+
* Returns:
2729+
* Mask of slice counts supported by the DSC sink:
2730+
* - > 0: bit#0,1,3,5..,23 set if the sink supports 1,2,4,6..,24 slices
2731+
* - 0: if the sink doesn't support any slices
2732+
*/
2733+
u32 drm_dp_dsc_sink_slice_count_mask(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
2734+
bool is_edp)
2735+
{
2736+
u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 - DP_DSC_SUPPORT];
2737+
u32 mask = 0;
2738+
2739+
if (!is_edp) {
2740+
/* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */
2741+
u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 - DP_DSC_SUPPORT];
2742+
2743+
if (slice_cap2 & DP_DSC_24_PER_DP_DSC_SINK)
2744+
mask |= drm_dp_dsc_slice_count_to_mask(24);
2745+
if (slice_cap2 & DP_DSC_20_PER_DP_DSC_SINK)
2746+
mask |= drm_dp_dsc_slice_count_to_mask(20);
2747+
if (slice_cap2 & DP_DSC_16_PER_DP_DSC_SINK)
2748+
mask |= drm_dp_dsc_slice_count_to_mask(16);
2749+
}
2750+
2751+
/* DP, eDP v1.5+ */
2752+
if (slice_cap1 & DP_DSC_12_PER_DP_DSC_SINK)
2753+
mask |= drm_dp_dsc_slice_count_to_mask(12);
2754+
if (slice_cap1 & DP_DSC_10_PER_DP_DSC_SINK)
2755+
mask |= drm_dp_dsc_slice_count_to_mask(10);
2756+
if (slice_cap1 & DP_DSC_8_PER_DP_DSC_SINK)
2757+
mask |= drm_dp_dsc_slice_count_to_mask(8);
2758+
if (slice_cap1 & DP_DSC_6_PER_DP_DSC_SINK)
2759+
mask |= drm_dp_dsc_slice_count_to_mask(6);
2760+
/* DP, eDP v1.4+ */
2761+
if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
2762+
mask |= drm_dp_dsc_slice_count_to_mask(4);
2763+
if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
2764+
mask |= drm_dp_dsc_slice_count_to_mask(2);
2765+
if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
2766+
mask |= drm_dp_dsc_slice_count_to_mask(1);
2767+
2768+
return mask;
2769+
}
2770+
EXPORT_SYMBOL(drm_dp_dsc_sink_slice_count_mask);
2771+
27072772
/**
27082773
* drm_dp_dsc_sink_max_slice_count() - Get the max slice count
27092774
* supported by the DSC sink.
@@ -2723,43 +2788,7 @@ EXPORT_SYMBOL(drm_dp_dsc_sink_bpp_incr);
27232788
u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
27242789
bool is_edp)
27252790
{
2726-
u8 slice_cap1 = dsc_dpcd[DP_DSC_SLICE_CAP_1 - DP_DSC_SUPPORT];
2727-
2728-
if (is_edp) {
2729-
/* For eDP, register DSC_SLICE_CAPABILITIES_1 gives slice count */
2730-
if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
2731-
return 4;
2732-
if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
2733-
return 2;
2734-
if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
2735-
return 1;
2736-
} else {
2737-
/* For DP, use values from DSC_SLICE_CAP_1 and DSC_SLICE_CAP2 */
2738-
u8 slice_cap2 = dsc_dpcd[DP_DSC_SLICE_CAP_2 - DP_DSC_SUPPORT];
2739-
2740-
if (slice_cap2 & DP_DSC_24_PER_DP_DSC_SINK)
2741-
return 24;
2742-
if (slice_cap2 & DP_DSC_20_PER_DP_DSC_SINK)
2743-
return 20;
2744-
if (slice_cap2 & DP_DSC_16_PER_DP_DSC_SINK)
2745-
return 16;
2746-
if (slice_cap1 & DP_DSC_12_PER_DP_DSC_SINK)
2747-
return 12;
2748-
if (slice_cap1 & DP_DSC_10_PER_DP_DSC_SINK)
2749-
return 10;
2750-
if (slice_cap1 & DP_DSC_8_PER_DP_DSC_SINK)
2751-
return 8;
2752-
if (slice_cap1 & DP_DSC_6_PER_DP_DSC_SINK)
2753-
return 6;
2754-
if (slice_cap1 & DP_DSC_4_PER_DP_DSC_SINK)
2755-
return 4;
2756-
if (slice_cap1 & DP_DSC_2_PER_DP_DSC_SINK)
2757-
return 2;
2758-
if (slice_cap1 & DP_DSC_1_PER_DP_DSC_SINK)
2759-
return 1;
2760-
}
2761-
2762-
return 0;
2791+
return fls(drm_dp_dsc_sink_slice_count_mask(dsc_dpcd, is_edp));
27632792
}
27642793
EXPORT_SYMBOL(drm_dp_dsc_sink_max_slice_count);
27652794

drivers/gpu/drm/i915/Makefile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ i915-y += \
2727
i915_config.o \
2828
i915_driver.o \
2929
i915_drm_client.o \
30+
i915_edram.o \
31+
i915_freq.o \
3032
i915_getparam.o \
33+
i915_gmch.o \
3134
i915_ioctl.o \
3235
i915_irq.o \
3336
i915_mitigations.o \
@@ -54,12 +57,6 @@ i915-y += \
5457
vlv_iosf_sb.o \
5558
vlv_suspend.o
5659

57-
# core peripheral code
58-
i915-y += \
59-
soc/intel_dram.o \
60-
soc/intel_gmch.o \
61-
soc/intel_rom.o
62-
6360
# core library code
6461
i915-y += \
6562
i915_memcpy.o \
@@ -77,6 +74,12 @@ i915-$(CONFIG_DEBUG_FS) += \
7774
i915-$(CONFIG_PERF_EVENTS) += \
7875
i915_pmu.o
7976

77+
# core display adaptation
78+
i915-y += \
79+
i915_display_pc8.o \
80+
i915_hdcp_gsc.o \
81+
i915_panic.o
82+
8083
# "Graphics Technology" (aka we talk to the gpu)
8184
gt-y += \
8285
gt/gen2_engine_cs.o \
@@ -267,6 +270,7 @@ i915-y += \
267270
display/intel_dpll_mgr.o \
268271
display/intel_dpt.o \
269272
display/intel_dpt_common.o \
273+
display/intel_dram.o \
270274
display/intel_drrs.o \
271275
display/intel_dsb.o \
272276
display/intel_dsb_buffer.o \
@@ -280,7 +284,6 @@ i915-y += \
280284
display/intel_frontbuffer.o \
281285
display/intel_global_state.o \
282286
display/intel_hdcp.o \
283-
display/intel_hdcp_gsc.o \
284287
display/intel_hdcp_gsc_message.o \
285288
display/intel_hotplug.o \
286289
display/intel_hotplug_irq.o \
@@ -292,7 +295,7 @@ i915-y += \
292295
display/intel_modeset_setup.o \
293296
display/intel_modeset_verify.o \
294297
display/intel_overlay.o \
295-
display/intel_panic.o \
298+
display/intel_parent.o \
296299
display/intel_pch.o \
297300
display/intel_pch_display.o \
298301
display/intel_pch_refclk.o \
@@ -301,6 +304,7 @@ i915-y += \
301304
display/intel_pmdemand.o \
302305
display/intel_psr.o \
303306
display/intel_quirks.o \
307+
display/intel_rom.o \
304308
display/intel_sbi.o \
305309
display/intel_sprite.o \
306310
display/intel_sprite_uapi.o \

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static bool intel_dp_get_hw_state(struct intel_encoder *encoder,
302302
{
303303
struct intel_display *display = to_intel_display(encoder);
304304
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
305-
intel_wakeref_t wakeref;
305+
struct ref_tracker *wakeref;
306306
bool ret;
307307

308308
wakeref = intel_display_power_get_if_enabled(display,
@@ -684,12 +684,11 @@ static void intel_enable_dp(struct intel_atomic_state *state,
684684
struct intel_display *display = to_intel_display(state);
685685
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
686686
u32 dp_reg = intel_de_read(display, intel_dp->output_reg);
687-
intel_wakeref_t wakeref;
688687

689688
if (drm_WARN_ON(display->drm, dp_reg & DP_PORT_EN))
690689
return;
691690

692-
with_intel_pps_lock(intel_dp, wakeref) {
691+
with_intel_pps_lock(intel_dp) {
693692
if (display->platform.valleyview || display->platform.cherryview)
694693
vlv_pps_port_enable_unlocked(encoder, pipe_config);
695694

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static bool intel_hdmi_get_hw_state(struct intel_encoder *encoder,
6868
{
6969
struct intel_display *display = to_intel_display(encoder);
7070
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
71-
intel_wakeref_t wakeref;
71+
struct ref_tracker *wakeref;
7272
bool ret;
7373

7474
wakeref = intel_display_power_get_if_enabled(display,

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "intel_fb.h"
2323
#include "intel_fbc.h"
2424
#include "intel_frontbuffer.h"
25-
#include "intel_panic.h"
2625
#include "intel_plane.h"
2726
#include "intel_sprite.h"
2827

@@ -134,7 +133,7 @@ static struct intel_fbc *i9xx_plane_fbc(struct intel_display *display,
134133
enum i9xx_plane_id i9xx_plane)
135134
{
136135
if (i9xx_plane_has_fbc(display, i9xx_plane))
137-
return display->fbc[INTEL_FBC_A];
136+
return display->fbc.instances[INTEL_FBC_A];
138137
else
139138
return NULL;
140139
}
@@ -724,7 +723,7 @@ static bool i9xx_plane_get_hw_state(struct intel_plane *plane,
724723
struct intel_display *display = to_intel_display(plane);
725724
enum intel_display_power_domain power_domain;
726725
enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
727-
intel_wakeref_t wakeref;
726+
struct ref_tracker *wakeref;
728727
bool ret;
729728
u32 val;
730729

@@ -819,7 +818,7 @@ unsigned int vlv_plane_min_alignment(struct intel_plane *plane,
819818
{
820819
struct intel_display *display = to_intel_display(plane);
821820

822-
if (intel_plane_can_async_flip(plane, fb->format->format, fb->modifier))
821+
if (intel_plane_can_async_flip(plane, fb->format, fb->modifier))
823822
return 256 * 1024;
824823

825824
/* FIXME undocumented so not sure what's actually needed */
@@ -843,7 +842,7 @@ static unsigned int g4x_primary_min_alignment(struct intel_plane *plane,
843842
{
844843
struct intel_display *display = to_intel_display(plane);
845844

846-
if (intel_plane_can_async_flip(plane, fb->format->format, fb->modifier))
845+
if (intel_plane_can_async_flip(plane, fb->format, fb->modifier))
847846
return 256 * 1024;
848847

849848
if (intel_scanout_needs_vtd_wa(display))

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
#include <drm/drm_print.h>
99

10-
#include "soc/intel_dram.h"
11-
1210
#include "i915_drv.h"
1311
#include "i915_reg.h"
1412
#include "i9xx_wm.h"
@@ -19,6 +17,7 @@
1917
#include "intel_display.h"
2018
#include "intel_display_regs.h"
2119
#include "intel_display_trace.h"
20+
#include "intel_dram.h"
2221
#include "intel_fb.h"
2322
#include "intel_mchbar_regs.h"
2423
#include "intel_wm.h"
@@ -91,7 +90,7 @@ static const struct cxsr_latency cxsr_latency_table[] = {
9190

9291
static const struct cxsr_latency *pnv_get_cxsr_latency(struct intel_display *display)
9392
{
94-
const struct dram_info *dram_info = intel_dram_info(display->drm);
93+
const struct dram_info *dram_info = intel_dram_info(display);
9594
bool is_ddr3 = dram_info->type == INTEL_DRAM_DDR3;
9695
int i;
9796

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ static void gen11_dsi_disable_io_power(struct intel_encoder *encoder)
14111411
enum port port;
14121412

14131413
for_each_dsi_port(port, intel_dsi->ports) {
1414-
intel_wakeref_t wakeref;
1414+
struct ref_tracker *wakeref;
14151415

14161416
wakeref = fetch_and_zero(&intel_dsi->io_wakeref[port]);
14171417
intel_display_power_put(display,
@@ -1722,7 +1722,7 @@ static bool gen11_dsi_get_hw_state(struct intel_encoder *encoder,
17221722
struct intel_display *display = to_intel_display(encoder);
17231723
struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
17241724
enum transcoder dsi_trans;
1725-
intel_wakeref_t wakeref;
1725+
struct ref_tracker *wakeref;
17261726
enum port port;
17271727
bool ret = false;
17281728
u32 tmp;

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,9 @@ static void lnl_alpm_configure(struct intel_dp *intel_dp,
326326
if (intel_dp->as_sdp_supported) {
327327
u32 pr_alpm_ctl = PR_ALPM_CTL_ADAPTIVE_SYNC_SDP_POSITION_T1;
328328

329-
if (intel_dp->pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
330-
DP_PANEL_REPLAY_LINK_OFF_SUPPORTED_IN_PR_AFTER_ADAPTIVE_SYNC_SDP)
329+
if (crtc_state->link_off_after_as_sdp_when_pr_active)
331330
pr_alpm_ctl |= PR_ALPM_CTL_ALLOW_LINK_OFF_BETWEEN_AS_SDP_AND_SU;
332-
if (!(intel_dp->pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)] &
333-
DP_PANEL_REPLAY_ASYNC_VIDEO_TIMING_NOT_SUPPORTED_IN_PR))
331+
if (crtc_state->disable_as_sdp_when_pr_active)
334332
pr_alpm_ctl |= PR_ALPM_CTL_AS_SDP_TRANSMISSION_IN_ACTIVE_DISABLE;
335333

336334
intel_de_write(display, PR_ALPM_CTL(display, cpu_transcoder),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,10 +1042,10 @@ int intel_audio_min_cdclk(const struct intel_crtc_state *crtc_state)
10421042
static unsigned long intel_audio_component_get_power(struct device *kdev)
10431043
{
10441044
struct intel_display *display = to_intel_display(kdev);
1045-
intel_wakeref_t wakeref;
1045+
struct ref_tracker *wakeref;
10461046

10471047
/* Catch potential impedance mismatches before they occur! */
1048-
BUILD_BUG_ON(sizeof(intel_wakeref_t) > sizeof(unsigned long));
1048+
BUILD_BUG_ON(sizeof(wakeref) > sizeof(unsigned long));
10491049

10501050
wakeref = intel_display_power_get(display, POWER_DOMAIN_AUDIO_PLAYBACK);
10511051

@@ -1074,7 +1074,7 @@ static void intel_audio_component_put_power(struct device *kdev,
10741074
unsigned long cookie)
10751075
{
10761076
struct intel_display *display = to_intel_display(kdev);
1077-
intel_wakeref_t wakeref = (intel_wakeref_t)cookie;
1077+
struct ref_tracker *wakeref = (struct ref_tracker *)cookie;
10781078

10791079
/* Stop forcing CDCLK to 2*BCLK if no need for audio to be powered. */
10801080
if (--display->audio.power_refcount == 0)

0 commit comments

Comments
 (0)