From patchwork Thu Jan 22 23:34:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haixia Shi X-Patchwork-Id: 5689311 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2081DC058D for ; Thu, 22 Jan 2015 23:34:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59BA120272 for ; Thu, 22 Jan 2015 23:34:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7A2DB2026F for ; Thu, 22 Jan 2015 23:34:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 264506E3BC; Thu, 22 Jan 2015 15:34:31 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ig0-f171.google.com (mail-ig0-f171.google.com [209.85.213.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 823E46E3BC for ; Thu, 22 Jan 2015 15:34:29 -0800 (PST) Received: by mail-ig0-f171.google.com with SMTP id r10so3324171igi.4 for ; Thu, 22 Jan 2015 15:34:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=uBunabnuKzQ68YZ1P4v8a/D7SwzdEVCBFqViLFAXHpc=; b=BdzHN28vkc5pwc9zj2Bs1+6jsUy1v4gpXaAy7Z+SI1xMNptB9pSKMcJ7WPYQ7i9SkJ jBQmgZ9G06bFy9hIUit0klzBErDbJdTLt3PqQc5jxAkRK8fl9xBiV68eLi2miAqVRm6n AtMupjbuozr7u2ZxIIE+Hc5Op/D82jgxgOy7A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=uBunabnuKzQ68YZ1P4v8a/D7SwzdEVCBFqViLFAXHpc=; b=j7X2EK3ODM+IPdaCy01VT9GXeelLCSapXju2fCg58yoRw5t6hQbDE5LCZxcJJmkVOr d4ND2COg9Irl0kYzLho2eruG0NUfIGuz4b8un7zE854ipOs9H2mS6GnBRofeaYV+/KcN 72FQw+PuEWWT8DBRqo96wOhvG+V23E3pMLRvHvWGDWjINzv3y2f0SNXwRpYV+0qf0lNS noykE+Dps3tPCSsmToHuBS190X6L+uCjELAXk5Dk1as4s2kRd775FG4cizfSssbcDjad yfPvJEvphcr4K3vg1Xbh6dZ5xwmsKV1mLdZQ+ZZYt4pyLmigFcpqLXTEQh2kdlEJn9iw Vf7Q== X-Gm-Message-State: ALoCoQmgvNLV0d2dH2FfkHJKqwMJuF1tZ3VpF1QUcG2p9A3p4msMPCLbfMnUf5P7/xMXJjL6vnZs X-Received: by 10.50.134.195 with SMTP id pm3mr40372830igb.0.1421969669038; Thu, 22 Jan 2015 15:34:29 -0800 (PST) Received: from localhost ([2620:0:1000:1600:b1ce:abf6:16d6:2e4c]) by mx.google.com with ESMTPSA id hi15sm3891630igb.19.2015.01.22.15.34.27 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 22 Jan 2015 15:34:28 -0800 (PST) From: Haixia Shi To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/udl: properly set active_16 flag in udl_crtc_page_flip(). Date: Thu, 22 Jan 2015 15:34:25 -0800 Message-Id: <1421969665-33499-1-git-send-email-hshi@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c MIME-Version: 1.0 Cc: Haixia Shi X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When page flipping, we need to mark the new fb as active and unmark the active flag for the old fb (if different). Signed-off-by: Haixia Shi Reviewed-by: Stéphane Marchesin --- drivers/gpu/drm/udl/udl_modeset.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index 1701f1d..a9c611a 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c @@ -340,11 +340,11 @@ static int udl_crtc_mode_set(struct drm_crtc *crtc, wrptr = udl_dummy_render(wrptr); - ufb->active_16 = true; if (old_fb) { struct udl_framebuffer *uold_fb = to_udl_fb(old_fb); uold_fb->active_16 = false; } + ufb->active_16 = true; udl->mode_buf_len = wrptr - buf; /* damage all of it */ @@ -373,6 +373,13 @@ static int udl_crtc_page_flip(struct drm_crtc *crtc, struct drm_device *dev = crtc->dev; unsigned long flags; + struct drm_framebuffer *old_fb = crtc->fb; + if (old_fb) { + struct udl_framebuffer *uold_fb = to_udl_fb(old_fb); + uold_fb->active_16 = false; + } + ufb->active_16 = true; + udl_handle_damage(ufb, 0, 0, fb->width, fb->height); spin_lock_irqsave(&dev->event_lock, flags);