Re: [PATCH 3/3 v2] drm/i915: hot plug/unplug notification to HDMI audio driver

2011-11-24 Thread Wu Fengguang
On Thu, Nov 24, 2011 at 03:26:49AM +0800, Keith Packard wrote: On Wed, 23 Nov 2011 16:29:58 +0800, Wu Fengguang fengguang...@intel.com wrote: What I need is a hot plug hook that knows whether the monitor is plugged or removed, which is only possible if the hook is called after

Re: [PATCH 3/3 v2] drm/i915: hot plug/unplug notification to HDMI audio driver

2011-11-23 Thread Wu Fengguang
On Wed, Nov 23, 2011 at 02:25:14AM +0800, Keith Packard wrote: On Tue, 22 Nov 2011 15:40:55 +0800, Wu Fengguang fengguang...@intel.com wrote: So the v3 patch will behave equally well on KMS console, gnome desktop and bare X. Shall we just use it, or go back and use the original

Re: [PATCH 3/3 v2] drm/i915: hot plug/unplug notification to HDMI audio driver

2011-11-23 Thread Keith Packard
On Wed, 23 Nov 2011 16:29:58 +0800, Wu Fengguang fengguang...@intel.com wrote: What I need is a hot plug hook that knows whether the monitor is plugged or removed, which is only possible if the hook is called after -detect(). That would be mode_set to tell you that the monitor is in use, and

Re: [PATCH 3/3 v2] drm/i915: hot plug/unplug notification to HDMI audio driver

2011-11-22 Thread Wu Fengguang
The X environment will eventually call mode_set when the user environment decides to use the monitor. Any audio bits can, and should, await the user's choice of a video mode before choosing the audio format to use. We should not be adding eld information until the monitor is in use.

Re: [PATCH 3/3 v2] drm/i915: hot plug/unplug notification to HDMI audio driver

2011-11-22 Thread Keith Packard
On Tue, 22 Nov 2011 15:40:55 +0800, Wu Fengguang fengguang...@intel.com wrote: So the v3 patch will behave equally well on KMS console, gnome desktop and bare X. Shall we just use it, or go back and use the original -hot_remove patch? I'm not sure why we need any change to the core DRM code.

Re: [PATCH 3/3 v2] drm/i915: hot plug/unplug notification to HDMI audio driver

2011-11-21 Thread Keith Packard
On Mon, 21 Nov 2011 14:37:49 +0800, Wu Fengguang fengguang...@intel.com wrote: On monitor hot plug/unplug, update ELD and set/clear SDVO_AUDIO_ENABLE or DP_AUDIO_OUTPUT_ENABLE accordingly. So that the audio driver will receive hot plug events and take action to refresh its device state and

Re: [PATCH 3/3 v2] drm/i915: hot plug/unplug notification to HDMI audio driver

2011-11-21 Thread Wu Fengguang
On Tue, Nov 22, 2011 at 12:55:43AM +0800, Keith Packard wrote: On Mon, 21 Nov 2011 14:37:49 +0800, Wu Fengguang fengguang...@intel.com wrote: On monitor hot plug/unplug, update ELD and set/clear SDVO_AUDIO_ENABLE or DP_AUDIO_OUTPUT_ENABLE accordingly. So that the audio driver will