From patchwork Wed Apr 24 15:36:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anisse Astier X-Patchwork-Id: 2485151 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id C8AB8DF25A for ; Wed, 24 Apr 2013 15:45:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BDEFDE62C8 for ; Wed, 24 Apr 2013 08:45:25 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 052AFE60CD for ; Wed, 24 Apr 2013 08:45:03 -0700 (PDT) Received: by mail-wi0-f175.google.com with SMTP id h11so7564959wiv.8 for ; Wed, 24 Apr 2013 08:45:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=BQ6MCD81xk6ajXzL6XDi7es+nNm+b6UfBGOzowFwuHE=; b=hU5ERfUk1rzmgcJa6Cj/cprJdyjovI94h2hFb850OYAUhoAUw90//yHt6ytkkA6kq9 oVOvgS57a3IVOs+NkxFbZA2+HPU0Q8vPJLWxE7oQEYbHK4ClvCeSCEsq8+HB2nxCzK/n 6rGeNxUlJ2cE7Ys22+Y1Qd8CZm6puA4iWpylSLWYH7FpYsGPjosd4mcJtRL6i7pHWBEI /sWrXL/RB73oZLNE9dnC79vYxZ8FScnYK9G8KVOFKFWoNMIUmrhCdWo+C+SCVNqM1CtP v9p4j8Nc31Wq/k/w7mj+MtQEmta8/T6WyNPrTs5UzslUev6bAfH0gwo8/u1ZxUCMTF6U pGwA== X-Received: by 10.181.11.196 with SMTP id ek4mr3318295wid.30.1366818302900; Wed, 24 Apr 2013 08:45:02 -0700 (PDT) Received: from compilator-1.substantiel.local (mar92-17-78-228-214-160.fbx.proxad.net. [78.228.214.160]) by mx.google.com with ESMTPSA id fp2sm33143847wib.7.2013.04.24.08.44.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 24 Apr 2013 08:45:00 -0700 (PDT) From: Anisse Astier To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/gma500: fix backlight hotkeys behaviour on cedarview netbooks Date: Wed, 24 Apr 2013 17:36:01 +0200 Message-Id: <1366817761-17964-1-git-send-email-anisse@astier.eu> X-Mailer: git-send-email 1.8.1.4 X-Gm-Message-State: ALoCoQmjwmS2adcmd4EiPL1YbhvrOIpXLtx2Shg2p92QWDDK6kW1YwuODDLL67BbPDWCgg10vy0G X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Backlight hotkeys weren't working before on certain cedartrail laptops. The source of this problem is that the hotkeys' ASLE opregion interrupts were simply ignored. Driver seemed to expect the interrupt to be associated with a pipe, but it wasn't. Accepting the ASLE interrupt without an associated pipe event flag fixes the issue, the backlight code is called when needed, making the brightness keys work properly. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=833597 Reference: http://lists.freedesktop.org/archives/dri-devel/2012-July/025279.html Cc: stable@kernel.org Signed-off-by: Anisse Astier --- drivers/gpu/drm/gma500/psb_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/psb_irq.c b/drivers/gpu/drm/gma500/psb_irq.c index 8652cdf..029eccf 100644 --- a/drivers/gpu/drm/gma500/psb_irq.c +++ b/drivers/gpu/drm/gma500/psb_irq.c @@ -211,7 +211,7 @@ irqreturn_t psb_irq_handler(DRM_IRQ_ARGS) vdc_stat = PSB_RVDC32(PSB_INT_IDENTITY_R); - if (vdc_stat & _PSB_PIPE_EVENT_FLAG) + if (vdc_stat & (_PSB_PIPE_EVENT_FLAG|_PSB_IRQ_ASLE)) dsp_int = 1; /* FIXME: Handle Medfield