From patchwork Thu Jun 30 09:23:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinliang Liu X-Patchwork-Id: 9207069 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46FBF60752 for ; Thu, 30 Jun 2016 09:23:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3710028660 for ; Thu, 30 Jun 2016 09:23:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B8D128673; Thu, 30 Jun 2016 09:23:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62F7028660 for ; Thu, 30 Jun 2016 09:23:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 99F866E01F; Thu, 30 Jun 2016 09:23:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x22a.google.com (mail-pf0-x22a.google.com [IPv6:2607:f8b0:400e:c00::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 59B666E01F for ; Thu, 30 Jun 2016 09:23:39 +0000 (UTC) Received: by mail-pf0-x22a.google.com with SMTP id t190so27735235pfb.3 for ; Thu, 30 Jun 2016 02:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=qzlTyqYVCecSnVfFexnVd/5OJwPaLVowNHMMYRLc+3M=; b=M7eVlqWdPXBHlbuBvTTQJow8Tfr0h56nyLIhTzGx1NwH3p7E88t2iyJSEvK7FPbr8x ReZ1a37js7BgnQvsBAxIzlzXDzmthnfAu5CZ4K4/cqtNL32kSWNLokfd6Z6s/7f15T6r 9FSrHIlOtLpkvSf1J+EF1CB0fZ7QzTa3Jjf5A= 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; bh=qzlTyqYVCecSnVfFexnVd/5OJwPaLVowNHMMYRLc+3M=; b=Ty8mA0CKtLbzPL6dJnnHqUJqYUbiXtWbMtUPy7gwTKQkdngIcRwyIAFNGzFPDlKxTr Ch39ZLm1HzhsT7S+w46omeAKodyS7ySkDptcfNPn4KKUhQU90XSMgKO4ZEsMMBpRHE6j nuJFMA6ZpSyMVtToA8/8Y4Lr52qFBJOesjkT8aiLiaiewGMOrHI9FskbbRSsN57EB6Aw QFiW4KHRiijzC1Z6tEDa/uLE/ITn8NhReh7xpOgqLUp0JhEuZP8XtOvhOMng5wPXCp8q yUB7jNJzlfKDaNuhw3ItC4oR/4vNUr+L1y3IUzNu6pD1rgprYYdTUo4smH/pZ6dP/veq PN1g== X-Gm-Message-State: ALyK8tJytChHRHGVnQsb1wTyYZ1ldPXXRFRXrP+TnZTy+WsCD7/tx6OD+tM0O27r6mB3ZVOw X-Received: by 10.98.104.68 with SMTP id d65mr19478563pfc.34.1467278618911; Thu, 30 Jun 2016 02:23:38 -0700 (PDT) Received: from HTSAT-OPENLAB-SERVER.localdomain ([14.154.189.122]) by smtp.gmail.com with ESMTPSA id b185sm3934410pfb.55.2016.06.30.02.23.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Jun 2016 02:23:38 -0700 (PDT) From: Xinliang Liu To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/hisilicon: Fix ADE vblank on/off handling Date: Thu, 30 Jun 2016 17:23:00 +0800 Message-Id: <20160630092300.141864-1-xinliang.liu@linaro.org> X-Mailer: git-send-email 2.8.3 Cc: guodong.xu@linaro.org 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Vblank turn on should be called in crtc's enable callback. And turn off called in crtc's disable callback. Thanks to Daniel Vetter, this bug is reported by him. Reported-by: Daniel Vetter Signed-off-by: Xinliang Liu --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index ed76baad525f..805f4326fafe 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -487,6 +487,7 @@ static void ade_crtc_enable(struct drm_crtc *crtc) ade_set_medianoc_qos(acrtc); ade_display_enable(acrtc); ade_dump_regs(ctx->base); + drm_crtc_vblank_on(crtc); acrtc->enable = true; } @@ -498,6 +499,7 @@ static void ade_crtc_disable(struct drm_crtc *crtc) if (!acrtc->enable) return; + drm_crtc_vblank_off(crtc); ade_power_down(ctx); acrtc->enable = false; }