Commit ee230706 authored by Manasi Navare's avatar Manasi Navare

drm/i915/dp: Add from_crtc_state to copy color blobs

No functional changes here, just adds a from_crtc_state
as a prep for bigjoiner

v2:
* More prep with intel_atomic_state (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarManasi Navare <manasi.d.navare@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201113155656.17630-2-manasi.d.navare@intel.com
parent aa07c1d3
...@@ -269,14 +269,15 @@ void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state) ...@@ -269,14 +269,15 @@ void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state)
intel_crtc_put_color_blobs(crtc_state); intel_crtc_put_color_blobs(crtc_state);
} }
void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state) void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state,
const struct intel_crtc_state *from_crtc_state)
{ {
drm_property_replace_blob(&crtc_state->hw.degamma_lut, drm_property_replace_blob(&crtc_state->hw.degamma_lut,
crtc_state->uapi.degamma_lut); from_crtc_state->uapi.degamma_lut);
drm_property_replace_blob(&crtc_state->hw.gamma_lut, drm_property_replace_blob(&crtc_state->hw.gamma_lut,
crtc_state->uapi.gamma_lut); from_crtc_state->uapi.gamma_lut);
drm_property_replace_blob(&crtc_state->hw.ctm, drm_property_replace_blob(&crtc_state->hw.ctm,
crtc_state->uapi.ctm); from_crtc_state->uapi.ctm);
} }
/** /**
......
...@@ -43,7 +43,8 @@ struct drm_crtc_state *intel_crtc_duplicate_state(struct drm_crtc *crtc); ...@@ -43,7 +43,8 @@ struct drm_crtc_state *intel_crtc_duplicate_state(struct drm_crtc *crtc);
void intel_crtc_destroy_state(struct drm_crtc *crtc, void intel_crtc_destroy_state(struct drm_crtc *crtc,
struct drm_crtc_state *state); struct drm_crtc_state *state);
void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state); void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state);
void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state); void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state,
const struct intel_crtc_state *from_crtc_state);
struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev); struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
void intel_atomic_state_free(struct drm_atomic_state *state); void intel_atomic_state_free(struct drm_atomic_state *state);
void intel_atomic_state_clear(struct drm_atomic_state *state); void intel_atomic_state_clear(struct drm_atomic_state *state);
......
...@@ -13421,7 +13421,9 @@ static void ...@@ -13421,7 +13421,9 @@ static void
intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state, intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state,
struct intel_crtc_state *crtc_state) struct intel_crtc_state *crtc_state)
{ {
intel_crtc_copy_color_blobs(crtc_state); const struct intel_crtc_state *from_crtc_state = crtc_state;
intel_crtc_copy_color_blobs(crtc_state, from_crtc_state);
} }
static void static void
......
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