Commit 6148f365 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Fix bigjoiner state copy fails

We seem to be missing a few things from the bigjoiner state copy.
Namely hw.mode isn't getting copied (which probably causes PIPESRC
to be misconfigured), CTM/LUTs aren't getting copied (which could
cause the pipe to produced incorrect output), and we also forgot
to copy over the color_mgmt_changed flag so potentially we fail
to do the actual CTM/LUT programming (assuming we aren't doing
a full modeset or fastset). Fix it all.

v2: Fix uapi.ctm vs. hw.ctm copy-paste fail
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220204072009.1546-1-ville.syrjala@linux.intel.comReviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
parent 1a7a8d93
...@@ -5613,8 +5613,10 @@ intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state, ...@@ -5613,8 +5613,10 @@ intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state,
master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc); master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc);
/* No need to copy state if the master state is unchanged */ /* No need to copy state if the master state is unchanged */
if (master_crtc_state) if (master_crtc_state) {
crtc_state->uapi.color_mgmt_changed = master_crtc_state->uapi.color_mgmt_changed;
intel_crtc_copy_color_blobs(crtc_state, master_crtc_state); intel_crtc_copy_color_blobs(crtc_state, master_crtc_state);
}
} }
static void static void
...@@ -5676,13 +5678,23 @@ copy_bigjoiner_crtc_state(struct intel_crtc_state *crtc_state, ...@@ -5676,13 +5678,23 @@ copy_bigjoiner_crtc_state(struct intel_crtc_state *crtc_state,
memset(&crtc_state->hw, 0, sizeof(saved_state->hw)); memset(&crtc_state->hw, 0, sizeof(saved_state->hw));
crtc_state->hw.enable = from_crtc_state->hw.enable; crtc_state->hw.enable = from_crtc_state->hw.enable;
crtc_state->hw.active = from_crtc_state->hw.active; crtc_state->hw.active = from_crtc_state->hw.active;
crtc_state->hw.mode = from_crtc_state->hw.mode;
crtc_state->hw.pipe_mode = from_crtc_state->hw.pipe_mode; crtc_state->hw.pipe_mode = from_crtc_state->hw.pipe_mode;
crtc_state->hw.adjusted_mode = from_crtc_state->hw.adjusted_mode; crtc_state->hw.adjusted_mode = from_crtc_state->hw.adjusted_mode;
crtc_state->hw.scaling_filter = from_crtc_state->hw.scaling_filter;
drm_property_replace_blob(&crtc_state->hw.degamma_lut,
from_crtc_state->hw.degamma_lut);
drm_property_replace_blob(&crtc_state->hw.gamma_lut,
from_crtc_state->hw.gamma_lut);
drm_property_replace_blob(&crtc_state->hw.ctm,
from_crtc_state->hw.ctm);
/* Some fixups */ /* Some fixups */
crtc_state->uapi.mode_changed = from_crtc_state->uapi.mode_changed; crtc_state->uapi.mode_changed = from_crtc_state->uapi.mode_changed;
crtc_state->uapi.connectors_changed = from_crtc_state->uapi.connectors_changed; crtc_state->uapi.connectors_changed = from_crtc_state->uapi.connectors_changed;
crtc_state->uapi.active_changed = from_crtc_state->uapi.active_changed; crtc_state->uapi.active_changed = from_crtc_state->uapi.active_changed;
crtc_state->uapi.color_mgmt_changed = from_crtc_state->uapi.color_mgmt_changed;
crtc_state->nv12_planes = crtc_state->c8_planes = crtc_state->update_planes = 0; crtc_state->nv12_planes = crtc_state->c8_planes = crtc_state->update_planes = 0;
crtc_state->bigjoiner_linked_crtc = to_intel_crtc(from_crtc_state->uapi.crtc); crtc_state->bigjoiner_linked_crtc = to_intel_crtc(from_crtc_state->uapi.crtc);
crtc_state->bigjoiner_slave = true; crtc_state->bigjoiner_slave = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment