From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 615FAC433F5 for ; Mon, 30 May 2022 08:54:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234579AbiE3IyL (ORCPT ); Mon, 30 May 2022 04:54:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234434AbiE3IyC (ORCPT ); Mon, 30 May 2022 04:54:02 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B5DB186DB for ; Mon, 30 May 2022 01:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653900796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RhvgJCFXfv5RG+0oVTAct7gmCCzDguggkQSBJ+VAo/A=; b=jUyl4v1DIWAxH3aJqAMDe2eFcp+t5N+xnWazHJK9G1SJ6M8wapKhb4q4FdgAQ0PviY4tkj WnE+rhJtp8eg828swerCQeZw0nvX2gZf5/nkLk155V5kMHGm6wU7wBibSYFWU/E+rFnjw2 rWQ8Q2z93dAej3YQ5T55T3HFtgWP5Qk= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-214-PXfeAs_QPmussrcE0nZABw-1; Mon, 30 May 2022 04:53:14 -0400 X-MC-Unique: PXfeAs_QPmussrcE0nZABw-1 Received: by mail-ej1-f72.google.com with SMTP id gr1-20020a170906e2c100b006fefea3ec0aso3800996ejb.14 for ; Mon, 30 May 2022 01:53:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=RhvgJCFXfv5RG+0oVTAct7gmCCzDguggkQSBJ+VAo/A=; b=dmME08sudxqcwaqvB3J+Rj7DinyQOJ9ZcBMv3UAR9f+oI9rJuJtk5w6Rx/OI+Uok/0 LV5bUwYnodFcs2xwBcv6mEUzmoXE7eubxI5TNZcqkCdcvfI0iDcZi0Df5W7dNn3glTKM 4FhvikzDvOc8hBqMQk/34PwgJJayDjEAAgKclNfiv5klsJILNNE6svvW88R4k/Ja1V0r hVrlrUo4o+Q9fzDu2dr7S5/zLLaxAcxFbUaUBl7Yi3tKh9stcY7b8GoXqV5hTnQUppAy tYwavBYuDspEDo8tkehAPTKKh9dood3scQPeSY2B6ufrKY9Dcp+GMHj9eQwCNgNejvrb zWnQ== X-Gm-Message-State: AOAM531yznh/xbmjuA7OF5ZcyYtG0RBlg5IKFk9C0kjiAql5NnwBUTs3 sdVrjM0fhb12vCFqd1ym+b//aq2ditPexNiLL5ezbGoTxQHzogVyPJGVPLyvMxpjp4iU0/bKjQG O8YKXaWkxDwnuaJ/2Jd1OUw== X-Received: by 2002:a17:907:6e20:b0:6ff:1541:8d34 with SMTP id sd32-20020a1709076e2000b006ff15418d34mr20498816ejc.447.1653900793067; Mon, 30 May 2022 01:53:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLS9X1+J2YlCZd50xUKza5F2TAaKjqsoBWgZZta9P6P5hLJgXAWFm13+BAHE9yuTPrdLSHXw== X-Received: by 2002:a17:907:6e20:b0:6ff:1541:8d34 with SMTP id sd32-20020a1709076e2000b006ff15418d34mr20498786ejc.447.1653900792873; Mon, 30 May 2022 01:53:12 -0700 (PDT) Received: from ?IPV6:2001:1c00:c1e:bf00:d69d:5353:dba5:ee81? (2001-1c00-0c1e-bf00-d69d-5353-dba5-ee81.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:d69d:5353:dba5:ee81]) by smtp.gmail.com with ESMTPSA id v16-20020a1709062f1000b006fea2705d18sm3807438eji.210.2022.05.30.01.53.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 May 2022 01:53:12 -0700 (PDT) Message-ID: Date: Mon, 30 May 2022 10:53:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v10 0/4] Separate panel orientation property creating and value setting Content-Language: en-US To: Hsin-Yi Wang , dri-devel@lists.freedesktop.org, David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Rob Clark , Stephen Boyd , Douglas Anderson , Chun-Kuang Hu , Sean Paul , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-kernel@vger.kernel.org, Rob Herring , Matthias Brugger , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Simon Ser , Harry Wentland , Alex Deucher , Jani Nikula , Emil Velikov References: <20220530081910.3947168-1-hsinyi@chromium.org> From: Hans de Goede In-Reply-To: <20220530081910.3947168-1-hsinyi@chromium.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, On 5/30/22 10:19, Hsin-Yi Wang wrote: > Some drivers, eg. mtk_drm and msm_drm, rely on the panel to set the > orientation. Panel calls drm_connector_set_panel_orientation() to create > orientation property and sets the value. However, connector properties > can't be created after drm_dev_register() is called. The goal is to > separate the orientation property creation, so drm drivers can create it > earlier before drm_dev_register(). Sorry for jumping in pretty late in the discussion (based on the v10 I seem to have missed this before). This sounds to me like the real issue here is that drm_dev_register() is getting called too early? To me it seems sensible to delay calling drm_dev_register() and thus allowing userspace to start detecting available displays + features until after the panel has been probed. I see a devicetree patch in this series, so I guess that the panel is described in devicetree. Especially in the case of devicetree I would expect the kernel to have enough info to do the right thing and make sure the panel is probed before calling drm_dev_register() ? Regards, Hans > > After this series, drm_connector_set_panel_orientation() works like > before. It won't affect existing callers of > drm_connector_set_panel_orientation(). The only difference is that > some drm drivers can call drm_connector_init_panel_orientation_property() > earlier. > > Hsin-Yi Wang (4): > gpu: drm: separate panel orientation property creating and value > setting > drm/mediatek: init panel orientation property > drm/msm: init panel orientation property > arm64: dts: mt8183: Add panel rotation > > .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 1 + > drivers/gpu/drm/drm_connector.c | 58 ++++++++++++++----- > drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++ > drivers/gpu/drm/msm/dsi/dsi_manager.c | 4 ++ > include/drm/drm_connector.h | 2 + > 5 files changed, 59 insertions(+), 13 deletions(-) >