Skip to content

Commit 41ae768

Browse files
committed
Merge tag 'drm-intel-next-fixes-2025-03-25' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next
drm/i915 fixes for v6.15 merge window: - Bounds check for scalers in DSC prefill latency computation - Fix build by adding a missing include Signed-off-by: Dave Airlie <airlied@redhat.com> From: Jani Nikula <jani.nikula@intel.com> Link: https://lore.kernel.org/r/878qota36x.fsf@intel.com
2 parents 889f32b + af9ec6e commit 41ae768

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#ifndef __INTEL_FBDEV_H__
77
#define __INTEL_FBDEV_H__
88

9+
#include <linux/types.h>
10+
911
struct drm_fb_helper;
1012
struct drm_fb_helper_surface_size;
1113
struct drm_i915_private;

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2314,6 +2314,7 @@ cdclk_prefill_adjustment(const struct intel_crtc_state *crtc_state)
23142314
static int
23152315
dsc_prefill_latency(const struct intel_crtc_state *crtc_state)
23162316
{
2317+
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
23172318
const struct intel_crtc_scaler_state *scaler_state =
23182319
&crtc_state->scaler_state;
23192320
int linetime = DIV_ROUND_UP(1000 * crtc_state->hw.adjusted_mode.htotal,
@@ -2323,7 +2324,9 @@ dsc_prefill_latency(const struct intel_crtc_state *crtc_state)
23232324
crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 ? 2 : 1;
23242325
u32 dsc_prefill_latency = 0;
23252326

2326-
if (!crtc_state->dsc.compression_enable || !num_scaler_users)
2327+
if (!crtc_state->dsc.compression_enable ||
2328+
!num_scaler_users ||
2329+
num_scaler_users > crtc->num_scalers)
23272330
return dsc_prefill_latency;
23282331

23292332
dsc_prefill_latency = DIV_ROUND_UP(15 * linetime * chroma_downscaling_factor, 10);

0 commit comments

Comments
 (0)