Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4013276rwb; Tue, 6 Sep 2022 00:44:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR44LPCzKychmTxLQ8esJj0bRuw2vBdPD2kYiEu0Qj5wvEd5t/IqWRDI73xH2aEhSagPB7wx X-Received: by 2002:a62:168a:0:b0:535:ff3d:b68d with SMTP id 132-20020a62168a000000b00535ff3db68dmr53792274pfw.86.1662450290903; Tue, 06 Sep 2022 00:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662450290; cv=none; d=google.com; s=arc-20160816; b=lcQ4lUYgLOXpONUR4scQLig++XS8oZ++4APfnQUpL7P55EtCSSfUBDO7rpiI+Zxe81 oZ67jvluFkOO2wmG9NMhMBQ6QNH8DXVtjq0dvtFAj3m82+ZngA9i736S+H2SZf49ECAT 0I3cAyje36iwRp+1U47E63JGZOizUUP7Rr5XXvrYHjzCYpV5r1XaSG0XCBELhIfoEKQo QUwFHUrHFrVHhXMG/U1Nw3hDM9hfj43B6HUQl4/0cd1zxuKbONJ4L3RpD5+d/YRyoVjo cEwG0kuEOCOhY1lbodXpFmsmi+WyS/QuYmuIWov8PvQOH6uO1Xmae99fQyKURBoEL6mK sS8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=3ZSIeVMVsulMoZL/eREczuKdSIQhE7iJhlZgLLf0GJ8=; b=l+Sao5Yq58eSrNWPgaEq5aoTRrrgSSgcnlvF/6GlVwu3F/KtCsUGkyItd1Fixqk0jC n/AInV/ZW+cMa1ZysjuPJi807EcsN9eYe+J32Va3Qls6wFTaUUBxbFc/7GbU2kJxpW6n j0jpo1o02UNW4TFX3JHpvTY5r21FeXeT09Vtfr+PI3YydQGV301S8ytrwC/eqZjkqDjy 34WgXVVjmrUPMxsMrCSkUmD9kM2nqy6tnTp3QFKHlBK4EvUk/n3OmRU9tlvZk5MwKako 23qG/bor0f86tAsRIE/Ejs5FNKDvD/DkHEnL/cF7cZYVBGGX5Axx9TSZ7fPhj3/txI3+ 0gcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=CyiajYbf; dkim=neutral (no key) header.i=@suse.de header.b=btuzp2Y8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a631c4a000000b0041c506dde92si9870955pgm.636.2022.09.06.00.44.40; Tue, 06 Sep 2022 00:44:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=CyiajYbf; dkim=neutral (no key) header.i=@suse.de header.b=btuzp2Y8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233981AbiIFHkE (ORCPT + 99 others); Tue, 6 Sep 2022 03:40:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233321AbiIFHj5 (ORCPT ); Tue, 6 Sep 2022 03:39:57 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFD2623161 for ; Tue, 6 Sep 2022 00:39:55 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 89FE133756; Tue, 6 Sep 2022 07:39:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662449994; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3ZSIeVMVsulMoZL/eREczuKdSIQhE7iJhlZgLLf0GJ8=; b=CyiajYbfN2fQJYtQ+cMGknsuE2udy7D4+YkyabyHksljeYCW3hnX/z9pwhfUTJX/rzkguR w68czp52N7XrMeZK1R3E6ZBAN4WpVcYwnpB8X/zvKhnoDd7DPi2+jUzglwgHtvt+bMg9Te mQPkw8FOYEUW0ZfSewzHX/zwmSNo/NI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662449994; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3ZSIeVMVsulMoZL/eREczuKdSIQhE7iJhlZgLLf0GJ8=; b=btuzp2Y8VzDNsI7fz4Q7VRn41RdbRDcDnLRrCtQGW6TVEKGakBHiNv8mwDbJBM7al+TcU1 598n1tCniajPXfAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 64A5213A7A; Tue, 6 Sep 2022 07:39:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iNWjF0r5FmPeOgAAMHmgww (envelope-from ); Tue, 06 Sep 2022 07:39:54 +0000 From: Takashi Iwai To: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 01/11] drm/udl: Restore display mode on resume Date: Tue, 6 Sep 2022 09:39:41 +0200 Message-Id: <20220906073951.2085-2-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220906073951.2085-1-tiwai@suse.de> References: <20220906073951.2085-1-tiwai@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Zimmermann Restore the display mode whne resuming from suspend. Currently, the display remains dark. On resume, the CRTC's mode does not change, but the 'active' flag changes to 'true'. Taking this into account when considering a mode switch restores the display mode. The bug is reproducable by using Gnome with udl and observing the adapter's suspend/resume behavior. Signed-off-by: Thomas Zimmermann Signed-off-by: Takashi Iwai --- drivers/gpu/drm/udl/udl_modeset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index 169110d8fc2e..df987644fb5d 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c @@ -8,6 +8,7 @@ * Copyright (C) 2009 Bernie Thompson */ +#include #include #include #include @@ -382,7 +383,7 @@ udl_simple_display_pipe_enable(struct drm_simple_display_pipe *pipe, udl_handle_damage(fb, &shadow_plane_state->data[0], 0, 0, fb->width, fb->height); - if (!crtc_state->mode_changed) + if (!drm_atomic_crtc_needs_modeset(crtc_state)) return; /* enable display */ -- 2.35.3