]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/audio: extend get_saved_enc() to support more scenarios
authorLibin Yang <libin.yang@linux.intel.com>
Thu, 1 Dec 2016 05:17:18 +0000 (13:17 +0800)
committerJani Nikula <jani.nikula@intel.com>
Fri, 2 Dec 2016 14:20:37 +0000 (16:20 +0200)
commit47877d55e37dcd8bf33e1e59c20c27eef4a42f31
treeba0cb138c6169e62299214bddb3760c334ae6579
parentadf1aa8c7a96781e32a736f180dff2a11a4eb8f8
drm/i915/audio: extend get_saved_enc() to support more scenarios

In initialization, audio driver will call functions get_eld() and etc.
But at that time, audio driver may not know whether it is DP MST or not.
In the original function get_saved_enc(), if it is DP MST, it requires to
set the pipe to the correct value, otherwise, pipe to be -1.

Although audio driver can get the knowledge whether it is in DP MST mode
or not by reading the codec register. It will drop performance each time
before it calls the get_eld and other similar functions. As gfx driver can
easily know whether it is in DP MST mode or not. Let's extend the
get_saved_enc() function to handle the situation that audio driver
still sends the device id info even it is in DP SST mode and return
the correct intel_encoder instead of panic.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1480569439-54252-1-git-send-email-libin.yang@intel.com
drivers/gpu/drm/i915/intel_audio.c