const struct drm_connector_state *old_conn_state)
{
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
- u32 eldv, tmp;
-
- tmp = intel_de_read(i915, G4X_AUD_VID_DID);
- if (tmp == INTEL_AUDIO_DEVBLC || tmp == INTEL_AUDIO_DEVCL)
- eldv = G4X_ELDV_DEVCL_DEVBLC;
- else
- eldv = G4X_ELDV_DEVCTG;
+ u32 tmp;
/* Invalidate ELD */
tmp = intel_de_read(i915, G4X_AUD_CNTL_ST);
- tmp &= ~eldv;
+ tmp &= ~G4X_ELDV;
intel_de_write(i915, G4X_AUD_CNTL_ST, tmp);
}
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
struct drm_connector *connector = conn_state->connector;
const u8 *eld = connector->eld;
- u32 eldv;
u32 tmp;
int len, i;
- tmp = intel_de_read(i915, G4X_AUD_VID_DID);
- if (tmp == INTEL_AUDIO_DEVBLC || tmp == INTEL_AUDIO_DEVCL)
- eldv = G4X_ELDV_DEVCL_DEVBLC;
- else
- eldv = G4X_ELDV_DEVCTG;
-
if (intel_eld_uptodate(connector,
- G4X_AUD_CNTL_ST, eldv,
+ G4X_AUD_CNTL_ST, G4X_ELDV,
G4X_AUD_CNTL_ST, G4X_ELD_ADDR_MASK,
G4X_HDMIW_HDMIEDID))
return;
tmp = intel_de_read(i915, G4X_AUD_CNTL_ST);
- tmp &= ~(eldv | G4X_ELD_ADDR_MASK);
+ tmp &= ~(G4X_ELDV | G4X_ELD_ADDR_MASK);
len = (tmp >> 9) & 0x1f; /* ELD buffer size */
intel_de_write(i915, G4X_AUD_CNTL_ST, tmp);
*((const u32 *)eld + i));
tmp = intel_de_read(i915, G4X_AUD_CNTL_ST);
- tmp |= eldv;
+ tmp |= G4X_ELDV;
intel_de_write(i915, G4X_AUD_CNTL_ST, tmp);
}
#include "i915_reg_defs.h"
-#define G4X_AUD_VID_DID _MMIO(DISPLAY_MMIO_BASE(i915) + 0x62020)
-#define INTEL_AUDIO_DEVCL 0x808629FB
-#define INTEL_AUDIO_DEVBLC 0x80862801
-#define INTEL_AUDIO_DEVCTG 0x80862802
-
#define G4X_AUD_CNTL_ST _MMIO(0x620B4)
-#define G4X_ELDV_DEVCL_DEVBLC (1 << 13)
-#define G4X_ELDV_DEVCTG (1 << 14)
+#define G4X_ELDV (1 << 14)
#define G4X_ELD_ADDR_MASK (0xf << 5)
#define G4X_ELD_ACK (1 << 4)
#define G4X_HDMIW_HDMIEDID _MMIO(0x6210C)