From patchwork Tue Mar 31 10:22:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 6128451 Return-Path: X-Original-To: patchwork-linux-rockchip@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 A4AC89F399 for ; Tue, 31 Mar 2015 10:24:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA4B7201B4 for ; Tue, 31 Mar 2015 10:24:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA78920173 for ; Tue, 31 Mar 2015 10:24:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YctLG-0002fH-Om; Tue, 31 Mar 2015 10:24:18 +0000 Received: from va-smtp01.263.net ([54.88.144.211]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YctKk-0002Xj-V2; Tue, 31 Mar 2015 10:23:49 +0000 Received: from linux.quantacn.com (localhost.localdomain [127.0.0.1]) by va-smtp01.263.net (Postfix) with ESMTP id A9A727F943; Tue, 31 Mar 2015 18:23:18 +0800 (CST) X-RL-SENDER: wxt@rock-chips.com X-SENDER-IP: 127.0.0.1 X-LOGIN-NAME: wxt@rock-chips.com X-UNIQUE-TAG: <1ac62bf5097cf3597c11a2d1d76a3c50> X-ATTACHMENT-NUM: 0 X-SENDER: wxt@rock-chips.com X-DNS-TYPE: 1 Received: from unknown (localhost [127.0.0.1]) by va-smtp01.263.net (Postfix) whith SMTP id 25228HOVWAB; Tue, 31 Mar 2015 18:23:18 +0800 (CST) From: Caesar Wang To: David Airlie , Heiko Stuebner , Daniel Kurtz , Mark Yao Subject: [PATCH] drm: rockchip: Turn off VT switching on suspend Date: Tue, 31 Mar 2015 18:22:50 +0800 Message-Id: <1427797370-32441-2-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427797370-32441-1-git-send-email-wxt@rock-chips.com> References: <1427797370-32441-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150331_032347_111291_00007872 X-CRM114-Status: UNSURE ( 5.25 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.7 (+) Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Rob Clark , Daniel Vetter , linux-arm-kernel@lists.infradead.org, Caesar Wang X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_BLACK autolearn=ham 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 drm/rockchip already has support for disabling all displays on suspend and enabling them on resume. Disable automatic VT switching on suspend by the pm console tracking layer. Tested on veyron, used `echo mem > sys/power/state` => verified no VT switch Reviewed-by: Daniel Kurtz Signed-off-by: Caesar Wang --- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c index a5d889a..eb4e0db 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c @@ -119,6 +119,9 @@ static int rockchip_drm_fbdev_create(struct drm_fb_helper *helper, DRM_DEBUG_KMS("FB [%dx%d]-%d kvaddr=%p offset=%ld size=%d\n", fb->width, fb->height, fb->depth, rk_obj->kvaddr, offset, size); + + fbi->skip_vt_switch = true; + return 0; err_drm_framebuffer_unref: