mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 10:02:31 -04:00
The state of all the CRTCs on an MST link must be recomputed, if DSC gets enabled on any of the CRTCs on the link. For instance an MST docking station's Panel Replay capability may depend on whether DSC is enabled on any of the dock's streams (aka CRTCs). To assist the Panel Replay state computation for a CRTC based on the above, track in the CRTC state if DSC is enabled on any CRTC on an MST link. The intel_link_bw_limits::force_fec_pipes mask is used for a reason similar to the above: enable FEC on all CRTCs of a non-UHBR (8b10b) MST link if DSC is enabled on any of the link's CRTCs. The FEC enabled state for a CRTC doesn't indicate if DSC is enabled on a UHBR MST link (FEC is always enabled by the HW for UHBR, hence it's not tracked by the intel_crtc_state::fec_enable flag for such links, where this flag is always false). Based on the above, to be able to determine the DSC state on both non-UHBR and UHBR MST links, track the more generic DSC-enabled-on-link state (instead of the FEC-enabled-on-link state) for each CRTC in intel_link_bw_limits. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://lore.kernel.org/r/20251015161934.262108-7-imre.deak@intel.com
40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __INTEL_LINK_BW_H__
|
|
#define __INTEL_LINK_BW_H__
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include "intel_display_limits.h"
|
|
|
|
struct intel_atomic_state;
|
|
struct intel_connector;
|
|
struct intel_crtc_state;
|
|
|
|
struct intel_link_bw_limits {
|
|
u8 link_dsc_pipes;
|
|
u8 bpp_limit_reached_pipes;
|
|
/* in 1/16 bpp units */
|
|
int max_bpp_x16[I915_MAX_PIPES];
|
|
};
|
|
|
|
void intel_link_bw_init_limits(struct intel_atomic_state *state,
|
|
struct intel_link_bw_limits *limits);
|
|
int intel_link_bw_reduce_bpp(struct intel_atomic_state *state,
|
|
struct intel_link_bw_limits *limits,
|
|
u8 pipe_mask,
|
|
const char *reason);
|
|
bool intel_link_bw_compute_pipe_bpp(struct intel_crtc_state *crtc_state);
|
|
bool intel_link_bw_set_bpp_limit_for_pipe(struct intel_atomic_state *state,
|
|
const struct intel_link_bw_limits *old_limits,
|
|
struct intel_link_bw_limits *new_limits,
|
|
enum pipe pipe);
|
|
int intel_link_bw_atomic_check(struct intel_atomic_state *state,
|
|
struct intel_link_bw_limits *new_limits);
|
|
void intel_link_bw_connector_debugfs_add(struct intel_connector *connector);
|
|
|
|
#endif
|