Commit 65c1ed30 authored by Manasi Navare's avatar Manasi Navare

drm/i915: Move encoder->get_config to a new function

No functional changes, create a separate intel_encoder_get_config()
function that calls encoder->get_config hook.
This is needed so that later we can add beigjoienr related
readout here.
Signed-off-by: default avatarManasi Navare <manasi.d.navare@intel.com>
[vsyrjala: Move the code around for the future]
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
Reviewed-by: default avatarAnimesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201112191718.16683-2-ville.syrjala@linux.intel.com
parent 6ec29d2b
...@@ -8141,6 +8141,12 @@ static void intel_crtc_compute_pixel_rate(struct intel_crtc_state *crtc_state) ...@@ -8141,6 +8141,12 @@ static void intel_crtc_compute_pixel_rate(struct intel_crtc_state *crtc_state)
ilk_pipe_pixel_rate(crtc_state); ilk_pipe_pixel_rate(crtc_state);
} }
static void intel_encoder_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *crtc_state)
{
encoder->get_config(encoder, crtc_state);
}
static int intel_crtc_compute_config(struct intel_crtc *crtc, static int intel_crtc_compute_config(struct intel_crtc *crtc,
struct intel_crtc_state *pipe_config) struct intel_crtc_state *pipe_config)
{ {
...@@ -12403,7 +12409,7 @@ intel_encoder_current_mode(struct intel_encoder *encoder) ...@@ -12403,7 +12409,7 @@ intel_encoder_current_mode(struct intel_encoder *encoder)
return NULL; return NULL;
} }
encoder->get_config(encoder, crtc_state); intel_encoder_get_config(encoder, crtc_state);
intel_mode_from_pipe_config(mode, crtc_state); intel_mode_from_pipe_config(mode, crtc_state);
...@@ -14448,7 +14454,7 @@ verify_crtc_state(struct intel_crtc *crtc, ...@@ -14448,7 +14454,7 @@ verify_crtc_state(struct intel_crtc *crtc,
pipe_name(pipe)); pipe_name(pipe));
if (active) if (active)
encoder->get_config(encoder, pipe_config); intel_encoder_get_config(encoder, pipe_config);
} }
intel_crtc_compute_pixel_rate(pipe_config); intel_crtc_compute_pixel_rate(pipe_config);
...@@ -18761,7 +18767,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) ...@@ -18761,7 +18767,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
crtc_state = to_intel_crtc_state(crtc->base.state); crtc_state = to_intel_crtc_state(crtc->base.state);
encoder->base.crtc = &crtc->base; encoder->base.crtc = &crtc->base;
encoder->get_config(encoder, crtc_state); intel_encoder_get_config(encoder, crtc_state);
if (encoder->sync_state) if (encoder->sync_state)
encoder->sync_state(encoder, crtc_state); encoder->sync_state(encoder, crtc_state);
} else { } else {
......
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