From patchwork Tue Nov 27 17:09:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10701089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 095E413AD for ; Tue, 27 Nov 2018 17:25:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC0382C5A4 for ; Tue, 27 Nov 2018 17:25:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFC2E2C5D4; Tue, 27 Nov 2018 17:25:33 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9FCC82C5A4 for ; Tue, 27 Nov 2018 17:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=W/5Hi1hHmejk9PBtxYoGcXKQnQCpf8G2nTYx1WVAMQg=; b=OuVD2bQK8qzDY8 n9vpfIteu9EN+6pQ1GRUnyzTKKE5bApciC2XEVjD/GWkvmBCxW13gJr4U3mvbInll8GQk832A2cu8 SUUHP9rDOL2WQtutNTBa9Pnpa8wr1ls/373RQ1bdOPz/uPX8s8wC3SfUzO7ByP6sjDwr/LS49WhJw r95c5XR7iojc2u7GRApmk779MhLBz0ZQcaEa9A30QyejFq7k1kFNyk7SqiDTYF0TDhxkU5Xgdktz1 M8qUX2gsH1idtREIHJxj/Ui1JDyH9rjUHqtyW2RA4URigozaNktcwZDtilPR6zZA6J10gd5HSe73/ jX/OqmUCUx6kuKur/hUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRh75-0000In-Sj; Tue, 27 Nov 2018 17:25:31 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRh74-0000H9-S4 for linux-arm-kernel@bombadil.infradead.org; Tue, 27 Nov 2018 17:25:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=88/A8rPJNC6sjcOr2rDwZvtP0qzc4u55+Us0i4UihUk=; b=wFXj4d4OZgOJeaJDgpRxnmCqdn qkDccwikaZ37VbyogT5JJ4nizTG88Ge9G5nP7gjTRHXfsjENuG+9ffFKreY9rvVaVZcFw610IY9gE tjMp89/qzN7h6pOcVl0g5HzetfWrs3vMjgxvfYPlhUE9hhMMRhCoLiik2MKnjwhHfvTv3JFqvskW5 0ucuZV3Z+CKBySVZw/SyYiX7ZVt2SfM+mYxxTvu1eeVRRAzXXlaKrxy11zDcdpGGBt3UuqgpDcFWs Mne9ouQfzB2843bA9bdOX4yjPrNrClzhB7uRnQzyTGr6Za9c8VlOoIwoD/TyFz21cO3a4mP/nD3O1 BW9YSC8Q==; Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRgsF-0000rV-Rm for linux-arm-kernel@lists.infradead.org; Tue, 27 Nov 2018 17:10:15 +0000 Received: by mail-ed1-x543.google.com with SMTP id d39so19620136edb.12 for ; Tue, 27 Nov 2018 09:10:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=88/A8rPJNC6sjcOr2rDwZvtP0qzc4u55+Us0i4UihUk=; b=aI5oqP6uCiSVKUnvwmUF+7MNam2/2mjG/QzaNXMxFeHLoTtIoYKXq5J1bLgA57sBME ToHakeBdcygZZOnFrT6wHpXIbHGdyE9pQp7NzcPfwjx5ngKEvrfh3Ej6Q9ntuLp0mhKh f/scigUeGlIg/Oj+huy0upHrrCfWZZHwAlqCs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=88/A8rPJNC6sjcOr2rDwZvtP0qzc4u55+Us0i4UihUk=; b=V6XSMXvgRhTF2zPpEpWtO/3apaepGPdldK0LDnNPpX87PT+AXMRKwJjJnNJLYYGhiS ZXXVK0Byk1mDFgFiJk95/G54zKFT9B6PUidOYNwacCasICEPewel1R/A3IITTkDyD+8Z k9xqHceqJ8sCHnaSDC2tH8ev5mZECySlWwj2xbC/jMSewOBukT3lwj9epsrr0K+R4Np9 TDQA4RNoCC8fqO15YqfkMvyDpWYL/vP+/A3Pf53gLYe2sBkTbn8oTVFnGpY/lFJg0Ks8 So5Cv+QpHhYgMQgTvlhgHBJadPX+AkZF3ROJgCEV74M6KPV+7OBuqEOmyGdtmpRZ060X F87w== X-Gm-Message-State: AA+aEWbP90ycp8DCBUhhNzqPz81VP4eGbknxwRWkcFa9QmO2ob9G4SDU DBFgErfSTJk8OFn0LsF9Mb16pA== X-Google-Smtp-Source: AFSGD/VgF48amhD9SQ6zK1QFGfqciPq9HsEYeOeAKuN4pmyYggY/3D3WUkEn4o/NoiAMYlKwstm6Dg== X-Received: by 2002:a50:8d8c:: with SMTP id r12mr27019094edh.105.1543338599824; Tue, 27 Nov 2018 09:09:59 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id u33sm1190604edm.88.2018.11.27.09.09.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 09:09:58 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Subject: [PATCH] drm/fbdev: Make skip_vt_switch the default Date: Tue, 27 Nov 2018 18:09:52 +0100 Message-Id: <20181127170952.28507-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181127_171011_991549_50E01C5B X-CRM114-Status: GOOD ( 19.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Heiko_St=C3=BCbner?= , Maxime Ripard , Daniel Vetter , Joonas Lahtinen , DRI Development , Huang Rui , Daniel Vetter , linux-rockchip@lists.infradead.org, David Airlie , Ben Skeggs , nouveau@lists.freedesktop.org, Daniel Stone , Maarten Lankhorst , Jani Nikula , Rodrigo Vivi , Junwei Zhang , Sean Paul , linux-arm-kernel@lists.infradead.org, =?utf-8?q?Michel_D=C3=A4nzer?= , Sandy Huang , Samuel Li , Shirish S , =?utf-8?q?Noralf_Tr=C3=B8nnes?= , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP KMS drivers really should all be able to restore their display state on resume without fbcon helping out. So make this the default. Since I'm not entirely foolish, make it only a default, which drivers can still override. That way when the inevitable regression report happens I can fix things up with a one-liner plus FIXME comment that someone should fix up the suspend/resume code in that driver. But at least all new drivers won't be broken by accident because "suspend/resume worked when I tested it" as soon as you turn off fbcon. Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ben Skeggs Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Alex Deucher Cc: "Christian König" Cc: Samuel Li Cc: "Michel Dänzer" Cc: Daniel Vetter Cc: Junwei Zhang Cc: Huang Rui Cc: Shirish S Cc: Daniel Stone Cc: "Noralf Trønnes" Cc: intel-gfx@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 1 - drivers/gpu/drm/drm_fb_helper.c | 1 + drivers/gpu/drm/i915/intel_fbdev.c | 3 --- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 2 -- 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c index 5cbde74b97dd..24890d8f9ee4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c @@ -234,7 +234,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper, } info->par = rfbdev; - info->skip_vt_switch = true; ret = amdgpu_display_framebuffer_init(adev->ddev, &rfbdev->rfb, &mode_cmd, gobj); diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 5e9ca6f96379..41f37704e0a3 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -934,6 +934,7 @@ struct fb_info *drm_fb_helper_alloc_fbi(struct drm_fb_helper *fb_helper) } fb_helper->fbdev = info; + info->skip_vt_switch = true; return info; diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index 2480c7d6edee..d6f8d4bbc9fc 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -257,9 +257,6 @@ static int intelfb_create(struct drm_fb_helper *helper, info->screen_base = vaddr; info->screen_size = vma->node.size; - /* This driver doesn't need a VT switch to restore the mode on resume */ - info->skip_vt_switch = true; - drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 032317c81bf0..67572408d9ae 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -365,7 +365,6 @@ nouveau_fbcon_create(struct drm_fb_helper *helper, ret = PTR_ERR(info); goto out_unlock; } - info->skip_vt_switch = 1; info->par = fbcon; diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c index e6650553f5d6..361604e51361 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c @@ -111,8 +111,6 @@ static int rockchip_drm_fbdev_create(struct drm_fb_helper *helper, rk_obj->kvaddr, offset, size); - fbi->skip_vt_switch = true; - return 0; out: