[Intel-gfx] [PATCH] drm/i915: add VGA hotplug support for 945+
Jesse Barnes
jbarnes at virtuousgeek.org
Wed Apr 1 20:56:28 CEST 2009
On Wed, 01 Apr 2009 11:22:57 -0700
Eric Anholt <eric at anholt.net> wrote:
> On Tue, 2009-03-31 at 14:11 -0700, Jesse Barnes wrote:
> > Add VGA port hotplug detection to the i915 driver. When KMS is
> > enabled, plugging in or removing a VGA cable from the VGA connector
> > will generate a uevent, which indicates to userspace that it should
> > re-probe outputs on this device (to determine modes, etc.).
> >
> > Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
>
> > #define PORT_HOTPLUG_STAT 0x61114
> > diff --git a/drivers/gpu/drm/i915/intel_crt.c
> > b/drivers/gpu/drm/i915/intel_crt.c index 2b6d443..e521a60 100644
> > --- a/drivers/gpu/drm/i915/intel_crt.c
> > +++ b/drivers/gpu/drm/i915/intel_crt.c
> > @@ -182,9 +184,12 @@ static bool intel_crt_detect_hotplug(struct
> > drm_connector *connector)
> > if ((I915_READ(PORT_HOTPLUG_STAT) &
> > CRT_HOTPLUG_MONITOR_MASK) == CRT_HOTPLUG_MONITOR_COLOR)
> > - return true;
> > + ret = true;
> > +
> > + /* Clear spurious status */
> > + I915_WRITE(PORT_HOTPLUG_STAT, CRT_HOTPLUG_INT_STATUS);
> >
> > - return false;
> > + return ret;
> > }
> >
> > static bool intel_crt_detect_ddc(struct drm_connector *connector)
>
> This last hunk is weird -- why do we need to clear spurious status, if
> we haven't actually disabled interrupts around this detection (likely
> triggered by ioctl)? Won't the status have triggered a hotplug
> interrupt and thus sysfs reporting anyway?
Um good question. I think those lines can be safely dropped; they may
have been pulled over when I did the initial work and included some
bits from the 2D driver, but they seem redundant now. Should I send
another patch or do you want to clean it up?
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list