drm/i915/audio: Read ELD buffer size from hardware
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Oct 2022 17:01:44 +0000 (20:01 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 27 Oct 2022 17:19:22 +0000 (20:19 +0300)
commit1c0ab71acc83091f55f9c9091f9959d5be565dff
tree9fc52d57d73ed9c7a7412b41f79dbb54a97a3632
parent6e22c35ddaa19dcaa57bf9bfb4ca747ee7ce98a6
drm/i915/audio: Read ELD buffer size from hardware

We currently read the ELD buffer size from hardware on g4x,
but on ilk+ we just hardcode it to 84 bytes. Let's unify
this and just do the hardware readout on all platforms,
in case the size changes in the future or something.

TODO: should perhaps do the readout during driver init and
stash the results somewhere so that we could check that the
connector's ELD actually fits and not even try to enable audio
in that case...

v2: Document the size is in dwords (Jani)

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: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221026170150.2654-10-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_audio.c