Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1589064pxb; Fri, 18 Feb 2022 10:52:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJyF9CZ2AkyY0qFUp+AbTXGZnoa5U9QUZQPuPPrRzgS+XZirlHxeeqTCKLZUAWR9gh1jP4Nw X-Received: by 2002:a17:90a:5302:b0:1b9:ba0a:27e5 with SMTP id x2-20020a17090a530200b001b9ba0a27e5mr13739009pjh.91.1645210335740; Fri, 18 Feb 2022 10:52:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645210335; cv=none; d=google.com; s=arc-20160816; b=vUUWAj22IlBQwhfZuxCMv3AAoFdDYzPe1dcHgwr37C1K00kJ0hdWBZMNUGgyTm/4fF 1XeKaqqtsvJwLgcCAsMxPrmWy/E8AhUWVm8C5zi8m+f6MaOwfJYonIOfCU8+gP3/h+T7 /VkcHSG/CvbI7LW/uSwUftF63NJfNYdr2oCsvYA2olbm7mAHJgZmpcn48Ih9Lv0Nes5W Tcbk4WVizCrvtCFEclNFwHflw0gWqjioe+Zm1vrKJqUnldCn98MsboD17zd7IoA7fn77 YdbpWKWh1Il3+E5MmJude6Ep83OQIcj5KOm0txZi6uUr32CzP0dgbu3houAUSYvm2zeP yZ/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=SoHk44i+hSrhGCWSov+A62f5mQ4gQxdPxK6xjt+fVz8=; b=oRmtQEknAI0yAZEWip9k13jnFnVUso1pEW86uZOMj1tTjGL/SVka0Ju/idu6TcjX1s ka/p8buKK3vABYNZhwMVLpZN4aJW/Qe49+WgcmkuoitV6U3Uplrm4GL7BQnheg0YVKga ZmDpnyPnGmgtS0jFb8yny0iNMGbeqF2G6rmeGdU0M/AYj4HHhIg1MqBkDNJlTOuYYHGK 9DoFyw4ljW9pAr8YfIwPeTlldhoc8oGOsbuxc1XzcH327m6jYsg0R9kL2Fq3BaboWl44 paSF+0FVi6fsAs1nl2PaDaUwHU82L9ayDdM39xlhselm69EXhDiH0lqWqiw4UD75o6gT Khug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail2 header.b=ChUDHjrs; 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=emersion.fr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020a17090a13c600b001b8cc31c7a5si134436pjf.188.2022.02.18.10.51.58; Fri, 18 Feb 2022 10:52:15 -0800 (PST) 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=@emersion.fr header.s=protonmail2 header.b=ChUDHjrs; 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=emersion.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233725AbiBRLke (ORCPT + 99 others); Fri, 18 Feb 2022 06:40:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:48146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234997AbiBRLk2 (ORCPT ); Fri, 18 Feb 2022 06:40:28 -0500 Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76BE3101F for ; Fri, 18 Feb 2022 03:39:59 -0800 (PST) Date: Fri, 18 Feb 2022 11:39:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1645184396; bh=SoHk44i+hSrhGCWSov+A62f5mQ4gQxdPxK6xjt+fVz8=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=ChUDHjrsfiukE7xWvak5fl+9SyIK7pibGyeOyRknvdnWxOVzG99VSWcQsJSiPUt6f 9grvADHYFpp6DuC3gpQxTA69WdKAKyR7Mo/nwEB5QUyrC/dx+/CtDZF2YWNhQPW2Tl 6+PnGc7RYTUjB1yibcvsbposFqs/0AkGQWJQfO//UxykAiqHXBvIPFzDz0UEkfa/fp MPDl3GjdqU9eTZAdYmjZdoFqdVxzIO9C1MOXcv02MRUgupJ5WQim3ZWvjshZxNREVr Dea5zfYRhicyLTflwxZeX0A1AFnYhkSLuejA6v53Ic38Uw3A/A2lg1P0Tvxx56g9q5 bAYyZ4KyBzgvQ== To: Hans de Goede From: Simon Ser Cc: Emil Velikov , Maxime Ripard , Chun-Kuang Hu , Thomas Zimmermann , devicetree , David Airlie , Intel Graphics Development , "Linux-Kernel@Vger. Kernel. Org" , amd-gfx mailing list , Matthias Brugger , Rob Herring , linux-mediatek@lists.infradead.org, ML dri-devel , Hsin-Yi Wang , Alex Deucher , Harry Wentland , LAKML Reply-To: Simon Ser Subject: Re: [Intel-gfx] [PATCH v8 1/3] gpu: drm: separate panel orientation property creating and value setting Message-ID: In-Reply-To: References: <20220208084234.1684930-1-hsinyi@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Friday, February 18th, 2022 at 11:38, Hans de Goede wrote: > What I'm reading in the above is that it is being considered to allow > changing the panel-orientation value after the connector has been made > available to userspace; and let userspace know about this through a ueven= t. > > I believe that this is a bad idea, it is important to keep in mind here > what userspace (e.g. plymouth) uses this prorty for. This property is > used to rotate the image being rendered / shown on the framebuffer to > adjust for the panel orientation. > > So now lets assume we apply the correct upside-down orientation later > on a device with an upside-down mounted LCD panel. Then on boot the > following could happen: > > 1. amdgpu exports a connector for the LCD panel to userspace without > setting panel-orient=3Dupside-down > 2. plymouth sees this and renders its splash normally, but since the > panel is upside-down it will now actually show upside-down At this point amdgpu hasn't probed the connector yet. So the connector will be marked as disconnected, and plymouth shouldn't render anything. > 3. amdgpu adjusts the panel-orient prop to upside-down, sends out > uevents That's when amdgpu marks the connector as connected. So everything should be fine I believe, no bad frame. > 4. Lets assume plymouth handles this well (i) and now adjust its > rendering and renders the next frame of the bootsplash 180=C2=B0 rotated > to compensate for the panel being upside down. Then from now on > the user will see the splash normally > > So this means that the user will briefly see the bootsplash rendered > upside down which IMHO is not acceptable behavior. Also see my footnote > about how I seriously doubt plymouth will see the panel-orient change > at all. > > I'm also a bit unsure about: > > a) How you can register the panel connector with userspace before > reading the edid, don't you need the edid to give the physical size + > modeline to userspace, which you cannot just leave out ? Yup. The KMS EDID property is created before the EDID is read, and is set to zero (NULL blob). The width/height in mm and other info are also zero. You can try inspecting the state printed by drm_info on any disconnected connector to see for yourself. > I guess the initial modeline is inherited from the video-bios, but > what about the physical size? Note that you cannot just change the > physical size later either, that gets used to determine the hidpi > scaling factor in the bootsplash, and changing that after the initial > bootsplash dislay will also look ugly > > b) Why you need the edid for the panel-orientation property at all, > typically the edid prom is part of the panel and the panel does not > know that it is mounted e.g. upside down at all, that is a property > of the system as a whole not of the panel as a standalone unit so > in my experience getting panel-orient info is something which comes > from the firmware /video-bios not from edid ? This is an internal DRM thing. The orientation quirks logic uses the mode size advertised by the EDID. I agree that at least in the Steam Deck case it may not make a lot of sense to use any info from the EDID, but that's needed for the current status quo. Also note, DisplayID has a bit to indicate the panel orientation IIRC. Would be nice to support parsing this at some point.