lkml.org 
[lkml]   [2009]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 39/43] drm/i915: dont enable vblanks on disabled pipes
    2.6.28-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Jesse Barnes <jbarnes@virtuousgeek.org>

    commit 71e0ffa599f54058d9b8724b4b14d0486751681d upstream.

    In some cases userland may be confused and try to wait on vblank events from
    pipes that aren't actually enabled. We shouldn't allow this, so return
    -EINVAL if the pipe isn't on.

    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Dave Airlie <airlied@linux.ie>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/gpu/drm/i915/i915_irq.c | 6 ++++++
    1 file changed, 6 insertions(+)

    --- a/drivers/gpu/drm/i915/i915_irq.c
    +++ b/drivers/gpu/drm/i915/i915_irq.c
    @@ -400,6 +400,12 @@ int i915_enable_vblank(struct drm_device
    {
    drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
    unsigned long irqflags;
    + int pipeconf_reg = (pipe == 0) ? PIPEACONF : PIPEBCONF;
    + u32 pipeconf;
    +
    + pipeconf = I915_READ(pipeconf_reg);
    + if (!(pipeconf & PIPEACONF_ENABLE))
    + return -EINVAL;

    spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
    if (IS_I965G(dev))



    \
     
     \ /
      Last update: 2009-03-21 00:45    [W:0.022 / U:90.232 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site