Message ID | 20230330141631.190528-4-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1162515vqo; Thu, 30 Mar 2023 07:19:25 -0700 (PDT) X-Google-Smtp-Source: AKy350btxhJPfleOwUeWFO+N4grrSeIhdEKjwTvzOqk++ew2I8OhBRj1+o213adQ3v8jHU1bnptt X-Received: by 2002:a05:6402:386:b0:4ac:ce82:9825 with SMTP id o6-20020a056402038600b004acce829825mr21907266edv.16.1680185965380; Thu, 30 Mar 2023 07:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680185965; cv=none; d=google.com; s=arc-20160816; b=JIzRM8sCXhYHaz/EdwXbg8kEnM7BRUA0gfTEuO0sk+6j26zpyRdHHm7drMvefUmYVT wuOHTufDhA5HGKxKCgytPKR1FGMSK/BM14a1RdEfzCNTmGClYaL+vvkRntezYeWCl0oh YTK/RHK7kHcO6rOat8M1Gge16cOI2X+zWdSLg9xQS0AY8LF58Ui2WoWvoArBPG3jeCEZ yKKaO6j0G+MS5NWMFWXfyH/k2t03AQiKVX7SNIFXEdUL/5ATt31X//dmuj/cXnhUr7Au +qvNz5StxMV2kqiFimmVagfTLBtcXXzBXwQw/cvxFnAr5MQnZuDpF/7GMkSYIQq8ZcKQ Zusg== 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=SA7K1DKPDuni2CUxMFtz6LVzpvZXN/0fsgagtyIjImk=; b=lXgYmm46FkVio+t6ldkryu5Z++tnSePb1PSw3OABdHHbYZxH4xiuBOxBeU59iUzRKq isVJuwyt59APiYsLlNIz+6RKKq2nKw0SdXiSsVEnjhqxsPghE1cZlQvOwAvvOWTtfun7 nf8l0v2GNDw1MxK8F5hNxempzSj1TTlDgveaW9Und8LP1JCLfuRRHRIBpI5XXGEJXMqM ZmQCjyOFUCQlnyfYEjZNqEgUHJzIceoDrsZ3K88hT0P4Qq8tR1MzZ4nesA618X5bnyZs JY1xfcb7EOcevm3YneAMIWjy4A+pM+wnP69GYjrpie/javjf9AbMFPqAFt/QyN5meEec y+yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kok26pBY; 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 l20-20020aa7cad4000000b005004b4ca08dsi34336828edt.599.2023.03.30.07.19.01; Thu, 30 Mar 2023 07:19:25 -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=kok26pBY; 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 S232348AbjC3OQt (ORCPT <rfc822;rua109.linux@gmail.com> + 99 others); Thu, 30 Mar 2023 10:16:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232270AbjC3OQn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 30 Mar 2023 10:16:43 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B93CFB440 for <linux-kernel@vger.kernel.org>; Thu, 30 Mar 2023 07:16:39 -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 A63066603189; Thu, 30 Mar 2023 15:16:37 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680185798; bh=l7DxgZbkLf1a/NAX8ACnOYom2qi3A95N4rbvhFxlUX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kok26pBYezCXLsDqlPBv2AAuuArwPCPm1egmztLbAPV5WKAfc+jLvl0aZaf7UVrMA l/Zhteq7VX7hcsoAwMknWLdZJSAi0O4Fio6waFY2Pr41THlth0BFXPi7deedr5xEPx 63S5QwMCvF8YA8KpXRt4nGT2Bbp9ceXaYVJWGp0vlqzDh7pToyaxp32L6x/UyxUfqA fyP/CP3Dd38Pm2kh/s0Kc5VQgkfuSADcIxGEzExSKXZ5eri9mqF5FyFPQFjDsvy8As aVx2r8UUvdYP8QRJJQzMoOvO7cYfz8rI5M7yGvor11hIymYm9ybjXMJMXn6rqzRX0K C6cNQX6P9RCxQ== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> 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 v1 3/8] drm/mediatek: dp: Always return connected status for eDP in .detect() Date: Thu, 30 Mar 2023 16:16:25 +0200 Message-Id: <20230330141631.190528-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230330141631.190528-1-angelogioacchino.delregno@collabora.com> References: <20230330141631.190528-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761802678553053258?= X-GMAIL-MSGID: =?utf-8?q?1761802678553053258?= |
Series |
MediaTek DisplayPort: support eDP and aux-bus
|
|
Commit Message
AngeloGioacchino Del Regno
March 30, 2023, 2:16 p.m. UTC
If this is an eDP panel it's not removable, hence it's always connected:
as a shortcut, always return connector_status_connected in the .detect()
callback for eDP connector, avoiding a poweron, a check for sink count
and a poweroff.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
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 76ea94167531..c82dd1f0675d 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -1957,6 +1957,9 @@ static enum drm_connector_status mtk_dp_bdg_detect(struct drm_bridge *bridge) bool enabled = mtk_dp->enabled; u8 sink_count = 0; + if (mtk_dp->bridge.type == DRM_MODE_CONNECTOR_eDP) + return connector_status_connected; + if (!mtk_dp->train_info.cable_plugged_in) return ret;