Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp739386pxp; Fri, 11 Mar 2022 13:51:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnfpo7eozmguBFyraijlQl12qUS13BRFCrY1LF97tJG5kZcTL5s9FpFesYRjjFp8mGWRxL X-Received: by 2002:a17:90a:e7cd:b0:1bf:2ab7:1a9a with SMTP id kb13-20020a17090ae7cd00b001bf2ab71a9amr13141290pjb.138.1647035497913; Fri, 11 Mar 2022 13:51:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647035497; cv=none; d=google.com; s=arc-20160816; b=Z3EKQU8z70Q7nABOFMt7yrxUerILq+GLSJ+RgcH7LglB/ssP7JwyifEyXRjag/9NGy M71OsyLnPlQmGLyRW4BSAchha0RGtQT+cMYu/qJftjCXAXn30jjceMn4dtstgbIhZYXo qwc6qFa9YE3ejsmXezYDHNyIetJI82Ex52uSKh5apFa+L665np1ImpdABjXdFqmhyBZD k0LTzLequcrSGqYTcxOvzu0YZ4a2ASMltohiNnuIr4u2zrUfSHr4zLWSS9HKSqyioye7 ER+5uWEDqtjTVdZHbgJo9L4hzkjfp4+CqnuRQIJLfurRzAs598yAoqO2NDOZ4AQH6Bht NgJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FdRD7UqyvIUj279CEK1jZhIkgCE+xn41rfRl2yq1BwA=; b=fUS1DR1Eyt7jAlbUIHjtTR2vqtt+AtPef1hOdBv/bqud1eCdEXwD8ZERW9rQq01JOh Y9BiAKbuDGl2sHB+z/Zw89CBIDWPPR85mdfzfoqDmTVgrMgHxslPugTmHNUwbCwOS0P9 hTv5grqIF1X90qrB46XQ5LlNirTXUmWPJPDn1wbGm1sQplMH2zc7AVuUlpbi1RlJ3Nns b3L+MeWlkFPz3vjUDV3a5QRHMPFrEG4ZzFSfwN1Ef/7zFb2/0UG/DdevMDFghMj226X2 nGYA7OqHq9Gk7+1bTMMn3+5Jyonf44XEzslFs/qZLoZ3OXrrarkV5Db3qr1wXfUCJ1jf AZCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="T/q56MG2"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l18-20020a170903121200b0015171e5370esi9596424plh.466.2022.03.11.13.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 13:51:37 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="T/q56MG2"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 30E9826B56B; Fri, 11 Mar 2022 13:12:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344594AbiCJXLk (ORCPT + 99 others); Thu, 10 Mar 2022 18:11:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344585AbiCJXLh (ORCPT ); Thu, 10 Mar 2022 18:11:37 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5BC0199E3D for ; Thu, 10 Mar 2022 15:10:35 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id qx21so15381735ejb.13 for ; Thu, 10 Mar 2022 15:10:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FdRD7UqyvIUj279CEK1jZhIkgCE+xn41rfRl2yq1BwA=; b=T/q56MG2EY5bFCFeahW25OmtAXtMaEF5rZwoAkIuXrQ+H+ausHtpVCkE4IGxGnitV9 7wuejt/lAn4WozekwFbX/ISvBi2gQ2dmVE7m0S3Ug4eXsNJ9DfMOqauA+agFNy33+qN1 xyrawS89u6mWz1ZMfZ9rS/OTtQw2YrBmH8MXY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FdRD7UqyvIUj279CEK1jZhIkgCE+xn41rfRl2yq1BwA=; b=6C8EWPezVjEDuzc1JoXgLyayTD0lwoabA5QRrZXjWgBUnH5TnebqWe/ioF2itunEy4 VfX4OgNNdM7/uJXD/CsXtXq1otQIGEsmTH2kL9lcANett7x6RdtRgpkwLSYls28DIgOw rgT8z0gHFYBtUrmdKp2eRONLw9H9r5/VHxbC4Qwv3Qv3uUfLRNVu5j2cQ/WmIeQkv2K4 PBRyaGfeKXxEL9Hj0SGgHFCwGR9DpSaW+MyS4Xt9TCjQ95Go0qeR+erSmITABkEkEx62 bKQ+v6h1ZYW3RR1tpuWSS0Lzg2mvUgZUMU+SIq3gZiTOUosHJleO1R+owvsuAdfzaA6M KlXA== X-Gm-Message-State: AOAM532GqWTMp3WncGvTSbcoYisnH1cYhP8ralGX2vC8DJg+63pEvgfj zKASt/TK4cF45cDlTyFjACYFySSnwWBVPZCR X-Received: by 2002:a17:906:7056:b0:6d6:dd99:f2a4 with SMTP id r22-20020a170906705600b006d6dd99f2a4mr6141456ejj.43.1646953834560; Thu, 10 Mar 2022 15:10:34 -0800 (PST) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com. [209.85.221.42]) by smtp.gmail.com with ESMTPSA id y12-20020a50eb8c000000b00410f02e577esm2589691edr.7.2022.03.10.15.10.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Mar 2022 15:10:34 -0800 (PST) Received: by mail-wr1-f42.google.com with SMTP id h15so10392522wrc.6 for ; Thu, 10 Mar 2022 15:10:34 -0800 (PST) X-Received: by 2002:adf:e983:0:b0:1f1:f52b:8328 with SMTP id h3-20020adfe983000000b001f1f52b8328mr5208098wrm.513.1646953833413; Thu, 10 Mar 2022 15:10:33 -0800 (PST) MIME-Version: 1.0 References: <20220310152227.2122960-1-kieran.bingham+renesas@ideasonboard.com> <20220310152227.2122960-3-kieran.bingham+renesas@ideasonboard.com> In-Reply-To: <20220310152227.2122960-3-kieran.bingham+renesas@ideasonboard.com> From: Doug Anderson Date: Thu, 10 Mar 2022 15:10:20 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 2/3] drm/bridge: ti-sn65dsi86: Implement bridge connector operations To: Kieran Bingham Cc: dri-devel , Linux-Renesas , Sam Ravnborg , LKML , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Laurent Pinchart Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Hi, On Thu, Mar 10, 2022 at 7:22 AM Kieran Bingham wrote: > > From: Laurent Pinchart > > Implement the bridge connector-related .get_edid() operation, and report > the related bridge capabilities and type. > > Signed-off-by: Laurent Pinchart > Signed-off-by: Kieran Bingham > --- > Changes since v1: > > - The connector .get_modes() operation doesn't rely on EDID anymore, > __ti_sn_bridge_get_edid() and ti_sn_bridge_get_edid() got merged > together > - Fix on top of Sam Ravnborg's DRM_BRIDGE_STATE_OPS > > Changes since v2: [Kieran] > - Only support EDID on DRM_MODE_CONNECTOR_DisplayPort modes. > > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > index 93b54fcba8ba..d581c820e5d8 100644 > --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c > +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c > @@ -1135,10 +1135,24 @@ static void ti_sn_bridge_atomic_post_disable(struct drm_bridge *bridge, > pm_runtime_put_sync(pdata->dev); > } > > +static struct edid *ti_sn_bridge_get_edid(struct drm_bridge *bridge, > + struct drm_connector *connector) > +{ > + struct ti_sn65dsi86 *pdata = bridge_to_ti_sn65dsi86(bridge); > + struct edid *edid; > + > + pm_runtime_get_sync(pdata->dev); > + edid = drm_get_edid(connector, &pdata->aux.ddc); > + pm_runtime_put_autosuspend(pdata->dev); I'm 99% sure that the pm_runtime calls here are not needed and can be removed.. The AUX transfer function handles the pm_runtime_get_sync() and it also does the "put" with autosuspend so that the whole EDID can be read without constantly powering the bridge up and down again.