Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3183276ioa; Mon, 25 Apr 2022 20:37:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRQB9Gg9qrByPNWmSLrnsq6xfivQ1FAbTezskGXpaJFWtaCI0bTVKTEkBzjE4P0xkTu8CJ X-Received: by 2002:a63:9502:0:b0:386:3916:ca8e with SMTP id p2-20020a639502000000b003863916ca8emr17521029pgd.357.1650944270860; Mon, 25 Apr 2022 20:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650944270; cv=none; d=google.com; s=arc-20160816; b=CighZKoO4zb5+WxeQ+rd0brLGdqFy8PRdTOme0TBSZF2Xjti+C/y23PyCERHfNKOlu NnBY0wlqg6hGKdkjinmz7XtstzWZ29XUMCcijWJaIspNuW8xCAofL88Ke7lC84GZmR8S MClvcdcYXNHnA3OA2MgCYR+KFUgS6BqmFt1u50cYRSCdW2mJGTVnbV4+ckGGqC1xWl2N ir+/qIuoLG89T537D3T8CJPtuO5bZIK+ZHS9+7db1B8dYcedZ2AtkH1rVEpP4w3SnU8f 04ne4Ikcq0IDCbiwJsgHrs2e1zTPAUgfSJnLBaIQun+Ps43rJRvfc4EwMrpAFuTB29dW 9gxw== 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=c4m32+fTXzvjrK8N2PTs9HFTY5JW2xcDekaDXCQn2Jo=; b=JBDZE3+1tNMg0cfhEK3HEROsZR6bXb5+FC6NPFqF9qijHsS2Ht5MPjKTBndeBfbrq/ iYPoVWO+wXxhT3/LCUrHyUx7CNnYOAoocAxQ+KFWAIXPVV/mi/eI+GvrxUJbQ5/2DJSz L443nPoVfwBj4U4IYWtcNz05qnrtIPY0KBkJ5OK20CU5TpDDcAjohkDgv+9ceqnTpkth UkT6FRw7Rm/sZUKTHL/doN5amyROEMYhbtvX51At5m/kIwtSPjlJgCMs9qgRawb7vAQy gPDoI/mT0HrxsrXgak9RvuYNFjs7ZxWzE2zh4Y+z771G+vT5VITNl3iM5kMn7GiYz89w hFaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UJ31W5ZG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a170902c2c700b00156b4eda6b2si16629246pla.287.2022.04.25.20.37.35; Mon, 25 Apr 2022 20:37:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UJ31W5ZG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241635AbiDZCWG (ORCPT + 99 others); Mon, 25 Apr 2022 22:22:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiDZCWE (ORCPT ); Mon, 25 Apr 2022 22:22:04 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 596AE113C88 for ; Mon, 25 Apr 2022 19:18:58 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id z99so20598520ede.5 for ; Mon, 25 Apr 2022 19:18:58 -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=c4m32+fTXzvjrK8N2PTs9HFTY5JW2xcDekaDXCQn2Jo=; b=UJ31W5ZGcTMdSrRnKjrJV8Q7vQiCR0y48RG002zAPW0z545pWer/A2fTaArW9Is7Jy epp1b/Me9p6puYs3/q2r3o9R9bp2QEb09OKfTf/KJdjzwPFEPZZskrURVnLpaJZb54PZ foOuSGS/UEjxyzsKHE/tENb1LS77Wnf7POSVo= 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=c4m32+fTXzvjrK8N2PTs9HFTY5JW2xcDekaDXCQn2Jo=; b=XGtBmwkeaGbc9DwODCWIrYPWXmpKHTsR+SbwwL9uAEcqsH1Zb0XfPuqEOedSURZLsG Z57wuQkcpH1fj601vekcxm/l4EADWQ9LTKi+/IRTtSax8+UA+VolHk8JO9crIlKL4UJx w7aluFmcOOb01QvF8EbDrtfDCJwM6kNxyLoKOl2rl6/Ok5fbU87bm6IocoC+BW7TgvBO obwt5CwxKB1DJE0drSPkYCvkzl8qAIpyeA8DL5ygvenVnkQuE8SUzKqx4wL7HtCLZ+R4 EbfUL/0hydcVUowVXWbYD6ghzDAnGio+ogDQUUfuF6yXFYXEvvhnMpmQmOSXogR1lFAk iGTA== X-Gm-Message-State: AOAM530tvP9wnJ68q8d3w5bVjYwkY7XA1PlP4Gd/aK5znOYQPFgjwsEB MU+A5bfQZZZeatBXwEyvg3XpYFACsxu4qDSf X-Received: by 2002:a05:6402:1cc1:b0:413:2cfb:b6ca with SMTP id ds1-20020a0564021cc100b004132cfbb6camr21608471edb.265.1650939537003; Mon, 25 Apr 2022 19:18:57 -0700 (PDT) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com. [209.85.221.46]) by smtp.gmail.com with ESMTPSA id q17-20020a1709064cd100b006e78206fe2bsm4194406ejt.111.2022.04.25.19.18.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Apr 2022 19:18:56 -0700 (PDT) Received: by mail-wr1-f46.google.com with SMTP id d5so8170374wrb.6 for ; Mon, 25 Apr 2022 19:18:55 -0700 (PDT) X-Received: by 2002:a05:6000:c7:b0:20a:d8c1:d044 with SMTP id q7-20020a05600000c700b0020ad8c1d044mr7719873wrx.422.1650939535168; Mon, 25 Apr 2022 19:18:55 -0700 (PDT) MIME-Version: 1.0 References: <1650671124-14030-1-git-send-email-quic_khsieh@quicinc.com> <3b9588d2-d9f6-c96f-b316-953b56b59bfe@linaro.org> <73e2a37e-23db-d614-5f5c-8120f1869158@quicinc.com> <9b331b16-8d1b-4e74-8fee-d74c4041f8d7@quicinc.com> <9b4ccdef-c98a-b907-c7ee-a92456dc5bba@quicinc.com> In-Reply-To: <9b4ccdef-c98a-b907-c7ee-a92456dc5bba@quicinc.com> From: Doug Anderson Date: Mon, 25 Apr 2022 19:18:43 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [Freedreno] [PATCH] drm/msm/dp: move add fail safe mode to dp_connector_get_mode() To: Abhinav Kumar Cc: Sean Paul , Sankeerth Billakanti , David Airlie , linux-arm-msm , Kuogee Hsieh , LKML , dri-devel , Stephen Boyd , Vinod Koul , Andy Gross , Dmitry Baryshkov , "Aravind Venkateswaran (QUIC)" , Bjorn Andersson , freedreno Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Mon, Apr 25, 2022 at 6:42 PM Abhinav Kumar wrote: > > >> 2) When there was a valid EDID but no 640x480 mode > >> > >> This is the equipment specific case and the one even I was a bit > >> surprised. There is a DP compliance equipment we have in-house and while > >> validation, it was found that in its list of modes , it did not have any > >> modes which chromebook supported ( due to 2 lanes ). But my > >> understanding was that, all sinks should have atleast 640x480 but > >> apparently this one did not have that. So to handle this DP compliance > >> equipment behavior, we had to do this. > > > > That doesn't seem right. If there's a valid EDID and the valid EDID > > doesn't contain 640x480, are you _sure_ you're supposed to be adding > > 640x480? That doesn't sound right to me. I've got a tiny display in > > front of me for testing that only has one mode: > > > > #0 800x480 65.68 800 840 888 928 480 493 496 525 32000 > > > > As I had wrote, DRM core kicks in only when the count of modes is 0. > Here what is happening is the count was not 0 but 640x480 was not > present in the EDID. So we had to add it explicitly. > > Your tiny display is a display port display? > > I am referring to only display port monitors. If your tiny display is > DP, it should have had 640x480 in its list of modes. My tiny display is actually a HDMI display hooked up to a HDMI to DP (active) adapter. ...but this is a legal and common thing to have. I suppose possibly my HDMI display is "illegal"? OK, so reading through the spec more carefully, I do see that the DP spec makes numerous mentions of the fact that DP sinks _must_ support 640x480. Even going back to DP 1.4, I see section "5.2.1.2 Video Timing Format" says that we must support 640x480. It seems like that's _intended_ to be used only if the EDID read fails, though or if we somehow have to output video without knowledge of the EDID. It seems hard to believe that there's a great reason to assume a display will support 640x480 if we have more accurate knowledge. In any case, I guess I would still say that adding this mode belongs in the DRM core. The core should notice that it's a DP connection (bridge->type == DRM_MODE_CONNECTOR_DisplayPort) and that 640x480 was left out and it should add it. We should also make sure it's not "preferred" and is last in the list so we never accidentally pick it. If DP truly says that we should always give the user 640x480 then that's true for everyone, not just Qualcomm. We should add it in the core. If, later, someone wants to hide this from the UI it would be much easier if they only needed to modify one place. > > So IMO we _shouldn't_ land ${SUBJECT} patch. > > > > Just for testing, I also tried a hack to make EDID reading fail > > (return -EIO in the MSM dp_aux_transfer() function if msg->request < > > 8). Before ${SUBJECT} patch I'd see these modes: > > > > #0 1024x768 60.00 1024 1048 1184 1344 768 771 777 806 65000 > > #1 800x600 60.32 800 840 968 1056 600 601 605 628 40000 > > #2 800x600 56.25 800 824 896 1024 600 601 603 625 36000 > > #3 848x480 60.00 848 864 976 1088 480 486 494 517 33750 > > #4 640x480 59.94 640 656 752 800 480 490 492 525 25175 > > > > ...and after ${SUBJECT} patch I'd see: > > > > #0 640x480 59.94 640 656 752 800 480 490 492 525 25175 > > #1 1024x768 60.00 1024 1048 1184 1344 768 771 777 806 65000 > > #2 800x600 60.32 800 840 968 1056 600 601 605 628 40000 > > #3 800x600 56.25 800 824 896 1024 600 601 603 625 36000 > > #4 848x480 60.00 848 864 976 1088 480 486 494 517 33750 > > > > ...so your patch causes 640x480 to be prioritized. That also doesn't > > seem ideal. If it was ideal, the DRM core should have listed 640x480 > > first. > > So this is a different display or these modes are coming due to the > drm_add_modes_noedid() call because of the EDID read fail right? Right, it's from the !edid case. -Doug