Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1941269ybt; Mon, 15 Jun 2020 13:33:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6wuSBvStpMlsp5wr+u8hfG8ZwUplKrxWwN576ccjzOHhaV5YuJm63693cBu/fzYBeTHkZ X-Received: by 2002:a17:906:7c56:: with SMTP id g22mr26699656ejp.507.1592253211201; Mon, 15 Jun 2020 13:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592253211; cv=none; d=google.com; s=arc-20160816; b=dCuXPuLF48PP5uaF6Uxj2gPl+7TEZX+WRYn2KUNIXAfIYeQKuVhCHI4p9/t8u8qLCe b/dPyewsPtHbnP1EW1dNIOgDzqQxPaZK3YooANRh69SEpgwcR2XwUxnD5bZOSVRAjeK+ ih/2jWNDzawmV8xIBBQBKMKB0xe/xc9cmAHneigB6AhG7aPKbi/AqWWeYmAHA9sNHL11 y2Y55gRU8hWu9LgVYVdn6lYHvUuuQF01KDwr42Vqcv/dRzHkiJ+SOmOTrFp902Rtq62K 8J2AcQHH/uAXh8rYnKFKxN+nnUjN37LNuPjbUouLyQcwsB4hOYsm1dMqHmrmwAJ1j7wk h+fw== 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=0Z7l2VfaJoA7feUPgqzH6vCuZfqodGYRM7q90qhPLRE=; b=nwQO2CK6dhIimeWcHiwdG0CKChx8AA316wny/eE4C6Xf9Ex4twbfcomAqt4/AHaT42 NZT3GZ1UDz2IHMDvnOLKyi7oyq5ttVnhyea9DKipnx+5aiifIFDOyhxSmgGGfKtd9QoP Iq42/1zFbIYu5CaYoAJyybxDb4iodVHV+H4RXokgu9uNclhuZxHp3QD1sOprL0psTx4T BoG11/d6ZfqP1EUshNyytH2pZ5e9fUoeZVt6Tw0eG4j+C8MprZ6HAAeQT+Q1UP83vICL USoGzePcFepwANVGlWenAWViYWZvyv28b2IvGpdfVxpt9B5kvYSIaOzd0NjrVZPWzj5Y 40lQ== 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 lh2si10467415ejb.400.2020.06.15.13.33.08; Mon, 15 Jun 2020 13:33:31 -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 S1731461AbgFOUbV (ORCPT + 99 others); Mon, 15 Jun 2020 16:31:21 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:37084 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728346AbgFOUbU (ORCPT ); Mon, 15 Jun 2020 16:31:20 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id C719A2A2CF7 From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org, Collabora Kernel ML Cc: matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, laurent.pinchart@ideasonboard.com, Sam Ravnborg , Andrzej Hajda , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Neil Armstrong , dri-devel@lists.freedesktop.org Subject: [RESEND PATCH v4 1/7] drm/bridge: ps8640: Get the EDID from eDP control Date: Mon, 15 Jun 2020 22:31:02 +0200 Message-Id: <20200615203108.786083-2-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615203108.786083-1-enric.balletbo@collabora.com> References: <20200615203108.786083-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. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg --- Changes in v4: None Changes in v3: None Changes in v2: None 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 4b099196afeba..13755d278db6d 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.27.0