Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp121863iog; Wed, 29 Jun 2022 19:42:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmu4EtJkRGeV5I4mIjJ9DwE7w73MkmMtk7ciP948dA8wyLzrsiJsj8oLZ826Or7KswlmTu X-Received: by 2002:a17:907:168f:b0:726:2bd0:1091 with SMTP id hc15-20020a170907168f00b007262bd01091mr6444664ejc.137.1656556923185; Wed, 29 Jun 2022 19:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656556923; cv=none; d=google.com; s=arc-20160816; b=b4LhQREyYVeGZLJsZGQEeHd0846aXJNh4ZgYQy7+SKZ9XFvTo3KAfgk6jBbTkNenLJ RfK1NiU3eg0wOXiLB5t69+FfbuFac6q1ctqFPeM6NJBbvSZ9HzleWz8UttLffntsaUQt 62ZF7ME1LSYbbmPsLSjyKAPRj9KTbxv9di4cjvvLR+JyTP12zP3/k3TfHeio3kfBGq/E nC8fLuFpfhJYe11sHAHgd4NHL/PYMgmXpY9IAjW+ADWHrdjLuvcMLHtIw4Sq0zL19kPR ZsdmeeAVtdWRExmuWgyfuSbIuv762t49rhcRq+3oWOudCFoYFsUOk8CKcvgHWW3sPFQx +QOQ== 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=qdKdTCtNsd2q3yyCl80PhBz12PXESIt3xwlp2rRhZIk=; b=BQnu9ZIaxP+1PIY8h3O/kzVzGWi7D8mFiFh1gTht5PNEii7IV6FOSg9LXi9z77MYah R2BdtwlKSfhd0IN0UjX4CrlAf8zcehf8+vN7g9Qhu41afoxNy/IiFtew+W8m73cfJ74s taYBmmxnELey5J4qvpUTFSqB9ZcX6aaAo4m5SBF02+D6IgTYlt6628DK5sZpfF7HTGe9 Vm1VRuX9WZ+FSMHIqTo519O3VD+kXkFzPaKXTHIqbQcoKE0LwzK69SqWGgE3EOkCOa6h G6Fg8OiJCDCaujx8z2V/8x0rfqsAKtG+ceJbdzGnQR5SJCJWyv3zTWbRr+i1WWv71S9E HeIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KfF7ZFS9; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020a05640235c400b0043585dbe807si2059649edc.229.2022.06.29.19.41.37; Wed, 29 Jun 2022 19:42:03 -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=@gmail.com header.s=20210112 header.b=KfF7ZFS9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229479AbiF3B53 (ORCPT + 99 others); Wed, 29 Jun 2022 21:57:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230079AbiF3B5Z (ORCPT ); Wed, 29 Jun 2022 21:57:25 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90E173CA57; Wed, 29 Jun 2022 18:57:24 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id v193-20020a1cacca000000b003a051f41541so699130wme.5; Wed, 29 Jun 2022 18:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qdKdTCtNsd2q3yyCl80PhBz12PXESIt3xwlp2rRhZIk=; b=KfF7ZFS9NFrkWlDud9w6rtd3isEKK9vmUWsziwc0EV5Huqhp1flNzs0am0DuEEOQol tOCjaro4iaqz8UI3gnD/rkVRBf7ThztHSuroaeLhff4beHX4q8fjsNK8GnxXqe1/Qvx6 VdpS2eBp7V8PCFUASKDsYNg4C+cIJodeuVf5ftKL2MvRO4LHTeLt6nKf3BM8ENbn2Zjq CYmYge8IwsXS4D1iVOpLJpWr4jdip2ZlF3lJ3X9s0dx1IbH5r9pDD7oAgx++vQywcxFI b0LN+f2FoicBllLiGsaot4hBT4q9DPf7xHRS20A+Jc6vhRMphbBjErvwhzeKlIf/dkoW WIuA== 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=qdKdTCtNsd2q3yyCl80PhBz12PXESIt3xwlp2rRhZIk=; b=u437/Rn8wSJlmzHTs2v4sxeYcS4vA5ub51Yd2lJW+N/wpv3YFbdkEY77dFNitJ03FM h+AgiafXl3IUMemI9IaQsBEdai7exjSj4FgFYm4h9A3VvhS8nNx39wU6MY6Uq48CaXrW uAl69yQQ8ArY9EbxGt7AXOdVkPFQVfiM7DnM+3bEZFnE0oKgUJB9dg/F/Mz8WJjxWllN AaIA2iA14DmUeKnXumVBS280wwDE3dtj1Q9dqBRmY3zArZpu0pd6Ituyqfe+34/mib5U 8xwuAgnYztfZZUUmeITPAcZrVU/jbY/iPaIEVpAfBcBQPM7reBkDHglsqLGSBf5q5RoK H3Zw== X-Gm-Message-State: AJIora9+HezrJaR/++dBj3xFtGv/iSyVXjLM6VGJxFW+Gd6BzVlFz2QV 5mABIKUJqxW/ACWzb+uKEgiyLbhAO78k7+pT3hQ= X-Received: by 2002:a05:600c:4f83:b0:3a1:7310:62e7 with SMTP id n3-20020a05600c4f8300b003a1731062e7mr4908639wmq.84.1656554243027; Wed, 29 Jun 2022 18:57:23 -0700 (PDT) MIME-Version: 1.0 References: <1656429606-2765-1-git-send-email-quic_khsieh@quicinc.com> In-Reply-To: From: Rob Clark Date: Wed, 29 Jun 2022 18:57:35 -0700 Message-ID: Subject: Re: [PATCH] drm/msm/dp: make eDP panel as the first connected connector To: Doug Anderson Cc: Dmitry Baryshkov , Sean Paul , Stephen Boyd , Vinod Koul , Daniel Vetter , David Airlie , Andy Gross , Bjorn Andersson , "Abhinav Kumar (QUIC)" , "Aravind Venkateswaran (QUIC)" , "Kuogee Hsieh (QUIC)" , Sankeerth Billakanti , freedreno , dri-devel , linux-arm-msm , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Wed, Jun 29, 2022 at 5:36 PM Doug Anderson wrote: > > Hi, > > On Tue, Jun 28, 2022 at 1:14 PM Dmitry Baryshkov > wrote: > > > > On 28 June 2022 18:20:06 GMT+03:00, Kuogee Hsieh wrote: > > >Some userspace presumes that the first connected connector is the main > > >display, where it's supposed to display e.g. the login screen. For > > >laptops, this should be the main panel. > > > > > >This patch call drm_helper_move_panel_connectors_to_head() after > > >drm_bridge_connector_init() to make sure eDP stay at head of > > >connected connector list. This fixes unexpected corruption happen > > >at eDP panel if eDP is not placed at head of connected connector > > >list. > > > > The change itself is a good fix anyway. (And I'd ack it.) However I would like to understand why does it fix the corruption issue. What is we have eDP and DSI, with DSI ending up before the eDP? Would we see the issue? > > Also could you please describe the mind of corruption you are observing? > > I've spent a whole bunch of time poking at this and in the end my > conclusion is this: > > 1. The glitchyness seems to be a result of the Chrome OS userspace > somehow telling the kernel to do something wrong. > > 2. I believe (though I have no proof other than Kuogee's patch fixing > things) that the Chrome OS userspace is simply confused by the eDP > connector being second. This would imply that Kuogee's patch is > actually the right one. > > 3. It would be ideal if the Chrome OS userspace were fixed to handle > this, but it's an area of code that I've never looked at. It also > seems terribly low priority to fix since apparently other OSes have > similar problems (seems like this code was originally added by > RedHat?) > > > Specifically, I tested with a similar but "persistent" glitch that I > reproduced. The glitch Kuogee was digging into was a transitory glitch > on the eDP (internal) display when you plugged in a DP (external) > display. It would show up for a frame or two and then be fixed. I can > get a similar-looking glitch (vertical black and white bars) that > persists by doing these steps on a Chrome OS device (and Chrome OS > kernel): > > a) Observe screen looks good. > b) Observe DP not connected. > c) Plug in DP > d) See transitory glitch on screen, then it all looks fine. > e) set_power_policy --ac_screen_dim_delay=5 --ac_screen_off_delay=10 > f) Wait for screen to turn off > g) Unplug DP > h) Hit key on keyboard to wake device. > i) See glitchy. > j) Within 5 seconds: set_power_policy --ac_screen_dim_delay=5000 > --ac_screen_off_delay=10000 > > Once I'm in the persistent glitch: > > * The "screenshot" command in Chrome OS shows corruption. Not exactly > black and white bars, but the image produced has distinct bands of > garbage. > > * I can actually toggle between VT2 and the main screen (VT1). Note > that VT1/VT2 are not quite the normal Linux managed solution--I > believe they're handled by frecon. In any case, when I switch to VT2 > it looks normal (I can see the login prompt). Then back to VT1 and the > vertical bars glitch. Back to VT2 and it's normal. Back to VT1 and the > glitch again. This implies (especially with the extra evidence of > screenshot) that the display controller hardware is all fine and that > it's the underlying data that's somehow messed up. fwiw, from looking at this a bit w/ Doug, I think the "glitch" is simply just an un-renderered buffer being interpreted by the display controller as UBWC (because userspace tells it to) BR, -R > When I pick Kuogee's patch then this "persistent" glitch goes away > just like the transitory one does. > > I'm going to go ahead and do: > > Reviewed-by: Douglas Anderson > Tested-by: Douglas Anderson