Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3466939pxb; Mon, 4 Apr 2022 17:54:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxh8hLSAe2Xi2wPSfNus3bCEDTC8Sug0ddyYRvaB78wYfTAE+2fSMF2mlwSCR/EffSSika X-Received: by 2002:a17:902:f70f:b0:153:ebfe:21b3 with SMTP id h15-20020a170902f70f00b00153ebfe21b3mr797935plo.119.1649120061952; Mon, 04 Apr 2022 17:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649120061; cv=none; d=google.com; s=arc-20160816; b=ygnDef8s43xHmQ79nAozI8NFMyJ+4dbQ7l4CxZGN/KMzPvMktgalkxXYLvHhVZt8i1 D0Nwu/7lHkxePnJO1Kwqqv+Gf0YGnPfR2te7biX8EB6iH3w+UOKKu4dYri5wVtk4Q//o vidlDMIudCKw49j12zfNwHoj8LMQegiyQ5CQi9UmjVp56zuTb+QtvNg4WoLfaE52h05A XNKDR1KMbd6JMb7acxchV61sgwv8yoNA3PfKsU1v5pd7+8ivNTN+r70qwHorMMCtODk5 riuAB1RJ4dYHCY023gtzRYi8gqgsF8LCM2Ef6c8qrIdeJdcyqdpCJIuAg3umbEoAke5g 6MYA== 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=IxUdjcC4It/JwdPOTj9qf8Z2Z9qsMxlLajpUd7Bfk/o=; b=iyjS9TpGKLwHb3y71bO4f+Ale9fYAIoe0OhNJXb3+fKi2rf1kF+cR06RI8Jb/K0oy0 eByuK1I4ApUkjUBENXcpEm9G6m4VUJSiB/5v8xLF6ekAqgBoBOf93sdCeKml+yNA4n/W e9WHu1OY1dBGji7atLCSBOVvvzNTJs3jydLri+ZAozZe2GncXkdtOEOOm+VfYuQb3KRH dXQGlzsSYB3JfCitxN84K8+NDp5erYrYonv/IeBAgEiuOPnzwgnPshAEhMviuSB8FO1h l7aV6dtr9xzbAcT7Vy0wGbNu8QnVsT7qnz+0rxFPC7QiBdJ1YDFsIMySftv1Zojf6Dpe fjVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=POnOfkKB; 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=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k11-20020a170902ba8b00b00153b2d164f9si10417225pls.257.2022.04.04.17.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 17:54:21 -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=@linaro.org header.s=google header.b=POnOfkKB; 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=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 92759118F52; Mon, 4 Apr 2022 17:02:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379092AbiDDWMS (ORCPT + 99 others); Mon, 4 Apr 2022 18:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386739AbiDDVjR (ORCPT ); Mon, 4 Apr 2022 17:39:17 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9AC64D9C0 for ; Mon, 4 Apr 2022 14:30:33 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id w141so8824101qkb.6 for ; Mon, 04 Apr 2022 14:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IxUdjcC4It/JwdPOTj9qf8Z2Z9qsMxlLajpUd7Bfk/o=; b=POnOfkKB5D3FdXZ3FUx89riusD8I3RIEffDsh+KNc9BBUacT82hSW46tJsWf5CUr4Z 9tCpUVA2vzJ6RNSV/hyhPsGW4fXWyimM+aqGrXtvHqFWENOgXa0eSohh92R0UixG7UKr 1bjSfBJUFUZn1kS8Ji0hY0DtdpXo4oXUVxihn5JotQ+VNqNImvdCWoCrPC97P5Sn1i66 EM927H4AOz07RCNVWrzp6LqIsP/DQjPaOUctdkXuIL4EbpcA1zIiGPByFm/qCWWMZg3F ImgWoGm+3GVLuS8Nr1Bt8asoBnKLtm3VyUMwZrECsO5hKNb4WDBZrLmIQDDHYNzG+3fS VnTg== 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=IxUdjcC4It/JwdPOTj9qf8Z2Z9qsMxlLajpUd7Bfk/o=; b=kwnhbHbv2pi0FLmlg/IifjKmFgwwueiwxPTrdB8+yu+7lCb5ZyiusSEYwJNToXe0LS Lh4V8pZQDnMMav/r15BfI/WsVCSUVHJlQC4AjXZEDHGIlnJ7lSoS+x0v0xTd6kEBZ1WA xiQ7p/XRPsBjibvkeq1/nDZYgqYA8mFoxCqrqmlYOSlixmhFdKHKZ+x8m+x1Dm00oq89 U5w70YbpjvM3tqSOYOU+8NSZmPRHPTI7J4D9ZRayAlQ8YGCxC4J2ZPf8JaHghp4MWg2Q D+31XRsNQ+aKqQ4rPskX8hKt4nBvJZQYDDTOzgNFnXmkOApxADmsvQkGh+lt68KI5tKT JENg== X-Gm-Message-State: AOAM532qVu4wmeC8+gTbeHSv0zu8JXoQGjtf9Ng3MSHP2frDJLnD1o9F b+6sWvNs6NxhZQK5LxlWwOpuPkpnoJQBlEiniUPeGA== X-Received: by 2002:a05:620a:2453:b0:67d:9539:495c with SMTP id h19-20020a05620a245300b0067d9539495cmr215335qkn.30.1649107782604; Mon, 04 Apr 2022 14:29:42 -0700 (PDT) MIME-Version: 1.0 References: <1648656179-10347-1-git-send-email-quic_sbillaka@quicinc.com> <1648656179-10347-9-git-send-email-quic_sbillaka@quicinc.com> In-Reply-To: From: Dmitry Baryshkov Date: Tue, 5 Apr 2022 00:29:31 +0300 Message-ID: Subject: Re: [PATCH v6 8/8] drm/msm/dp: Handle eDP mode_valid differently from dp To: "Sankeerth Billakanti (QUIC)" Cc: Doug Anderson , "dri-devel@lists.freedesktop.org" , "linux-arm-msm@vger.kernel.org" , "freedreno@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "robdclark@gmail.com" , "seanpaul@chromium.org" , "swboyd@chromium.org" , quic_kalyant , "Abhinav Kumar (QUIC)" , "Kuogee Hsieh (QUIC)" , "bjorn.andersson@linaro.org" , "sean@poorly.run" , "airlied@linux.ie" , "daniel@ffwll.ch" , quic_vproddut , "Aravind Venkateswaran (QUIC)" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,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 On Mon, 4 Apr 2022 at 21:21, Sankeerth Billakanti (QUIC) wrote: > > Hi Doug, > > > On Wed, Mar 30, 2022 at 11:02 PM Sankeerth Billakanti (QUIC) > > wrote: > > > > > > Hi Dmitry, > > > > > > > On Wed, 30 Mar 2022 at 19:04, Sankeerth Billakanti > > > > wrote: > > > > > > > > > > The panel-edp driver modes needs to be validated differently from > > > > > DP because the link capabilities are not available for EDP by that time. > > > > > > > > > > Signed-off-by: Sankeerth Billakanti > > > > > > > > This should not be necessary after > > > > > > https://patchwork.freedesktop.org/patch/479261/?series=101682&rev=1. > > > > Could you please check? > > > > > > > > > > The check for DP_MAX_PIXEL_CLK_KHZ is not necessary anymore but we > > > need to return early for eDP because unlike DP, eDP context will not > > > have the information about the number of lanes and link clock. > > > > > > So, I will modify the patch to return after the DP_MAX_PIXEL_CLK_KHZ > > check if is_eDP is set. > > > > I haven't walked through all the relevant code but something you said above > > sounds strange. You say that for eDP we don't have info about the number > > of lanes? We _should_. > > > > It's certainly possible to have a panel that supports _either_ 1 or 2 lanes but > > then only physically connect 1 lane to it. ...or you could have a panel that > > supports 2 or 4 lanes and you only connect 1 lane. > > See, for instance, ti_sn_bridge_parse_lanes. There we assume 4 lanes but if > > a "data-lanes" property is present then we can use that to know that fewer > > lanes are physically connected. > > > > It's also possible to connect more lanes to a panel than it supports. > > You could connect 2 lanes to it but then it only supports 1. This case needs to > > be handled as well... > > > > I was referring to the checks we do for DP in dp_bridge_mode_valid. We check if the > Link bandwidth can support the pixel bandwidth. For an external DP connection, the > Initial DPCD/EDID read after cable connection will return the sink capabilities like link > rate, lane count and bpp information that are used to we filter out the unsupported > modes from the list of modes from EDID. > > For eDP case, the dp driver performs the first dpcd read during bridge_enable. The > dp_bridge_mode_valid function is executed before bridge_enable and hence does > not have the full link or the sink capabilities information like external DP connection, > by then. It sounds to me like we should emulate the HPD event for eDP to be handled earlier than the get_modes()/prepare() calls are attempted. However this might open another can of worms. > So, we need to proceed with the reported mode for eDP. Well... Even if during the first call to get_modes() the DPCD is not read, during subsequent calls the driver has necessary information, so it can proceed with all the checks, can't it? -- With best wishes Dmitry