Message ID | 20230404104800.301150-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 b10csp2929175vqo; Tue, 4 Apr 2023 03:52:55 -0700 (PDT) X-Google-Smtp-Source: AKy350bBQK1EZkoJvUafvFKTBGg801VNQgRQeMno9BeVOOIik1sl5gle8XBAU2I63HcqSlcezZDg X-Received: by 2002:aa7:9e09:0:b0:62d:e95c:fef5 with SMTP id y9-20020aa79e09000000b0062de95cfef5mr2028870pfq.6.1680605575229; Tue, 04 Apr 2023 03:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680605575; cv=none; d=google.com; s=arc-20160816; b=oyTfuAJgXuZa27PAlh42mzxqb7/kqG2+XcB2IZOispcmelb158Td/g2qfXDUmD4ADI bLrY/MhJXaKLUYluX7acO4/bqGfd/SpgmQDGSJ8rgLKHauqkTimXkXcD7UokeW6jAdac 4riZBtX4aLqYH71SRITDHnbSDpml5upP75dM1L3KVvOuqBNtNAR7MPWvub0SPF6+/rQV OHQFM/S9vOzgyYto/zYUosrh+tn7Bw00i6285QV0kt2tR7zIQ/HL43Zj1AqvHGZ1K5TP zzkHRYvJNCBigObFMoHbUawYzMO5k76/ugK9v3PsMUyZXyhlCCOtxbMVwJcy2Luz3jZ1 LD6w== 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=VlgCDCwp+ucNv1NnLavUT1qaXzmxUdaS0R+Qj5Wa2bce/Z8uxi3XzLMtLvGJwmewwM 9j7OlOTDY8/ORNLmEc2JMmRB2HEWIk5ImyM/YGOMW/oeVTaoAz3+k+h7vyngFBB4vOXe BDnP3N7+94hnQK/J7kzBive8m/RSmuoOw0TI7PLq4yNejetC6K/c2P7DYfuER4DDVC/I 1+H14Fz2kujM1SyEN+Tma7bRCgSV20FjjTTNJ4nKZwiVZ5EdTQ0VWfF7yd0KcrV6owio Hi4ElKX5EgOs7bf6poFA1+toCIizxSfiSiNPxQq0nZ8CZ8J5VhNrdmiIXJwApv+Y+mYK myzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Qcj4Qi+7; 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 u23-20020a632357000000b0051323712244si9883129pgm.2.2023.04.04.03.52.42; Tue, 04 Apr 2023 03:52:55 -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=Qcj4Qi+7; 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 S234587AbjDDKsV (ORCPT <rfc822;lkml4gm@gmail.com> + 99 others); Tue, 4 Apr 2023 06:48:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234529AbjDDKsL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); 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 915111BD6 for <linux-kernel@vger.kernel.org>; Tue, 4 Apr 2023 03:48:09 -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 BF23966031BE; Tue, 4 Apr 2023 11:48:07 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680605288; bh=l7DxgZbkLf1a/NAX8ACnOYom2qi3A95N4rbvhFxlUX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qcj4Qi+79FHY08lDUv+IuJKMzkByf37aVI6u5qC0jUQt3ZRcXDE1iKNkwKAq2Bvsd dbjH9R/pjLEzjaFHWiA1KrsQ6XFOB/gBkX2GLDIE5Z48yMBCBZN7dbrPJUzaPnWif0 ob71RyaxPPNz7znBU21XEctjcQlz+z4Ifal8886rn3voYj0vU5gIMlXRbKIhPqAow6 qr9M8tMGcwcc9u0QR11iqc5qWFcaktMOak5trBzLhY2hgYB+l1lshhgO8eIffXUu/R GpTp/MpfsBcxGstaOgjf0AIpxY8ve//lyl+l707t1O4al5VMbv0FvTLYyuCmKLqDWC t7uuXgEBymStA== 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 v3 3/9] drm/mediatek: dp: Always return connected status for eDP in .detect() Date: Tue, 4 Apr 2023 12:47:54 +0200 Message-Id: <20230404104800.301150-4-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 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?1762242672067168678?= X-GMAIL-MSGID: =?utf-8?q?1762242672067168678?= |
Series |
MediaTek DisplayPort: support eDP and aux-bus
|
|
Commit Message
AngeloGioacchino Del Regno
April 4, 2023, 10:47 a.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;