Skip to content

Commit

Permalink
drm/vc4: Do not include writeback conn load in load tracker
Browse files Browse the repository at this point in the history
The transposer/writeback connector should be running with a
lower priority, so shouldn't be factored into the load
calculations.

Signed-off-by: Dave Stevenson <[email protected]>
  • Loading branch information
6by9 authored and popcornmix committed Nov 6, 2024
1 parent d724baf commit 28c6532
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions drivers/gpu/drm/vc4/vc4_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,17 +674,26 @@ static int vc4_load_tracker_atomic_check(struct drm_atomic_state *state)
for_each_oldnew_plane_in_state(state, plane, old_plane_state,
new_plane_state, i) {
struct vc4_plane_state *vc4_plane_state;
struct vc4_crtc *vc4_crtc;

if (old_plane_state->fb && old_plane_state->crtc) {
vc4_plane_state = to_vc4_plane_state(old_plane_state);
load_state->membus_load -= vc4_plane_state->membus_load;
load_state->hvs_load -= vc4_plane_state->hvs_load;
vc4_crtc = to_vc4_crtc(old_plane_state->crtc);

if (!vc4_crtc->feeds_txp) {
load_state->membus_load -= vc4_plane_state->membus_load;
load_state->hvs_load -= vc4_plane_state->hvs_load;
}
}

if (new_plane_state->fb && new_plane_state->crtc) {
vc4_plane_state = to_vc4_plane_state(new_plane_state);
load_state->membus_load += vc4_plane_state->membus_load;
load_state->hvs_load += vc4_plane_state->hvs_load;
vc4_crtc = to_vc4_crtc(new_plane_state->crtc);

if (!vc4_crtc->feeds_txp) {
load_state->membus_load += vc4_plane_state->membus_load;
load_state->hvs_load += vc4_plane_state->hvs_load;
}
}
}

Expand Down

0 comments on commit 28c6532

Please sign in to comment.