X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=linux-core%2Fi915_opregion.c;h=015376f86adc48b77404a8a78a3b6dbdba8149cc;hb=1d2bb68d28fe39746299ee8ddb664a62de839b0c;hp=e691571a848be352d0a12d7a98dfe5a42e4cf966;hpb=514c05cebe31a62f827a76f348d35596bef97811;p=platform%2Fupstream%2Flibdrm.git diff --git a/linux-core/i915_opregion.c b/linux-core/i915_opregion.c index e691571..015376f 100644 --- a/linux-core/i915_opregion.c +++ b/linux-core/i915_opregion.c @@ -249,19 +249,20 @@ void opregion_enable_asle(struct drm_device *dev) struct opregion_asle *asle = dev_priv->opregion.asle; if (asle) { - u32 pipeb_stats = I915_READ(PIPEBSTAT); if (IS_MOBILE(dev)) { + u32 pipeb_stats = I915_READ(PIPEBSTAT); /* Some hardware uses the legacy backlight controller to signal interrupts, so we need to set up pipe B to generate an IRQ on writes */ - I915_WRITE(PIPEBSTAT, pipeb_stats |= - I915_LEGACY_BLC_EVENT_ENABLE); - dev_priv->irq_enable_reg |= - (I915_ASLE_INTERRUPT - | I915_DISPLAY_PIPE_B_EVENT_INTERRUPT); - } else - dev_priv->irq_enable_reg |= I915_ASLE_INTERRUPT; - + pipeb_stats |= I915_LEGACY_BLC_EVENT_ENABLE; + I915_WRITE(PIPEBSTAT, pipeb_stats); + + dev_priv->irq_mask_reg &= + ~I915_DISPLAY_PIPE_B_EVENT_INTERRUPT; + } + + dev_priv->irq_mask_reg &= ~I915_ASLE_INTERRUPT; + asle->tche = ASLE_ALS_EN | ASLE_BLC_EN | ASLE_PFIT_EN | ASLE_PFMB_EN; asle->ardy = 1;