Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4655910iob; Sun, 8 May 2022 20:49:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0kunkAeCDpapYnBe493G3L4fDaVL3lqUX8qFBIBV/2WmM/+E8176YlpmOCnmg3iG7MHIM X-Received: by 2002:a63:3c9:0:b0:3c5:e6c1:d8cc with SMTP id 192-20020a6303c9000000b003c5e6c1d8ccmr11742654pgd.589.1652068185724; Sun, 08 May 2022 20:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652068185; cv=none; d=google.com; s=arc-20160816; b=JFTAoUrL5U5nIVYAGB4vFClooeyeH4Y6Qd63rvyGXQAGdCBIGgKa7psKKyw4Fr8KlL 4zL0tN4Lnf7GWFqxkLXRl6br7JcWme3aZv0vdChaoCrQfhUVJjv/j+g6B7ldq0YFrlLZ OpHMRHCwbP36v4RJPQaPUXAYBTVK/qwt0qBsJVjbm85dM4djXtH+Aqj5iCI0nIbOzhb0 I/Um3CmFTgZDOZQDhjhtx0xo+Pf+BwLDF6x69BsNbAHr/C1waXs3lEx9BVaFSaHcswQY Z8wyZgDRHsSwam2DmijHw7agytW9Dta1AE7PApa5HBOdLsEnFXdOINSTlKxfd7tDT+nx JNUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=KWt8qc9rcFQlTYziD1O54IX8AuORvGOLfcwGCOAPqjs=; b=u7EpCS+Jgw0xelLOm0IxpSBIsvrRX2+Hl8yCvVjCiNNEjrhSHtCEriKtnMszZcZfgn 2s5O40kOooD/ADCW6TQqd/LhP8e/MUX/QJ8bonc3v3y2DSaq/1c+GcjZn/wBF+gCfMag GjmeO/W8j/CgcxO7hM3NLMOfhSOSXcIgpaDEXaNfiCIgpmFm30RG0CCc3XYVtC5nF1fP VuBJRm3HTR3fbV2t9VxO55cB70LP+GNot+PQYTmXAuAKQsWG8j/iuAKxPkrYpeXsCPBx 2M8jGZdzAI6Om309+Ryk+OMQTaenQb7pmDbzBbC8a1X6xkD5Wp3a7RIjJDFRUjULpcGe cj8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=ivn92Eri; 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=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t23-20020a170902b21700b0015eb40a671csi9199886plr.313.2022.05.08.20.49.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:49:45 -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=@quicinc.com header.s=qcdkim header.b=ivn92Eri; 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=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BDA2922A; Sun, 8 May 2022 20:48:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243552AbiEERYh (ORCPT + 99 others); Thu, 5 May 2022 13:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230244AbiEERYg (ORCPT ); Thu, 5 May 2022 13:24:36 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23A005C351; Thu, 5 May 2022 10:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651771256; x=1683307256; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=KWt8qc9rcFQlTYziD1O54IX8AuORvGOLfcwGCOAPqjs=; b=ivn92EriGOeu9+LtxwDoA8gtB7cV8EMvhUP7ot1/7h8bXHRcGc6nSjuU Mf/J4DMQEAd62YPQbFSPSqpLkC+b+mf81S774GOSF9PMo88K7thIE90at yfrQ/SWCJjYq3ph4WZ9TYAz7BdSNPNclEHjn40TZO3sj1BHqE7rSN1V+G k=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 05 May 2022 10:20:55 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 10:20:55 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 5 May 2022 10:20:55 -0700 Received: from [10.111.168.240] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 5 May 2022 10:20:52 -0700 Message-ID: <4186ab8f-d227-f2c7-ab3f-0729bb915f17@quicinc.com> Date: Thu, 5 May 2022 10:20:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH 2/2] drm/probe-helper: For DP, add 640x480 if all other modes are bad Content-Language: en-US To: Doug Anderson , dri-devel , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= CC: Sankeerth Billakanti , Thomas Zimmermann , David Airlie , linux-arm-msm , LKML , "Kuogee Hsieh (QUIC)" , Dmitry Baryshkov , "Aravind Venkateswaran (QUIC)" , Stephen Boyd References: <20220426114627.1.I2dd93486c6952bd52f2020904de0133970d11b29@changeid> <20220426114627.2.I4ac7f55aa446699f8c200a23c10463256f6f439f@changeid> From: Abhinav Kumar In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 Doug On 5/5/2022 8:44 AM, Doug Anderson wrote: > Ville, > > On Tue, Apr 26, 2022 at 11:47 AM Douglas Anderson wrote: >> >> As per Displayport spec section 5.2.1.2 ("Video Timing Format") says >> that all detachable sinks shall support 640x480 @60Hz as a fail safe >> mode. >> >> A DP compliance test expected us to utilize the above fact when all >> modes it presented to the DP source were not achievable. It presented >> only modes that would be achievable with more lanes and/or higher >> speeds than we had available and expected that when we couldn't do >> that then we'd fall back to 640x480 even though it didn't advertise >> this size. >> >> In order to pass the compliance test (and also support any users who >> might fall into a similar situation with their display), we need to >> add 640x480 into the list of modes. However, we don't want to add >> 640x480 all the time. Despite the fact that the DP spec says all sinks >> _shall support_ 640x480, they're not guaranteed to support it >> _well_. Continuing to read the spec you can see that the display is >> not required to really treat 640x480 equal to all the other modes. It >> doesn't need to scale or anything--just display the pixels somehow for >> failsafe purposes. It should also be noted that it's not hard to find >> a display hooked up via DisplayPort that _doesn't_ support 640x480 at >> all. The HP ZR30w screen I'm sitting in front of has a native DP port >> and doesn't work at 640x480. I also plugged in a tiny 800x480 HDMI >> display via a DP to HDMI adapter and that screen definitely doesn't >> support 640x480. >> >> As a compromise solution, let's only add the 640x480 mode if: >> * We're on DP. >> * All other modes have been pruned. >> >> This acknowledges that 640x480 might not be the best mode to use but, >> since sinks are _supposed_ to support it, we will at least fall back >> to it if there's nothing else. >> >> Note that we _don't_ add higher resolution modes like 1024x768 in this >> case. We only add those modes for a failed EDID read where we have no >> idea what's going on. In the case where we've pruned all modes then >> instead we only want 640x480 which is the only defined "Fail Safe" >> resolution. >> >> This patch originated in response to Kuogee Hsieh's patch [1]. >> >> [1] https://lore.kernel.org/r/1650671124-14030-1-git-send-email-quic_khsieh@quicinc.com >> >> Signed-off-by: Douglas Anderson >> --- >> >> drivers/gpu/drm/drm_probe_helper.c | 26 +++++++++++++++++++++----- >> 1 file changed, 21 insertions(+), 5 deletions(-) > > I think this patch is fairly safe / non-controversial, but someone > suggested you might have an opinion on it and another patch I posted > recently [1] so I wanted to double-check. Just to be clear: I'm hoping > to land _both_ this patch and [1]. If you don't have an opinion, > that's OK too. > > Abhinav: I think maybe you're happy with this now? Would you be > willing to give a Reviewed-by? Yes, I have no concerns with this approach from DP spec standpoint and in addition, kuogee has tested this out and this does help us to pass the tests. Although, I might be missing some historical context on why this is not already done. But apart from that, LGTM. Hence, Reviewed-by: Abhinav Kumar > > [1] https://lore.kernel.org/r/20220426132121.RFC.1.I31ec454f8d4ffce51a7708a8092f8a6f9c929092@changeid > > -Doug