From patchwork Wed Oct 19 08:22:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5497 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp335981wrs; Wed, 19 Oct 2022 06:46:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM58P2PC+DeIaHZZ4l7OqlUNciU2aZuSnrqQ3r/lQHR2XekVlTyENyLu9beQIJC0cZ15xlex X-Received: by 2002:a17:90b:350d:b0:20d:5438:f594 with SMTP id ls13-20020a17090b350d00b0020d5438f594mr46416937pjb.216.1666187169273; Wed, 19 Oct 2022 06:46:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666187169; cv=none; d=google.com; s=arc-20160816; b=W3i2PQt13cFZFj8eB8xcbI7TswUrXmqicD/ZtqwWuVPUtOL5fFsCmIyPaBHXsu69Q7 THBvSk9tOeJ8uRUjQKXAGsP1/iEidvuE04J8UKGlrd+O7XT0wBzldJNnIGT45nZ7In+f LJFJfulUfMx10fxx+N4hjXp0dVC7zqWo9kluSVxOxrAYR1lU2nxGVFH1D3hQblgPPoy0 nJuKs4woIH46e0E0YdQOEKzkEvE1+38aoLOY6U8088NqwMt3n/5+Z9YeLNQafZHAk6xh 4yTRUlMyplsjeXuBxWQw3UKDZiN8hdcpr84zIwjg22bwoxRKM0SUJgPhYn8yhqR3nmjq Cujg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lIr7zUBh7gEOnVYkFX4fK5I1VdldRrFJBAM1RtwXnjI=; b=jgkB7UxiwLZMt7c89+pgtuEyoAAi2isclWFMJj0qXgwRcb3uapDTGewellgyDzJdYb LA5vw2IG4S3tWm/Rp4llP/TPuyFqJ+UATFlvncRCVMLv1j2q3p4v3EQhdumQ58VmAmJ/ pGWsbZU57SpM68iKbf5OgzS8c15CDltEP0wzzH/ZyGkGOewjdMfWP9+iFIbFURf5nJM2 Jiphdl7Chy+J94azEKwpDJq4v85+/6viOs72QNNyi4q7/nHofM3xY+e24vnDekiVRN4U 5PB8zOdDpATihVlTtwuJBGedapH/2OCWWFvTAOS1Vz830hz3iUyIHUdUT54abskDCx6T gsLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=neQiCSSC; 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=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w63-20020a636242000000b0043c24cec6b4si17628485pgb.739.2022.10.19.06.45.56; Wed, 19 Oct 2022 06:46:09 -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=@linuxfoundation.org header.s=korg header.b=neQiCSSC; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233104AbiJSNpc (ORCPT + 99 others); Wed, 19 Oct 2022 09:45:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233551AbiJSNoX (ORCPT ); Wed, 19 Oct 2022 09:44:23 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 436A31BE1FE; Wed, 19 Oct 2022 06:31:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id E2869CE20F0; Wed, 19 Oct 2022 08:41:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E51D6C433C1; Wed, 19 Oct 2022 08:40:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666168859; bh=gMan5kpbovKahV/1vwN9rBg7BvTH6IpSR+9l0CZ8VNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=neQiCSSCOEvLsfJWN21OS4Qy36XWm48vWD6YRoxZrU0LnpZ3OsJ1qfUVXlSkEcDcf 9BO65YJpr9CYwWnkyUacecwCQT4qjpOiW3xjRBbzWtHJjSzmD7k6nTABKuHPm11DSW w0LITC8wrHShXKL8LzXHnC94AQX65DEb34QPeipY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Vetter , Takashi Iwai , Thomas Zimmermann Subject: [PATCH 6.0 078/862] drm/udl: Restore display mode on resume Date: Wed, 19 Oct 2022 10:22:45 +0200 Message-Id: <20221019083253.385002253@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747123876814273739?= X-GMAIL-MSGID: =?utf-8?q?1747123876814273739?= From: Takashi Iwai commit 6d6e732835db92e66c28dbcf258a7e3d3c71420d upstream. 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: Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Takashi Iwai Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20220908095115.23396-2-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/udl/udl_modeset.c | 3 --- 1 file changed, 3 deletions(-) --- 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 dr 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); }