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: 71227 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp292613qgy; Thu, 30 Jun 2016 02:23:42 -0700 (PDT) X-Received: by 10.66.157.8 with SMTP id wi8mr19658594pab.21.1467278622204; Thu, 30 Jun 2016 02:23:42 -0700 (PDT) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id ea17si3638529pac.171.2016.06.30.02.23.41; Thu, 30 Jun 2016 02:23:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org 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" 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; }