mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
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
This commit is contained in:
commit
41ae768afb
|
|
@ -6,6 +6,8 @@
|
|||
#ifndef __INTEL_FBDEV_H__
|
||||
#define __INTEL_FBDEV_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct drm_fb_helper;
|
||||
struct drm_fb_helper_surface_size;
|
||||
struct drm_i915_private;
|
||||
|
|
|
|||
|
|
@ -2314,6 +2314,7 @@ cdclk_prefill_adjustment(const struct intel_crtc_state *crtc_state)
|
|||
static int
|
||||
dsc_prefill_latency(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
const struct intel_crtc_scaler_state *scaler_state =
|
||||
&crtc_state->scaler_state;
|
||||
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)
|
|||
crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 ? 2 : 1;
|
||||
u32 dsc_prefill_latency = 0;
|
||||
|
||||
if (!crtc_state->dsc.compression_enable || !num_scaler_users)
|
||||
if (!crtc_state->dsc.compression_enable ||
|
||||
!num_scaler_users ||
|
||||
num_scaler_users > crtc->num_scalers)
|
||||
return dsc_prefill_latency;
|
||||
|
||||
dsc_prefill_latency = DIV_ROUND_UP(15 * linetime * chroma_downscaling_factor, 10);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user