Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3482876pxa; Wed, 26 Aug 2020 01:16:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwimOjlWt/cTuLTJb6W6HIaQZaihm7Mbq8b6HnqTjoDEhzX132nsW82WLzMJOV/0degV2nJ X-Received: by 2002:a17:906:393:: with SMTP id b19mr14335280eja.268.1598429812031; Wed, 26 Aug 2020 01:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598429812; cv=none; d=google.com; s=arc-20160816; b=zWjqA+Sy0E1VzcAHttSeSnPTu3A5LzQwtiLSadt1NhQH1EP+/E6Cmd6oaIPlXJmbwn 2CL4z7K+N5gQlb+IGRtUqTlO2mmi91ydajiK2pyobslSNtI9BHykGCnuv8TndnngEgpx +rqaN3mpo42A9rOUDtETQGz2tCIGw48mE5Gju7ttIWn6cCFA4xluqbN0vCJfGR0voizH ZKm4KP2BV+qqoF3qCGSFd5hHVkGHTGChOn6bDJzi8kFPQqhd0x9pgYkRN7C6a651dFZV jOfgWcrqs9lplTjLS/O3jHJH/kG71/ltTeYcj7a5ORtWmUUxqtePxEmSiG/PsjiOSPQ9 bT/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FjR8KWaIf8ZSJ3i4xJ9ShW2nPKWw5zZSOuEGwJ0b7g8=; b=QJwmD1oWUcpvcV7PnkXZf9otTv2zcp9JSmIs+G/IXbnJ0Yl43O5KodgtrrtqSQlr5n oFLE32HiStPtVxm/7ijXIgfG1Q8aYekNiZ9utz1yuoNY6KK2XZFMrTGc8XrEZrV2KCFc c3jPHAaM5ZlvcEe980TG0fediyA3bN8MxVHMBe8Rj2OKetVvNmMOZrJaNmNaNGaVLwlm zNpWwH8Q5RKR5dZM3dRw9EPQ0vauaxA8v7MGZrPc9kqJbOg+EjKej1Ugj04dF3q+7Vhy MxLGlTWNVjBSndpTkGf40myRmDZqdrmxXHEIYeTrxlwomBeWHqN69OOdez1EOzNaUTh9 suCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si1241727edi.81.2020.08.26.01.16.19; Wed, 26 Aug 2020 01:16:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbgHZIPk (ORCPT + 99 others); Wed, 26 Aug 2020 04:15:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726863AbgHZIPi (ORCPT ); Wed, 26 Aug 2020 04:15:38 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFE57C061756 for ; Wed, 26 Aug 2020 01:15:37 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 6D63B2969DF From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Cc: Collabora Kernel ML , matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, laurent.pinchart@ideasonboard.com, sam@ravnborg.org, Andrzej Hajda , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Neil Armstrong , dri-devel@lists.freedesktop.org Subject: [PATCH v2 2/5] drm/bridge: ps8640: Get the EDID from eDP control Date: Wed, 26 Aug 2020 10:15:23 +0200 Message-Id: <20200826081526.674866-3-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200826081526.674866-1-enric.balletbo@collabora.com> References: <20200826081526.674866-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The PS8640 DSI-to-eDP bridge can retrieve the EDID, so implement the .get_edid callback and set the flag to indicate the core to use it. Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Enric Balletbo i Serra --- Changes in v2: - Included the patch `drm/bridge: ps8640: Get the EDID from eDP control` drivers/gpu/drm/bridge/parade-ps8640.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c index 4b099196afeb..13755d278db6 100644 --- a/drivers/gpu/drm/bridge/parade-ps8640.c +++ b/drivers/gpu/drm/bridge/parade-ps8640.c @@ -242,8 +242,18 @@ static int ps8640_bridge_attach(struct drm_bridge *bridge, return ret; } +static struct edid *ps8640_bridge_get_edid(struct drm_bridge *bridge, + struct drm_connector *connector) +{ + struct ps8640 *ps_bridge = bridge_to_ps8640(bridge); + + return drm_get_edid(connector, + ps_bridge->page[PAGE0_DP_CNTL]->adapter); +} + static const struct drm_bridge_funcs ps8640_bridge_funcs = { .attach = ps8640_bridge_attach, + .get_edid = ps8640_bridge_get_edid, .post_disable = ps8640_post_disable, .pre_enable = ps8640_pre_enable, }; @@ -294,6 +304,8 @@ static int ps8640_probe(struct i2c_client *client) ps_bridge->bridge.funcs = &ps8640_bridge_funcs; ps_bridge->bridge.of_node = dev->of_node; + ps_bridge->bridge.ops = DRM_BRIDGE_OP_EDID; + ps_bridge->bridge.type = DRM_MODE_CONNECTOR_eDP; ps_bridge->page[PAGE0_DP_CNTL] = client; -- 2.28.0