[Intel-gfx] [PATCH 08/22] drm/i915/audio: Nuke intel_eld_uptodate()
Ville Syrjala
ville.syrjala at linux.intel.com
Tue Oct 11 16:59:57 UTC 2022
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
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 at intel.com>
Cc: Kai Vehmanen <kai.vehmanen at linux.intel.com>
Cc: Takashi Iwai <tiwai at suse.de>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_audio.c | 33 ----------------------
1 file changed, 33 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
index 9a286d70e281..3f328913fc90 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_audio.c
@@ -304,33 +304,6 @@ static int audio_config_hdmi_get_n(const struct intel_crtc_state *crtc_state,
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,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
@@ -354,12 +327,6 @@ static void g4x_audio_codec_enable(struct intel_encoder *encoder,
u32 tmp;
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 &= ~(G4X_ELD_VALID | G4X_ELD_ADDRESS_MASK);
len = REG_FIELD_GET(G4X_ELD_BUFFER_SIZE_MASK, tmp);
--
2.35.1
More information about the Intel-gfx
mailing list