Skip to content

Commit 4f6993b

Browse files
committed
Merge tag 'drm-intel-fixes-2025-02-06' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes
- Fix the build error with clamp after WARN_ON on gcc 13.x+ (Guenter) - HDCP related fixes (Suraj) - PMU fix zero delta busyness issue (Umesh) - Fix page cleanup on DMA remap failure (Brian) - Drop 64bpp YUV formats from ICL+ SDR planes (Ville) - GuC log related fix (Daniele) - DisplayPort related fixes (Ankit, Jani) Signed-off-by: Dave Airlie <[email protected]> From: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 7fa68b9 + 069504f commit 4f6993b

File tree

7 files changed

+57
-25
lines changed

7 files changed

+57
-25
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ static u32 scale(u32 source_val,
4141
{
4242
u64 target_val;
4343

44-
WARN_ON(source_min > source_max);
45-
WARN_ON(target_min > target_max);
44+
if (WARN_ON(source_min >= source_max) ||
45+
WARN_ON(target_min > target_max))
46+
return target_min;
4647

4748
/* defensive */
4849
source_val = clamp(source_val, source_min, source_max);

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

+5-7
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ int intel_dp_dsc_max_src_input_bpc(struct intel_display *display)
17911791
if (DISPLAY_VER(display) == 11)
17921792
return 10;
17931793

1794-
return 0;
1794+
return intel_dp_dsc_min_src_input_bpc();
17951795
}
17961796

17971797
int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector,
@@ -2072,11 +2072,10 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp,
20722072
/* Compressed BPP should be less than the Input DSC bpp */
20732073
dsc_max_bpp = min(dsc_max_bpp, pipe_bpp - 1);
20742074

2075-
for (i = 0; i < ARRAY_SIZE(valid_dsc_bpp); i++) {
2076-
if (valid_dsc_bpp[i] < dsc_min_bpp)
2075+
for (i = ARRAY_SIZE(valid_dsc_bpp) - 1; i >= 0; i--) {
2076+
if (valid_dsc_bpp[i] < dsc_min_bpp ||
2077+
valid_dsc_bpp[i] > dsc_max_bpp)
20772078
continue;
2078-
if (valid_dsc_bpp[i] > dsc_max_bpp)
2079-
break;
20802079

20812080
ret = dsc_compute_link_config(intel_dp,
20822081
pipe_config,
@@ -2829,7 +2828,6 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
28292828

28302829
crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);
28312830

2832-
/* Currently only DP_AS_SDP_AVT_FIXED_VTOTAL mode supported */
28332831
as_sdp->sdp_type = DP_SDP_ADAPTIVE_SYNC;
28342832
as_sdp->length = 0x9;
28352833
as_sdp->duration_incr_ms = 0;
@@ -2840,7 +2838,7 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
28402838
as_sdp->target_rr = drm_mode_vrefresh(adjusted_mode);
28412839
as_sdp->target_rr_divider = true;
28422840
} else {
2843-
as_sdp->mode = DP_AS_SDP_AVT_FIXED_VTOTAL;
2841+
as_sdp->mode = DP_AS_SDP_AVT_DYNAMIC_VTOTAL;
28442842
as_sdp->vtotal = adjusted_mode->vtotal;
28452843
as_sdp->target_rr = 0;
28462844
}

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

+4
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
341341

342342
break;
343343
}
344+
345+
/* Allow using zero step to indicate one try */
346+
if (!step)
347+
break;
344348
}
345349

346350
if (slots < 0) {

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

+14-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ intel_hdcp_adjust_hdcp_line_rekeying(struct intel_encoder *encoder,
4141
u32 rekey_bit = 0;
4242

4343
/* Here we assume HDMI is in TMDS mode of operation */
44-
if (encoder->type != INTEL_OUTPUT_HDMI)
44+
if (!intel_encoder_is_hdmi(encoder))
4545
return;
4646

4747
if (DISPLAY_VER(display) >= 30) {
@@ -2188,6 +2188,19 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)
21882188

21892189
drm_dbg_kms(display->drm,
21902190
"HDCP2.2 Downstream topology change\n");
2191+
2192+
ret = hdcp2_authenticate_repeater_topology(connector);
2193+
if (!ret) {
2194+
intel_hdcp_update_value(connector,
2195+
DRM_MODE_CONTENT_PROTECTION_ENABLED,
2196+
true);
2197+
goto out;
2198+
}
2199+
2200+
drm_dbg_kms(display->drm,
2201+
"[CONNECTOR:%d:%s] Repeater topology auth failed.(%d)\n",
2202+
connector->base.base.id, connector->base.name,
2203+
ret);
21912204
} else {
21922205
drm_dbg_kms(display->drm,
21932206
"[CONNECTOR:%d:%s] HDCP2.2 link failed, retrying auth\n",

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

-4
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ static const u32 icl_sdr_y_plane_formats[] = {
106106
DRM_FORMAT_Y216,
107107
DRM_FORMAT_XYUV8888,
108108
DRM_FORMAT_XVYU2101010,
109-
DRM_FORMAT_XVYU12_16161616,
110-
DRM_FORMAT_XVYU16161616,
111109
};
112110

113111
static const u32 icl_sdr_uv_plane_formats[] = {
@@ -134,8 +132,6 @@ static const u32 icl_sdr_uv_plane_formats[] = {
134132
DRM_FORMAT_Y216,
135133
DRM_FORMAT_XYUV8888,
136134
DRM_FORMAT_XVYU2101010,
137-
DRM_FORMAT_XVYU12_16161616,
138-
DRM_FORMAT_XVYU16161616,
139135
};
140136

141137
static const u32 icl_hdr_plane_formats[] = {

drivers/gpu/drm/i915/gem/i915_gem_shmem.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ static int shmem_get_pages(struct drm_i915_gem_object *obj)
209209
struct address_space *mapping = obj->base.filp->f_mapping;
210210
unsigned int max_segment = i915_sg_segment_size(i915->drm.dev);
211211
struct sg_table *st;
212-
struct sgt_iter sgt_iter;
213-
struct page *page;
214212
int ret;
215213

216214
/*
@@ -239,9 +237,7 @@ static int shmem_get_pages(struct drm_i915_gem_object *obj)
239237
* for PAGE_SIZE chunks instead may be helpful.
240238
*/
241239
if (max_segment > PAGE_SIZE) {
242-
for_each_sgt_page(page, sgt_iter, st)
243-
put_page(page);
244-
sg_free_table(st);
240+
shmem_sg_free_table(st, mapping, false, false);
245241
kfree(st);
246242

247243
max_segment = PAGE_SIZE;

drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c

+30-6
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,19 @@ static void __reset_guc_busyness_stats(struct intel_guc *guc)
14691469
spin_unlock_irqrestore(&guc->timestamp.lock, flags);
14701470
}
14711471

1472+
static void __update_guc_busyness_running_state(struct intel_guc *guc)
1473+
{
1474+
struct intel_gt *gt = guc_to_gt(guc);
1475+
struct intel_engine_cs *engine;
1476+
enum intel_engine_id id;
1477+
unsigned long flags;
1478+
1479+
spin_lock_irqsave(&guc->timestamp.lock, flags);
1480+
for_each_engine(engine, gt, id)
1481+
engine->stats.guc.running = false;
1482+
spin_unlock_irqrestore(&guc->timestamp.lock, flags);
1483+
}
1484+
14721485
static void __update_guc_busyness_stats(struct intel_guc *guc)
14731486
{
14741487
struct intel_gt *gt = guc_to_gt(guc);
@@ -1619,6 +1632,9 @@ void intel_guc_busyness_park(struct intel_gt *gt)
16191632
if (!guc_submission_initialized(guc))
16201633
return;
16211634

1635+
/* Assume no engines are running and set running state to false */
1636+
__update_guc_busyness_running_state(guc);
1637+
16221638
/*
16231639
* There is a race with suspend flow where the worker runs after suspend
16241640
* and causes an unclaimed register access warning. Cancel the worker
@@ -5519,12 +5535,20 @@ static inline void guc_log_context(struct drm_printer *p,
55195535
{
55205536
drm_printf(p, "GuC lrc descriptor %u:\n", ce->guc_id.id);
55215537
drm_printf(p, "\tHW Context Desc: 0x%08x\n", ce->lrc.lrca);
5522-
drm_printf(p, "\t\tLRC Head: Internal %u, Memory %u\n",
5523-
ce->ring->head,
5524-
ce->lrc_reg_state[CTX_RING_HEAD]);
5525-
drm_printf(p, "\t\tLRC Tail: Internal %u, Memory %u\n",
5526-
ce->ring->tail,
5527-
ce->lrc_reg_state[CTX_RING_TAIL]);
5538+
if (intel_context_pin_if_active(ce)) {
5539+
drm_printf(p, "\t\tLRC Head: Internal %u, Memory %u\n",
5540+
ce->ring->head,
5541+
ce->lrc_reg_state[CTX_RING_HEAD]);
5542+
drm_printf(p, "\t\tLRC Tail: Internal %u, Memory %u\n",
5543+
ce->ring->tail,
5544+
ce->lrc_reg_state[CTX_RING_TAIL]);
5545+
intel_context_unpin(ce);
5546+
} else {
5547+
drm_printf(p, "\t\tLRC Head: Internal %u, Memory not pinned\n",
5548+
ce->ring->head);
5549+
drm_printf(p, "\t\tLRC Tail: Internal %u, Memory not pinned\n",
5550+
ce->ring->tail);
5551+
}
55285552
drm_printf(p, "\t\tContext Pin Count: %u\n",
55295553
atomic_read(&ce->pin_count));
55305554
drm_printf(p, "\t\tGuC ID Ref Count: %u\n",

0 commit comments

Comments
 (0)