From patchwork Fri Jan 30 18:57:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Haixia Shi X-Patchwork-Id: 5752431 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 875439F358 for ; Fri, 30 Jan 2015 18:57:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C61D72017E for ; Fri, 30 Jan 2015 18:57:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EAB052025B for ; Fri, 30 Jan 2015 18:57:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BA01720A3; Fri, 30 Jan 2015 10:57:32 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by gabe.freedesktop.org (Postfix) with ESMTP id A5371720A3 for ; Fri, 30 Jan 2015 10:57:31 -0800 (PST) Received: by mail-ie0-f172.google.com with SMTP id at20so5464348iec.3 for ; Fri, 30 Jan 2015 10:57:31 -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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=0ubCFhK84YQD3tHCWPCUOELvAZyw4FUnCZgbnPVWBfc=; b=TgrVrFUPlyNonOUzwMOQY6LQeGN7mPUbpXnx5F0v/QLNOn/6yUrLmsK4zZc/yl/Kgu hnA/qonATI1cawNHm8d4NnN1POM6MiDhiqK/vCuhxNFPVc4E7ANN1n27Jqjuel6eO9HO jflXbALj5aHE/zUR5Zrue4oGh4Q7zXv3pjstA= 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:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=0ubCFhK84YQD3tHCWPCUOELvAZyw4FUnCZgbnPVWBfc=; b=IVVsDRwYa2EP/JRAjbbZrpOQJXyhxKCOcN8BFQQxn1QAlPeqvdQBMN/jmRaIWnOndy tggZ+Oo2V4LSs3M0ngxZH6queNxaIRVF7iwRicxjziMdGqrrWmn6Zazs7S2so7u/wEhD Ksn7fkXVFNDjdk2LXr7WisBTo8Vii92dA1L+iZxmXan2mv/SVSNsyZAbsDeMo5eAtoCp dmmXwAbJr7cQPxzhGRZIYIvTfqPD4m4CIji/Oy3HpCFAPiYqV3wp6jFcZ8cZWam7Kg1E nJK2PC+/PKya6II8L+IfLadcLcYDPesRZ9LyUITl9v5eFNrQpG5ILURuaK0op5RhXxyq gLVw== X-Gm-Message-State: ALoCoQlk+iHbl8gRLtPzXSj/kSSlbuJLqRK7U4dJC6ZREEFFaQwHS7BnZHcIX1T4nX5hhjdp31JT X-Received: by 10.42.102.66 with SMTP id h2mr7709058ico.88.1422644251066; Fri, 30 Jan 2015 10:57:31 -0800 (PST) Received: from localhost ([2620:0:1000:1600:4c85:5ef9:b599:2f24]) by mx.google.com with ESMTPSA id jj2sm1587906igb.1.2015.01.30.10.57.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 30 Jan 2015 10:57:30 -0800 (PST) From: Haixia Shi To: dri-devel Subject: [PATCH] drm/udl: properly set active_16 flag in udl_crtc_page_flip(). (v2) Date: Fri, 30 Jan 2015 10:57:27 -0800 Message-Id: <1422644248-4788-1-git-send-email-hshi@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1421969665-33499-1-git-send-email-hshi@chromium.org> References: <1421969665-33499-1-git-send-email-hshi@chromium.org> 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..677190a6 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->primary->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);