Commit d806fbf5 authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter

drm/i915/audio: remove misleading checks for !eld[0]

We'll never end up in the hooks with eld[0] unset, as that's checked by
drm_select_eld().
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 69bfe1a9
...@@ -79,9 +79,6 @@ static bool intel_eld_uptodate(struct drm_connector *connector, ...@@ -79,9 +79,6 @@ static bool intel_eld_uptodate(struct drm_connector *connector,
tmp = I915_READ(reg_eldv); tmp = I915_READ(reg_eldv);
tmp &= bits_eldv; tmp &= bits_eldv;
if (!eld[0])
return !tmp;
if (!tmp) if (!tmp)
return false; return false;
...@@ -123,9 +120,6 @@ static void g4x_audio_codec_enable(struct drm_connector *connector, ...@@ -123,9 +120,6 @@ static void g4x_audio_codec_enable(struct drm_connector *connector,
len = (tmp >> 9) & 0x1f; /* ELD buffer size */ len = (tmp >> 9) & 0x1f; /* ELD buffer size */
I915_WRITE(G4X_AUD_CNTL_ST, tmp); I915_WRITE(G4X_AUD_CNTL_ST, tmp);
if (!eld[0])
return;
len = min_t(int, eld[2], len); len = min_t(int, eld[2], len);
DRM_DEBUG_DRIVER("ELD size %d\n", len); DRM_DEBUG_DRIVER("ELD size %d\n", len);
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
...@@ -207,9 +201,6 @@ static void hsw_audio_codec_enable(struct drm_connector *connector, ...@@ -207,9 +201,6 @@ static void hsw_audio_codec_enable(struct drm_connector *connector,
tmp &= ~eldv; tmp &= ~eldv;
I915_WRITE(aud_cntrl_st2, tmp); I915_WRITE(aud_cntrl_st2, tmp);
if (!eld[0])
return;
tmp = I915_READ(aud_cntl_st); tmp = I915_READ(aud_cntl_st);
tmp &= ~IBX_ELD_ADDRESS; tmp &= ~IBX_ELD_ADDRESS;
I915_WRITE(aud_cntl_st, tmp); I915_WRITE(aud_cntl_st, tmp);
...@@ -304,9 +295,6 @@ static void ilk_audio_codec_enable(struct drm_connector *connector, ...@@ -304,9 +295,6 @@ static void ilk_audio_codec_enable(struct drm_connector *connector,
tmp &= ~eldv; tmp &= ~eldv;
I915_WRITE(aud_cntrl_st2, tmp); I915_WRITE(aud_cntrl_st2, tmp);
if (!eld[0])
return;
tmp = I915_READ(aud_cntl_st); tmp = I915_READ(aud_cntl_st);
tmp &= ~IBX_ELD_ADDRESS; tmp &= ~IBX_ELD_ADDRESS;
I915_WRITE(aud_cntl_st, tmp); I915_WRITE(aud_cntl_st, 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