From patchwork Wed Dec 15 04:11:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Koba Ko X-Patchwork-Id: 1568005 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=O6HGXqzj; 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 4JDMJB50rRz9t55 for ; Wed, 15 Dec 2021 15:11:38 +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 1mxLdZ-0006U3-3u; Wed, 15 Dec 2021 04:11:29 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mxLdX-0006Tw-AX for kernel-team@lists.ubuntu.com; Wed, 15 Dec 2021 04:11:27 +0000 Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (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-1.canonical.com (Postfix) with ESMTPS id 2E9033F1B0 for ; Wed, 15 Dec 2021 04:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1639541487; bh=FtbhR8MJfllHvPSTKD/7a3wBX+OUKLNUf3K4LxpRpgk=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=O6HGXqzjxxQDbrP8Jl0iXIPyIlVDWxPGzUldTO7gYALAwRoHPiyBRBADnvWaIDgyf 3fpzHIm0HZT4CFIOTXA82qzaVjGvvcPFzyQxs9EFybSX+N7pthK0vOtYhQfw5XEu26 8dBoSU97LhrIfFqmWP4XzRePvsnELu6u5rqb72HALjnUa3ppKh5l1SOLUvT1YLbGPr fwhzSVqceaN6d0gXM0PvAeJOJcSz48jAmNhE6K/7zBT4rmErGJq+99w1HvLelFMz7B 7u700r9UoL6IC11gtpznlgd4HqNgbpQOxIcDfzsl1YYcBz5dTp4MVAS0PAOX8WR48F ZoIMJCf1viFQQ== Received: by mail-pg1-f199.google.com with SMTP id d2-20020a656202000000b00325603f7d0bso11623309pgv.12 for ; Tue, 14 Dec 2021 20:11:27 -0800 (PST) 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=FtbhR8MJfllHvPSTKD/7a3wBX+OUKLNUf3K4LxpRpgk=; b=UsrkT5LUF8yyUu4EBSx5vgy67SPXYrX/g3WsFH/KkcXjFH/Np3nnPsFrtFWSKpyL1k Mdb3D58bDgnN//N0v8vWMmp2fQnjp+jGEUNQrKvaRX3+g8Y6md+W+eATAm8eYxxQwvHN FPxSThnr+hnlTWIxVthbLjKuzjnQTB47nDupPPehdi0QvVdP0jOv++RIbvJ+1BioSwR5 F5tR9HmuR1KKKIczaUikvIui1F0UtmnX4f2kPvWpZ2jBmRbJ3ZhNShmS9tP8BptU/ukC 1BH97ksUofSc1KTnw9cR/OK9lp1HZj+WDxihtLHRhLYq03VLcgFVb7F2lUe2ZZgzAhkr c9wg== X-Gm-Message-State: AOAM533BbVDR62zDxRSq+G17ON6cKSBHg7t1jQ/zSeDYFEUwOjHgJWuE AoO2yrhnqDk2wXSLnuU6SCo/ny8j/B2ayi5pATQR+OwOw09SgnkHsBP1cLNcO2VcHTlg/aamfxI BG+ttervYyUFO/zws637SgwqESwzQoCqTjQTJTvk5zA== X-Received: by 2002:a17:90b:3b82:: with SMTP id pc2mr9787888pjb.120.1639541485503; Tue, 14 Dec 2021 20:11:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzxJP1AL15BgVifcFRAbRHcu4fwVCfjduS1yWPNC3HlB4d5Cpz5Tzcpgp/1yKIRBJjeznfnw== X-Received: by 2002:a17:90b:3b82:: with SMTP id pc2mr9787858pjb.120.1639541485041; Tue, 14 Dec 2021 20:11:25 -0800 (PST) Received: from canonical.com (211-75-139-218.hinet-ip.hinet.net. [211.75.139.218]) by smtp.gmail.com with ESMTPSA id a3sm580813pgj.2.2021.12.14.20.11.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Dec 2021 20:11:24 -0800 (PST) From: Koba Ko To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/3 V2][SRU][U] Fix System hangs on black screen when reboot Date: Wed, 15 Dec 2021 12:11:20 +0800 Message-Id: <20211215041123.106364-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] low, the patches has been landed on mainline and linux-next V2: reSRU the formal patches for Jammy Jani Nikula (1): drm/i915/hdmi: convert intel_hdmi_to_dev to intel_hdmi_to_i915 Paolo Pisati (1): UBUNTU: Ubuntu-unstable-5.15.0-9.9 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() debian.master/changelog | 17 ++++++++---- debian.master/reconstruct | 3 +- 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 | 32 ++++++++++++++-------- drivers/gpu/drm/i915/display/intel_hdmi.h | 1 + 7 files changed, 49 insertions(+), 19 deletions(-)