drm/i915: Use intel_crtc_needs_modeset() more
Prefer our own intel_crtc_needs_modeset() wrapper to drm_atomic_crtc_needs_modeset() whenever we are dealing with the intel_ types instead of drm_ types. Makes things a bit neater in general. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221031214037.1636-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
9034f9c4e2
commit
882ecff709
@ -2755,7 +2755,7 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
|
||||
if (IS_ERR(crtc_state))
|
||||
return PTR_ERR(crtc_state);
|
||||
|
||||
if (drm_atomic_crtc_needs_modeset(&crtc_state->uapi))
|
||||
if (intel_crtc_needs_modeset(crtc_state))
|
||||
pipe = INVALID_PIPE;
|
||||
}
|
||||
|
||||
|
@ -1239,7 +1239,7 @@ intel_color_add_affected_planes(struct intel_crtc_state *new_crtc_state)
|
||||
struct intel_plane *plane;
|
||||
|
||||
if (!new_crtc_state->hw.active ||
|
||||
drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi))
|
||||
intel_crtc_needs_modeset(new_crtc_state))
|
||||
return 0;
|
||||
|
||||
if (new_crtc_state->gamma_enable == old_crtc_state->gamma_enable &&
|
||||
|
@ -5931,7 +5931,7 @@ int intel_modeset_all_pipes(struct intel_atomic_state *state,
|
||||
return PTR_ERR(crtc_state);
|
||||
|
||||
if (!crtc_state->hw.active ||
|
||||
drm_atomic_crtc_needs_modeset(&crtc_state->uapi))
|
||||
intel_crtc_needs_modeset(crtc_state))
|
||||
continue;
|
||||
|
||||
drm_dbg_kms(&dev_priv->drm, "[CRTC:%d:%s] Full modeset due to %s\n",
|
||||
|
@ -1183,7 +1183,7 @@ static bool intel_fbc_can_flip_nuke(struct intel_atomic_state *state,
|
||||
const struct drm_framebuffer *old_fb = old_plane_state->hw.fb;
|
||||
const struct drm_framebuffer *new_fb = new_plane_state->hw.fb;
|
||||
|
||||
if (drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi))
|
||||
if (intel_crtc_needs_modeset(new_crtc_state))
|
||||
return false;
|
||||
|
||||
if (!intel_fbc_is_ok(old_plane_state) ||
|
||||
|
@ -2744,7 +2744,7 @@ static int skl_wm_add_affected_planes(struct intel_atomic_state *state,
|
||||
* power well the hardware state will go out of sync
|
||||
* with the software state.
|
||||
*/
|
||||
if (!drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi) &&
|
||||
if (!intel_crtc_needs_modeset(new_crtc_state) &&
|
||||
skl_plane_selected_wm_equals(plane,
|
||||
&old_crtc_state->wm.skl.optimal,
|
||||
&new_crtc_state->wm.skl.optimal))
|
||||
|
@ -1434,7 +1434,7 @@ static int g4x_compute_intermediate_wm(struct intel_atomic_state *state,
|
||||
enum plane_id plane_id;
|
||||
|
||||
if (!new_crtc_state->hw.active ||
|
||||
drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi)) {
|
||||
intel_crtc_needs_modeset(new_crtc_state)) {
|
||||
*intermediate = *optimal;
|
||||
|
||||
intermediate->cxsr = false;
|
||||
@ -1922,7 +1922,6 @@ static int vlv_compute_pipe_wm(struct intel_atomic_state *state,
|
||||
{
|
||||
struct intel_crtc_state *crtc_state =
|
||||
intel_atomic_get_new_crtc_state(state, crtc);
|
||||
bool needs_modeset = drm_atomic_crtc_needs_modeset(&crtc_state->uapi);
|
||||
const struct intel_plane_state *old_plane_state;
|
||||
const struct intel_plane_state *new_plane_state;
|
||||
struct intel_plane *plane;
|
||||
@ -1949,7 +1948,7 @@ static int vlv_compute_pipe_wm(struct intel_atomic_state *state,
|
||||
* FIFO setting we took over from the BIOS even if there
|
||||
* are no active planes on the crtc.
|
||||
*/
|
||||
if (needs_modeset)
|
||||
if (intel_crtc_needs_modeset(crtc_state))
|
||||
dirty = ~0;
|
||||
|
||||
if (!dirty)
|
||||
@ -1969,7 +1968,7 @@ static int vlv_compute_pipe_wm(struct intel_atomic_state *state,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (needs_modeset ||
|
||||
if (intel_crtc_needs_modeset(crtc_state) ||
|
||||
memcmp(old_fifo_state, new_fifo_state,
|
||||
sizeof(*new_fifo_state)) != 0)
|
||||
crtc_state->fifo_changed = true;
|
||||
@ -2092,7 +2091,7 @@ static int vlv_compute_intermediate_wm(struct intel_atomic_state *state,
|
||||
int level;
|
||||
|
||||
if (!new_crtc_state->hw.active ||
|
||||
drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi)) {
|
||||
intel_crtc_needs_modeset(new_crtc_state)) {
|
||||
*intermediate = *optimal;
|
||||
|
||||
intermediate->cxsr = false;
|
||||
@ -3150,7 +3149,7 @@ static int ilk_compute_intermediate_wm(struct intel_atomic_state *state,
|
||||
*/
|
||||
*a = new_crtc_state->wm.ilk.optimal;
|
||||
if (!new_crtc_state->hw.active ||
|
||||
drm_atomic_crtc_needs_modeset(&new_crtc_state->uapi) ||
|
||||
intel_crtc_needs_modeset(new_crtc_state) ||
|
||||
state->skip_intermediate_wm)
|
||||
return 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user