From patchwork Thu Feb 4 09:30:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 61164 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp348571lbl; Thu, 4 Feb 2016 01:31:27 -0800 (PST) X-Received: by 10.66.142.73 with SMTP id ru9mr9313205pab.121.1454578287041; Thu, 04 Feb 2016 01:31:27 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id fk1si15591245pad.35.2016.02.04.01.31.26; Thu, 04 Feb 2016 01:31:27 -0800 (PST) Received-SPF: pass (google.com: 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; spf=pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C0EC16E827; Thu, 4 Feb 2016 01:31:25 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by gabe.freedesktop.org (Postfix) with ESMTPS id C6B276E827 for ; Thu, 4 Feb 2016 01:31:24 -0800 (PST) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u149VK18027692; Thu, 4 Feb 2016 03:31:20 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u149VKsm009454; Thu, 4 Feb 2016 03:31:20 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Thu, 4 Feb 2016 03:31:20 -0600 Received: from imryr.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u149VGFM011930; Thu, 4 Feb 2016 03:31:18 -0600 From: Jyri Sarha To: Subject: [PATCH 01/21] drm/tilcdc: disable console switching during pm operations Date: Thu, 4 Feb 2016 11:30:54 +0200 Message-ID: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 Cc: Jyri Sarha , Darren Etheridge , tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com 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" From: Darren Etheridge The default behavior of consoles during power management operations is: On entry to suspend a new console is allocated and switched to. On resume the original console is restored. However this isn't the observed behavior and the original console is not restored. This commit avoids the problem by disabling the switching of consoles at suspend/resume. This works because the driver already restores all necessary hardware context during such pm operations. Signed-off-by: Darren Etheridge Signed-off-by: Jyri Sarha --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index d7f5b89..90ed233 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -18,6 +18,7 @@ /* LCDC DRM driver, based on da8xx-fb */ #include +#include #include "tilcdc_drv.h" #include "tilcdc_regs.h" @@ -229,6 +230,14 @@ static int tilcdc_load(struct drm_device *dev, unsigned long flags) pm_runtime_enable(dev->dev); pm_runtime_irq_safe(dev->dev); + /* + * disable creation of new console during suspend. + * this works around a problem where a ctrl-c is needed + * to be entered on the VT to actually get the device + * to continue into the suspend state. + */ + pm_set_vt_switch(0); + /* Determine LCD IP Version */ pm_runtime_get_sync(dev->dev); switch (tilcdc_read(dev, LCDC_PID_REG)) {