Commit 6e22c35d authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915/audio: Nuke intel_eld_uptodate()

No idea why we do this ELD comparions on g4x before loading
the new ELD. Seems entirely pointless so just get rid of it.

Cc: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-9-ville.syrjala@linux.intel.com
parent 9f4a5125
...@@ -304,33 +304,6 @@ static int audio_config_hdmi_get_n(const struct intel_crtc_state *crtc_state, ...@@ -304,33 +304,6 @@ static int audio_config_hdmi_get_n(const struct intel_crtc_state *crtc_state,
return 0; return 0;
} }
static bool intel_eld_uptodate(struct drm_connector *connector,
i915_reg_t reg_eldv, u32 bits_eldv,
i915_reg_t reg_elda, u32 bits_elda,
i915_reg_t reg_edid)
{
struct drm_i915_private *i915 = to_i915(connector->dev);
const u8 *eld = connector->eld;
u32 tmp;
int i;
tmp = intel_de_read(i915, reg_eldv);
tmp &= bits_eldv;
if (!tmp)
return false;
tmp = intel_de_read(i915, reg_elda);
tmp &= ~bits_elda;
intel_de_write(i915, reg_elda, tmp);
for (i = 0; i < drm_eld_size(eld) / 4; i++)
if (intel_de_read(i915, reg_edid) != *((const u32 *)eld + i))
return false;
return true;
}
static void g4x_audio_codec_disable(struct intel_encoder *encoder, static void g4x_audio_codec_disable(struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state, const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state) const struct drm_connector_state *old_conn_state)
...@@ -354,12 +327,6 @@ static void g4x_audio_codec_enable(struct intel_encoder *encoder, ...@@ -354,12 +327,6 @@ static void g4x_audio_codec_enable(struct intel_encoder *encoder,
u32 tmp; u32 tmp;
int len, i; int len, i;
if (intel_eld_uptodate(connector,
G4X_AUD_CNTL_ST, G4X_ELD_VALID,
G4X_AUD_CNTL_ST, G4X_ELD_ADDRESS_MASK,
G4X_HDMIW_HDMIEDID))
return;
tmp = intel_de_read(i915, G4X_AUD_CNTL_ST); tmp = intel_de_read(i915, G4X_AUD_CNTL_ST);
tmp &= ~(G4X_ELD_VALID | G4X_ELD_ADDRESS_MASK); tmp &= ~(G4X_ELD_VALID | G4X_ELD_ADDRESS_MASK);
len = REG_FIELD_GET(G4X_ELD_BUFFER_SIZE_MASK, tmp); len = REG_FIELD_GET(G4X_ELD_BUFFER_SIZE_MASK, tmp);
......
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