From patchwork Thu Mar 30 14:20:31 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: 77211 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1177281vqo; Thu, 30 Mar 2023 07:41:24 -0700 (PDT) X-Google-Smtp-Source: AKy350bL/JxZZhtcpfAsOqYhCAAidVWZNCKaNyNaSPZiiQRA+rHYbqmBN/uTayTeaaVFBUHKkql6 X-Received: by 2002:a17:906:6b8b:b0:93f:9b68:a0f4 with SMTP id l11-20020a1709066b8b00b0093f9b68a0f4mr6828678ejr.26.1680187284054; Thu, 30 Mar 2023 07:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680187284; cv=none; d=google.com; s=arc-20160816; b=NoALaRW4Oixb3xU/bhB9Cm79yFEyEpETQEInrJxYSINrcZfGUgWqgpUNmrrSvdZVgw mfcOzF78ivUn2+zWnGmcqH7NY99ayptU3p8TmTgbYg/ITdoSeR40Hq0stoDpz6daPScq SBwsw66UJHDXencL+Ow4dZmsC9uV9O/R2PH+i82hmnxwbRuT1H+tE3IDdd6XZRCOf5Z9 h94AwD46vBo/jSvp+/+IJuAVUv0rR+OF0V2EaffTHhgf7WuSYauocdeUsC0X/eod6jkq vwHnGpaBmZ/1OPJnt+lpiC9K4nGqViPZBRtrvv7v9FphQ2xFpl2sDB11lWoDK5TI8T2L pvpg== 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=YehO5J4j8f7n5dOO4uK0L9ctQB8Cm3Iyhtt6w3bR1VXoUh9tYSJpTwHKkQgmeqadNJ 4aYCZaBFjAdHR0QLD1s8gJD5kgRN6O/rLHdS3+dsdA5Fpf80cv/2c1VmpUTM1bVnPErw gEz3sTQnoSZZ13VV+kPMEv+I0qavyaNzdpTQ8bEChrCssf8CxDb+/rVwW0NN1WOHOvp4 i3GDMEpWDqlgVXuF2L2nieRTVy4n2sQPg4HNSxce7mtON5PSFxXwQc38pwN37eVXEv4i jznJvyGYGqiHdx4lmjQp5lCKxfl8j06axaZFWAw7GnuHVjRR0qzYfWO5uzaqrkF3/FfD UL7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=E3kmtNCg; 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 t18-20020a170906269200b008cd525eac74si32039945ejc.836.2023.03.30.07.40.59; Thu, 30 Mar 2023 07:41:24 -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=E3kmtNCg; 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 S232386AbjC3OU4 (ORCPT + 99 others); Thu, 30 Mar 2023 10:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232331AbjC3OUp (ORCPT ); Thu, 30 Mar 2023 10:20:45 -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 B2580AC for ; Thu, 30 Mar 2023 07:20:44 -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 DD27F6600011; Thu, 30 Mar 2023 15:20:42 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680186043; bh=3ZbLGCMsG/gn15JDSWm25FtN0N4B/ueru9VCCfJiapw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E3kmtNCgUZL+OdsGrOaq9hF2DNEwCFoZ1/UMI9b4gxV4utcQ2iiSrW28KKmGfKIy8 yvbC697ZegPXuvwYgghQbwC8QYgRjuQiD6dKZS8BmEWrpk1VHkokcIH0cZ3+SQMb3I ctszC4j/dCXFhGXaVCB+vbqob83p64wUJGdcb0uaWB401uwPIGVHBMpTiMB58JRxX0 QyblxFaz9rMWY1x8idFdkXoei+EY/I8uw+IcOWazPdkMdjUSiktIXqVGqlHNvwRbDT re1e7kDDFEK2zn3Io98oyupnqDztiO3SgCAyuyBDLutKgNkair+RYilKSFAD6ng1IH TbeEZmpuakYJw== 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 v2 4/8] drm/mediatek: dp: Always set cable_plugged_in at resume for eDP panel Date: Thu, 30 Mar 2023 16:20:31 +0200 Message-Id: <20230330142035.191399-5-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230330142035.191399-1-angelogioacchino.delregno@collabora.com> References: <20230330142035.191399-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?1761804061614774848?= X-GMAIL-MSGID: =?utf-8?q?1761804061614774848?= 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