Commit ac240288 authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/i915: Remove all ->config dereferences from intel_hdmi, v2.

In all cases we can now obtain the relevant crtc_state/conn_state
from the relevant callbacks, which means all the ->config accesses
can be removed and the code cleaned up.

Changes since v1:
- cstate -> crtc_state
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/8b02a6b4-606a-e43a-b357-ad17f491525b@linux.intel.com
[mlankhorst: Reinstate missing comment]
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent 9780aad5
...@@ -1701,7 +1701,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder, ...@@ -1701,7 +1701,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder, static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
bool has_hdmi_sink, bool has_hdmi_sink,
struct drm_display_mode *adjusted_mode, const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state,
struct intel_shared_dpll *pll) struct intel_shared_dpll *pll)
{ {
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
...@@ -1721,7 +1722,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder, ...@@ -1721,7 +1722,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
intel_hdmi->set_infoframes(drm_encoder, intel_hdmi->set_infoframes(drm_encoder,
has_hdmi_sink, has_hdmi_sink,
adjusted_mode); crtc_state, conn_state);
} }
static void intel_ddi_pre_enable(struct intel_encoder *intel_encoder, static void intel_ddi_pre_enable(struct intel_encoder *intel_encoder,
...@@ -1742,8 +1743,8 @@ static void intel_ddi_pre_enable(struct intel_encoder *intel_encoder, ...@@ -1742,8 +1743,8 @@ static void intel_ddi_pre_enable(struct intel_encoder *intel_encoder,
} }
if (type == INTEL_OUTPUT_HDMI) { if (type == INTEL_OUTPUT_HDMI) {
intel_ddi_pre_enable_hdmi(intel_encoder, intel_ddi_pre_enable_hdmi(intel_encoder,
crtc->config->has_hdmi_sink, pipe_config->has_hdmi_sink,
&crtc->config->base.adjusted_mode, pipe_config, conn_state,
crtc->config->shared_dpll); crtc->config->shared_dpll);
} }
} }
......
...@@ -842,11 +842,13 @@ struct intel_hdmi { ...@@ -842,11 +842,13 @@ struct intel_hdmi {
enum hdmi_picture_aspect aspect_ratio; enum hdmi_picture_aspect aspect_ratio;
struct intel_connector *attached_connector; struct intel_connector *attached_connector;
void (*write_infoframe)(struct drm_encoder *encoder, void (*write_infoframe)(struct drm_encoder *encoder,
const struct intel_crtc_state *crtc_state,
enum hdmi_infoframe_type type, enum hdmi_infoframe_type type,
const void *frame, ssize_t len); const void *frame, ssize_t len);
void (*set_infoframes)(struct drm_encoder *encoder, void (*set_infoframes)(struct drm_encoder *encoder,
bool enable, bool enable,
const struct drm_display_mode *adjusted_mode); const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state);
bool (*infoframe_enabled)(struct drm_encoder *encoder, bool (*infoframe_enabled)(struct drm_encoder *encoder,
const struct intel_crtc_state *pipe_config); const struct intel_crtc_state *pipe_config);
}; };
......
This diff is collapsed.
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