From patchwork Mon Nov 1 04:14:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Koba Ko X-Patchwork-Id: 1548947 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=vBaS1nFz; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HjKSm0SFPz9sXM for ; Mon, 1 Nov 2021 15:15:18 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mhOiw-00013L-Al; Mon, 01 Nov 2021 04:15:06 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mhOiu-000137-LE for kernel-team@lists.ubuntu.com; Mon, 01 Nov 2021 04:15:04 +0000 Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 6952B3F1AB for ; Mon, 1 Nov 2021 04:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1635740104; bh=H2z1+ayFH90OEr1pcxu7b2U/4FDrx13doU5nUMLofy8=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=vBaS1nFzF1gUtY8sTVF6i4iAcZy2msE7fTC2GK0TXifdt+p/TswIttJmFr3H1RNIa +HX1ZlC8sbbN8RrMF9tt/fS6VLHfSZLVca2CtfqjJC6LCqk7BcbrwpUUwInVv2TqHT BfigImm+7s5F97wz7rulpi0PUtwxwfhYt0d4y5AH4l9vx10y/x6qeu2xeGeR4piJcA trPndP/zfZEDEgvmgv8hugWsFHYP/4EmyDnR7R1FCVLxdv+L/xeHqXc+jJHN0tiREG czuPmD2VZYtKcLP3GCFAjwcDylJFTcenPZMW57xrP5qP7UN7BbkuamYwMpZKyhKGQp ocN9nl1IkRT3g== Received: by mail-pg1-f200.google.com with SMTP id c2-20020a63d5020000b029023ae853b72cso8634776pgg.18 for ; Sun, 31 Oct 2021 21:15:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=H2z1+ayFH90OEr1pcxu7b2U/4FDrx13doU5nUMLofy8=; b=5Z3yraugIf5zWdAsrbdvn0FIC2K6olmzXrt3L5oF6wN3qosabFCLasVxDoUVoHzJEA IZYqHIvaAkZymFRvv5roxbCTtFFmz+9cIYYXYhd0fWAXkqMMCeGt/Sry81Ht0c4uEQwC MZyjvzDPKb1r5wUSZeHQ67P/lQ7aHU9Wcxdgzu6SOwSY67O6MGy9Hsvevjn8R02J8mjO OpJFH4K1PUsY0HBnZDDMx/qkUObCcF4Lbma9AdWzLZRWnPPxYb/9JnbrCCERQ9qsa3iI zSPQsagn4vX66/ASfdzl8urFaIo+l2ADy6tTPoYSXozv/qUbxFBPFchJScjAEjXOljnS RK6w== X-Gm-Message-State: AOAM530caECGsty43Iku6Wqw5KsXMpFKIE2QGh14Bu7WxUKf122q9Yg+ mepbuJX55caC4WIUkKbyYXaLynk2TfpQ0EmjUA09fDTbczJpNG8jJ+ii4MY8vGqXRu/qbQGjBmS 8oteGs6pfmIxk+O9E2Ki6+mcMi1p4DN/czt7hB0nwkA== X-Received: by 2002:a63:e755:: with SMTP id j21mr19096721pgk.235.1635740102736; Sun, 31 Oct 2021 21:15:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwPbVD44sJ6yvitIkflXYZQHTPtEXZ78EOYptgkw7bX/W1mtvCzJ3+dML4R2dQJLosS2NFLw== X-Received: by 2002:a63:e755:: with SMTP id j21mr19096700pgk.235.1635740102245; Sun, 31 Oct 2021 21:15:02 -0700 (PDT) Received: from canonical.com (211-75-139-218.hinet-ip.hinet.net. [211.75.139.218]) by smtp.gmail.com with ESMTPSA id j15sm14012259pfh.35.2021.10.31.21.15.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Oct 2021 21:15:02 -0700 (PDT) From: Koba Ko To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/3][SRU][U/H/I/OEM-5.10/OEM-5.14] Fix System hangs on black screen when reboot Date: Mon, 1 Nov 2021 12:14:57 +0800 Message-Id: <20211101041500.2467168-1-koba.ko@canonical.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1949321 [Impact] System hangs on black screen when reboot [Fix] Looks like our VBIOS/GOP generally fail to turn the DP dual mode adater TMDS output buffers back on after a reboot. This leads to a black screen after reboot if we turned the TMDS output buffers off prior to reboot. And if i915 decides to do a fastboot the black screen will persist even after i915 takes over. Apparently this has been a problem ever since commit b2ccb822d376 ("drm/i915:Enable/disable TMDS output buffers in DP++ adaptor as needed") if one rebooted while the display was turned off. And things became worse with commit fe0f1e3bfdfe ("drm/i915: Shut down displays gracefully on reboot") since now we always turn the display off before a reboot. This was reported on a RKL, but I confirmed the same behaviour on my SNB as well. So looks pretty universal. Let's fix this by explicitly turning the TMDS output buffers back on in the encoder->shutdown() hook. Note that this gets called after irqs have been disabled, so the i2c communication with the DP dual mode adapter has to be performed via polling (which the gmbus code is perfectly happy to do for us). We also need a bit of care in handling DDI encoders which may or may not be set up for HDMI output. Specifically ddc_pin will not be populated for a DP only DDI encoder, in which case we don't want to call intel_gmbus_get_adapter(). We can handle that by simply doing the dual mode adapter type check before calling intel_gmbus_get_adapter(). Ref: https://patchwork.freedesktop.org/series/96433/ [Test] 1. install kernel 2. reboot 3. check the monitor works well. [Regression Potential] Medium, patch has sent to patchwork but may have a upgraded version in the furtue. Ville Syrjälä (2): drm/i915: Don't request GMBUS to generate irqs when called while irqs are off drm/i915/hdmi: Turn DP++ TMDS output buffers back on in encoder->shutdown() drivers/gpu/drm/i915/display/g4x_hdmi.c | 1 + drivers/gpu/drm/i915/display/intel_ddi.c | 1 + drivers/gpu/drm/i915/display/intel_gmbus.c | 13 +++++++++++-- drivers/gpu/drm/i915/display/intel_hdmi.c | 16 ++++++++++++++-- drivers/gpu/drm/i915/display/intel_hdmi.h | 1 + 5 files changed, 28 insertions(+), 4 deletions(-)