Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp371707rwn; Thu, 8 Sep 2022 03:00:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Ed1yZ044SMNpa6I1TTTXV1oPxh8kW3VsE+AkeapxJp/wLRBPfY2MPbg2tBdE6UEYq82km X-Received: by 2002:a17:907:97d5:b0:730:9eac:d965 with SMTP id js21-20020a17090797d500b007309eacd965mr5354450ejc.353.1662631252934; Thu, 08 Sep 2022 03:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662631252; cv=none; d=google.com; s=arc-20160816; b=mtAOUhI7nDU68Q8XsQ0QI5eaOM+8hpAgLQPGePS27bas2KfJIwJKY8APY+cjUtR2Fd 1CEdzEO17ZKAvi6Qko+dfpiVIpF78zQeYaIf1KYMKgkTF1EdX2SchRlF52KAZuBAbZkn 5894pW3PaW+9yy5HZ9WrplnQAbnAAAsHakAOPTDgwWQTHFy1sHDsNZ1A/uIv6Aokql7Z YbqqJH9F52GFzCvLfeecdnycUCgUdGO+oD4R/lMRe3xaX1p/UX5LVBR40wsQXjxvlm5J 3+Iw3HDbzTyinAYh5mPPqd+GgQZG3fdaWhf5t5CuYQQxIlyDTi9N5GOWH5nEYjb0JUi/ AlTQ== 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=I1ErYPXVLqmO4wSgRe8Qfl5K8BfkVWk802TWryoKr48=; b=Z35vt3u/QGhF5jOVinSdrAYzFTRgE1ctQ7B0B2TMmt2gBfvvA7yLHpNJezQ9AdO+FH gwJYp3kKo/uv7qYKJ55xUPgqvCMXIzRv5gCcb2kJc/ysfl62bR+2t0IK3kUBXvLfNatG l8xEnOUy5WsMSXRC6OMLnLrkWbkSzh9ilXefYYllH032Xxq1Ns2TP495gfu5p/YOFnN9 kfPlPQ7rfIP6TVd6rhPm106s+D/dsU8VSwaUBHir5eZklDFTqZ8HV74Al+N8OZ6/Mr71 orrhqe8YWwgT+1zKcGkV+4NH4x4pnCRXCDCuI/KMKu0vP48AF+ZhKwJg/vQau8CZFlz/ u/wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="twBOX8/r"; dkim=neutral (no key) header.i=@suse.de header.b="/C2tCWJl"; 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 ga14-20020a1709070c0e00b0077479dc1063si1222600ejc.118.2022.09.08.03.00.27; Thu, 08 Sep 2022 03:00:52 -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="twBOX8/r"; dkim=neutral (no key) header.i=@suse.de header.b="/C2tCWJl"; 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 S231320AbiIHJv0 (ORCPT + 99 others); Thu, 8 Sep 2022 05:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231295AbiIHJvW (ORCPT ); Thu, 8 Sep 2022 05:51:22 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EFC8112E79 for ; Thu, 8 Sep 2022 02:51:20 -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 E37BA33800; Thu, 8 Sep 2022 09:51:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662630678; 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=I1ErYPXVLqmO4wSgRe8Qfl5K8BfkVWk802TWryoKr48=; b=twBOX8/r2pbp5pguSVOco7NM1nJ+2gir6mG4qY5MnfTMVonw7Gyx5JrF1Vsjk+QRcqmElY Yn5sqxUCZm3TdoRLgMc7yp7v6/KQpKPvyEMEc7+PaX6hhujHcDP/3wpibKKHP8HpbEZyHi Cl8vaA286Cd2f0r2kqCvDTH4sEGWg+8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662630678; 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=I1ErYPXVLqmO4wSgRe8Qfl5K8BfkVWk802TWryoKr48=; b=/C2tCWJlfKNJfd1E4rwU7BVI6WUfXZTo1Mas3ppP30Ir50bAvXEQ8kzrq8ZSoZVOIwpROf rPIlxPaodDXqQoAQ== 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 BA25813A72; Thu, 8 Sep 2022 09:51:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gHTjLBa7GWNrUgAAMHmgww (envelope-from ); Thu, 08 Sep 2022 09:51:18 +0000 From: Takashi Iwai To: Thomas Zimmermann Cc: Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 01/12] drm/udl: Restore display mode on resume Date: Thu, 8 Sep 2022 11:51:04 +0200 Message-Id: <20220908095115.23396-2-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220908095115.23396-1-tiwai@suse.de> References: <20220908095115.23396-1-tiwai@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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. Actually, the whole check added in udl_simple_display_pipe_enable() about the crtc_state->mode_changed was bogus. We should drop the whole check and always apply the mode change in this function. [ tiwai -- Drop the mode_changed check entirely instead, per Daniel's suggestion ] Fixes: 997d33c35618 ("drm/udl: Inline DPMS code into CRTC enable and disable functions") Cc: Signed-off-by: Thomas Zimmermann Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Takashi Iwai --- drivers/gpu/drm/udl/udl_modeset.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index 169110d8fc2e..34ce5b43c5db 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c @@ -382,9 +382,6 @@ 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) - return; - /* enable display */ udl_crtc_write_mode_to_hw(crtc); } -- 2.35.3