From patchwork Tue Apr 4 10:47:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 78987 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2927793vqo; Tue, 4 Apr 2023 03:49:32 -0700 (PDT) X-Google-Smtp-Source: AKy350awA3LEAt8zfUMtJLXOLsfTAl0bk/HJVTS5sPB+oA9VLeyWZP7VSQMfO37ekUHlBFv9a8tU X-Received: by 2002:aa7:c913:0:b0:502:2953:8ecb with SMTP id b19-20020aa7c913000000b0050229538ecbmr2359864edt.13.1680605372402; Tue, 04 Apr 2023 03:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680605372; cv=none; d=google.com; s=arc-20160816; b=hRJafBngk4IWG1Z9nJrHTbXsn3kNrXjHU6jjGoP7xS8Yn3Vxi/UBE5FaWe4Jbxo4Hq nvPV5UpjbUDoAegfONqCfM3w0yU2PZYZkrR3sA8GwEc0H0Q/Jy0kQwfioNXqHEbk7QL2 XBqG5X/EJc1SLZX/HpjBt2pQR7YZXqxttqzUGopb+F86CY2AgyyhJY/Tmi7V3SBbT9Sf xBBJeFGVrzvCzLOq/vEMbqnATwdTvZkENDJd4YqnXN7BHqlacHbt1Zj+J0yU2d7t1pMQ JifhPyUIv9fefLWtCKuSzaLm7lEmHAMOCC3ppiuqB+6HDhqozMhmojKJFJTcF8b+PoCK cyyw== 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; bh=nCg5ICz9XbPYs8GpKnZD2kdwz9IxKkREMg8mLvGBySg=; b=p4Ja7SVlQUFp4BG0hGrviT0orkNu6fwD31VEsn6h9wV+vk1LOHbV6D5u31c+cVzM1b wsk88ahkpo6bU8Efn1pPaEpioLItCF+9ejUjAxCRtYKa4/fK1e8g6WGFJ+zrgS+C161w 3k4p5NMhYhyzsxs0tw8n2cKwS2bQhm0pLg2+k5D4q3Pzrwn7u0yw4WziipSxXfmrBFyn XFPH5kAI79gIjqHrWNnnQcasyxTIJh1ujHvj3ZbDau1/9fs5IEFB6Y2Fg0Xsv78aJF4Q YbQxN049CWf6llq36zrgqY7ZqGrMyWCA+jHGwPMG/8BsQpm1WoRSimbLiU0EuCAXtH3r 5z+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U65vJLbk; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a1709067cc300b0094596c17d14si2176320ejp.4.2023.04.04.03.49.00; Tue, 04 Apr 2023 03:49:32 -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=@collabora.com header.s=mail header.b=U65vJLbk; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234571AbjDDKsS (ORCPT + 99 others); Tue, 4 Apr 2023 06:48:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234530AbjDDKsL (ORCPT ); Tue, 4 Apr 2023 06:48:11 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E16C1981 for ; Tue, 4 Apr 2023 03:48:10 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8C48066031D7; Tue, 4 Apr 2023 11:48:08 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680605289; bh=3ZbLGCMsG/gn15JDSWm25FtN0N4B/ueru9VCCfJiapw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U65vJLbkHVn4r+uuF2YhhtYmHp5qXs0ftuN5Y3CT7UAOt2OGGxXN0WM5jRjfbEgww 5BJ1jT0UkjrFvLGc926p/2n7q5bo5rLnRt3V1rf0D+3Z+khqr9VRKnYKt1iiHJqRsR Vv5dlPn5vZtHViLjpUgzq9ifxSp03hJIpMfByRpCEgBnsnQ0jrmd7uGqWu1DW1/anm Pf9i6QYSJ5d0VU0TxLpf35Uatxykno4XcqJrICuDAyjHDxyky/wHIo1zXr26AsanPj e19ilkNCkvwuxYybQVX9Q9eTAh+zfnvp69owPDTJSiQXZZwACMdp57HBmFCpnbbSOl upSnirqsOj9Mw== From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, wenst@chromium.org Subject: [PATCH v3 4/9] drm/mediatek: dp: Always set cable_plugged_in at resume for eDP panel Date: Tue, 4 Apr 2023 12:47:55 +0200 Message-Id: <20230404104800.301150-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230404104800.301150-1-angelogioacchino.delregno@collabora.com> References: <20230404104800.301150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1762242458635756579?= X-GMAIL-MSGID: =?utf-8?q?1762242458635756579?= eDP panels are not removable: at PM resume, the cable will obviously still be plugged in. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c index c82dd1f0675d..ac21eca0e20e 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -2607,6 +2607,9 @@ static int mtk_dp_resume(struct device *dev) mtk_dp_hwirq_enable(mtk_dp, true); mtk_dp_power_enable(mtk_dp); + if (mtk_dp->bridge.type == DRM_MODE_CONNECTOR_eDP) + mtk_dp->train_info.cable_plugged_in = true; + return 0; } #endif