Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp25950lfe; Fri, 15 Apr 2022 17:46:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAs/Vpe6nh7mRx+zDy3Hg0Y8E/7fSqYEqGXhYSvSwE0693iE44SmQqhGCbbjuLeTwQ7l5H X-Received: by 2002:a17:90b:3a89:b0:1d1:6633:5eb9 with SMTP id om9-20020a17090b3a8900b001d166335eb9mr3636094pjb.188.1650070019213; Fri, 15 Apr 2022 17:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650070019; cv=none; d=google.com; s=arc-20160816; b=G1DXTDK3GxHkGHvLWyJVJvoDZv2TH9Emz4r7AiY5vsx5ZAObNgdlopgK/g8vbJFu+8 mUQcikmIGgIZ/wlUYYe0YRTQNCI8n22LIPIMuVmXolG3WzSYXqeDLiXXY/ppbPtsvwpE /3rqQAbZck57zFuS+Jp01evfjEIDG7oG7N83y7uc1wsyMzI4KcDbAJMCa+WFY7ZhD3xQ DQ/iQAzUK5XoVdI3pPJnlDnqTMbqUSvfZEM/bcc7yGRevD1e4lL+W96UZhzXHEDZJ3lo cp7VuYM/i/rqLXzeCnC1BFDJpLZMY1tE+jJ3DCnX7WoftfcPw8Loza0ZmOQFwpP7T7N/ Rung== 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=qgSOXhOj6eX2tVbThvNfdYmtN+IYIYkknh8Kxb94j9s=; b=zePd784mV+qL7BZ1GPPxvm9UxQjx8Cm4+l2KUmcjfLyhkixuoT/VyUem5DH5XZMDU/ 4ep78zVusckwSFZyFTJwC9DrFOWrupPKFB+RrOz7FDEwpQtm910h0G4nMnYyN+QxfnAH Xgf96jcO7TkFaEhyFS3Udh0qCUPdfTu6VnBP7jEuZrQwX1imWzZJZRQzE4tNMKAzMxgM TfSwRzCHfkiA1I58ng3LpPSVU9VoWL6Y+ueU0S7DcWsM9gVskkUjC5QM/Yfe7ObVAbA1 hhHJu0UUM6zI5cgWV5aj0tOqPYhMqTGhBov/yd6Xtpp7BiySgMEWtBw4Gpav7ba03nSs 5EaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oM2qYDjz; 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 s4-20020a056a00194400b004faa8dcd125si2902051pfk.72.2022.04.15.17.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:46:59 -0700 (PDT) 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=oM2qYDjz; 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 4A2BF1F63B; Fri, 15 Apr 2022 17:38:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346106AbiDNULy (ORCPT + 99 others); Thu, 14 Apr 2022 16:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346117AbiDNULu (ORCPT ); Thu, 14 Apr 2022 16:11:50 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97293BC38 for ; Thu, 14 Apr 2022 13:09:23 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id v15so7696648edb.12 for ; Thu, 14 Apr 2022 13:09:23 -0700 (PDT) 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=qgSOXhOj6eX2tVbThvNfdYmtN+IYIYkknh8Kxb94j9s=; b=oM2qYDjzsXJDUAHNx6vFqnV1+qnLdL1Xe5C3dzmC66+quS3wWWGkaNIQsO9Yy8nXam YG0sUWZXbEJhoHkK57/0Iw5a6LpPk/LwtPQH0w6pgdrknxCmSrmIE74V2aZZjHJfEvdO 3quH4CB8aG16ID9RExDHT4l4sF/8MSw6AwssM= 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=qgSOXhOj6eX2tVbThvNfdYmtN+IYIYkknh8Kxb94j9s=; b=BvH2xeHCKc1QzWMelcY7pa/vj/CVQuDhx8gXd4IabkDImJmt8OyQ879KjXXQQVP+bP TOTbOiRSUcuMrZrSjTXijuwzQCPdGJ+mMZgqE7C6PpejyjVvh+hp35XT/5713PAvkvrC 0AZt9DD8XhjJKKLRdkIuDBlPPQXwFBuMWGhJfKaI3UehJLicsEC+GPtKdCBGJFY459c0 XncXkiz05ccucI/bgBH1bdL09tFl5xKxAFa3xH7n3gjwg7cxNCFepikTM2sqkchDwuK2 Hig4Jt1Jk+0Lbde4eh72IAK3rrbQMCq+ZLwBUJgHGiAfR/OWSMLU9Pp+XNnNlfgXXqNm Fwzg== X-Gm-Message-State: AOAM533k0F5vr2VmrCf+0lEv6Tn5tlkyhwc0M3e6tEE9AOP0qCnRD053 AYSLNW/ZVxL7WWxCURgmKjX5UBoBpyoDjCMzZbE= X-Received: by 2002:a05:6402:2788:b0:41b:c871:715b with SMTP id b8-20020a056402278800b0041bc871715bmr4864585ede.53.1649966962128; Thu, 14 Apr 2022 13:09:22 -0700 (PDT) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com. [209.85.221.44]) by smtp.gmail.com with ESMTPSA id g24-20020a1709063b1800b006e8cf786ee8sm942378ejf.21.2022.04.14.13.09.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Apr 2022 13:09:20 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id b19so8343821wrh.11 for ; Thu, 14 Apr 2022 13:09:18 -0700 (PDT) X-Received: by 2002:a05:6000:1c15:b0:207:849a:648b with SMTP id ba21-20020a0560001c1500b00207849a648bmr3122026wrb.513.1649966957865; Thu, 14 Apr 2022 13:09:17 -0700 (PDT) MIME-Version: 1.0 References: <1649938766-6768-1-git-send-email-quic_sbillaka@quicinc.com> <1649938766-6768-2-git-send-email-quic_sbillaka@quicinc.com> <81c3a9fb-4c92-6969-c715-ca085322f9c6@linaro.org> In-Reply-To: From: Doug Anderson Date: Thu, 14 Apr 2022 13:09:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 1/4] drm/msm/dp: Add eDP support via aux_bus To: Stephen Boyd Cc: Dmitry Baryshkov , Sankeerth Billakanti , dri-devel , linux-arm-msm , freedreno , LKML , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Clark , Sean Paul , quic_kalyant , Abhinav Kumar , Kuogee Hsieh , Bjorn Andersson , Sean Paul , David Airlie , Daniel Vetter , quic_vproddut , Aravind Venkateswaran , Steev Klimaszewski Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 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=no 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, Apr 14, 2022 at 12:40 PM Stephen Boyd wrote: > > Quoting Dmitry Baryshkov (2022-04-14 12:16:14) > > > > I think it's too verbose and a bit incorrect. Not sure which part you're asserting is incorrect, but shorter is OK w/ me too. > > This is a bit saner: > > /* > > * These ops do not make sense for eDP, since they are provided > > * by the panel-bridge corresponding to the attached eDP panel. > > */ > > > > My question was whether we really need to disable them for eDP since for > > eDP the detect and and get_modes will be overridden anyway. Hmm, interesting. Probably for DRM_BRIDGE_OP_MODES that will work? It's definitely worth confirming but from my reading of the code it _probably_ wouldn't hurt. One thing someone would want to confirm would be what would happen if we move this code and the panel code to implement DRM_BRIDGE_OP_EDID properly. It looks as if both actually ought to be implementing that instead of DRM_BRIDGE_OP_MODES, at least in some cases. A fix for a future day. Could we get into trouble if one moved before the other? Then the panel would no longer override the eDP controller and the eDP controller would try to read from a possibly unpowered panel? So I guess in the end my preference would be that we know that driving the EDID read from the controller isn't a great idea for eDP (since we have no way to ensure that the panel is powered) so why risk it and set the bit saying we can do it? For hotplug/detect I'm even less confident that setting the bits would be harmless. I haven't sat down and traced everything, but from what I can see the panel _doesn't_ set these bits, does it? I believe that the rule is that when every bridge in the chain _doesn't_ implement detect/hotplug that the panel is always present. The moment someone says "hey, I can detect" then it suddenly becomes _not_ always present. Yes, I guess we could have the panel implement "detect" and return true, but I'm not convinced that's actually better... > And to go further, I'd expect that a bridge should expose the > functionality that it supports, regardless of what is connected down the > chain. Otherwise we won't be able to mix and match bridges because the > code is brittle, making assumptions about what is connected. From my point of view the bridge simply doesn't support any of the three things when we're in eDP mode. Yes, it's the same driver. Yes, eDP and DP share nearly the same signalling on the wire. Yes, it's easily possible to make a single controller that supports DP and eDP. ...but the rules around detection and power sequencing are simply different for the two cases. The controller simply _cannot_ detect whether the panel is connected in the eDP case and it _must_ assume that the panel is always connected. Yes, it has an HPD pin. No, that HPD pin doesn't tell when the panel is present. The panel is always present. The panel is always present. So, IMO, it is _incorrect_ to say we can support HPD and DETECT if we know we're in eDP mode. -Doug