The system resume display mode restoration should happen with an output configuration matching that of the suspend time saved mode. Since the restored mode configuration is subject to the bpp fallback logic, starting out with an unlimited bpp and reducing the bpp as required by any (MST) link BW limit, the resulting bpp will match the one during suspend only if the BW limit checks during suspend and resume are applied in an identical way. The latter is not guaranteed at the moment, since the pre-suspend MST topology may not be in place during resume (for instance if the MST sink was disconnected while being suspended), which makes the MST link BW check accept the unlimited bpp mode configuration unconditionally without ensuring that the required BW fits into the available MST link BW. To fix the above, initialize the bpp fallback logic with the max link bpp / force-FEC limits left behind by the suspend time mode save. Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240220211841.448846-4-imre.deak@intel.com
38 lines
1,021 B
C
38 lines
1,021 B
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 drm_i915_private;
|
|
|
|
struct intel_atomic_state;
|
|
struct intel_crtc_state;
|
|
|
|
struct intel_link_bw_limits {
|
|
u8 force_fec_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_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);
|
|
|
|
#endif
|