From patchwork Tue Jun 7 09:05:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12871569 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09AF9C43334 for ; Tue, 7 Jun 2022 09:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Pb8MqBPaiq+VMHX/xPWbS2MwpygmvOJSJK2gGDCMMgc=; b=DZf7q4FqVN3l7/ N1qPVa43rjghMXFmvD8viOlYmTxhS/fwUcUOO/0pvaMCN/Jzt04HuizWLELfwL7SW3K444RQm3R4X y2avr4Sx51uy2tpoGSe5n0KQd7OeAHDfnJOT87wtEgVtGjd8MdlBphgDZqyFxTlmvRF+G/BzjWud2 LtzaooKK+IgbqgTb3UEKWt4fkkWlsEFL3lU88zzoBbLgtnzh/1FLIzapVrVJTs8SUaDenV+/rlK3L oRwNOzpo15EFxQg3P/ibdWzvdbgxq+8UY52cfBr2ldgCmVa8Rg6BoSRM7JmnA79m2UUuFdbt3BaSK //4tMalSR1JqoGKKNYHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyVDk-0065Cp-3U; Tue, 07 Jun 2022 09:09:53 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyV9x-00634x-CL for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2022 09:05:59 +0000 Received: by mail-pf1-x42d.google.com with SMTP id e11so14981205pfj.5 for ; Tue, 07 Jun 2022 02:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=U4LE7zrySWEA9gMurfRvYyAHVJx1m9VkHmbAjloR5rc=; b=OSmFZAqcOBYpVk9PtT//wYdshGIbZFqLmNvinrT7LM2bplu1QaPw+SAh9TblfHTm81 tHtOg9TZdOLiWycsapflLUGU+qZw0lGKzsP2SvF0Sru6lkn3VoC4KdThYPVwFRvsn7IC DSxoneUuol+XxCC8sHbzH+zHV1oF13gvUW5o4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=U4LE7zrySWEA9gMurfRvYyAHVJx1m9VkHmbAjloR5rc=; b=lDwkp3bqDd3uLVn857Rd4pBxLG9YS+w9o3nDxbXE0OEo5sFXmSzeTcIIG2UqpNnPzc yhbCk96YKNZros2afS2vLqswfqi2bpvQdsxoeT7DsF2OJlsURfJv7uiP8mH2K5ruyEex 0gcLIEuytDMieq4sU8C7FTVjZZKPVnjnwxJ0wbaEWsshp4gywX+Om+D1+TG7i7bmG/el na7Lqx1gIAVFVKJNJP1xBNOtQffnZvCCUuZfMDcXxSzSt1vPINhUKeZ7Y/sbxuFjhrNp 6y8Se6icKtRKu9R1ZaP74R62DsM6WHOTIZPmLgKBltTFrH7zY+TLPeVWtdBTgV+W8vDQ 4ENw== X-Gm-Message-State: AOAM533aX1IbFlh6cIqCEGEB8ICgMLNdrnawB1PJTyN7uyk6Mm8LWdiG k5DI9PLgRMBmDE5XgFmTv6SGIg== X-Google-Smtp-Source: ABdhPJw1n+xUkdGWbXx1cahLihtS+UTJFd1fPnlTaE3+N4brLzLb0z8zg/XQOnqI8aeTH/v2v9Cp7g== X-Received: by 2002:a05:6a00:244a:b0:4fa:ebf9:75de with SMTP id d10-20020a056a00244a00b004faebf975demr28675288pfj.73.1654592755183; Tue, 07 Jun 2022 02:05:55 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:40b7:55ce:10ee:c7a0]) by smtp.gmail.com with ESMTPSA id t27-20020aa7947b000000b0051c0fe8fb8csm4507010pfq.95.2022.06.07.02.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 02:05:54 -0700 (PDT) From: Hsin-Yi Wang To: Chun-Kuang Hu Cc: Hans de Goede , Thierry Reding , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Rob Clark , Stephen Boyd , Douglas Anderson , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 0/8] Add a panel API to set orientation properly Date: Tue, 7 Jun 2022 17:05:41 +0800 Message-Id: <20220607090549.2345795-1-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_020557_689190_9B6B08A7 X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Panels usually call drm_connector_set_panel_orientation(), which is later than drm/kms driver calling drm_dev_register(). This leads to a WARN()[1]. The orientation property is known earlier. For example, some panels parse the property through device tree during probe. The series add a panel API drm_connector_set_orientation_from_panel() for drm/kms drivers. The drivers can call the API to set panel's orientation before drm_dev_register(). Panel needs to implement .get_orientation callback to return the property. [1] https://patchwork.kernel.org/project/linux-mediatek/patch/20220530081910.3947168-2-hsinyi@chromium.org/ v4 of this series is "Add a panel API to return panel orientation": https://lore.kernel.org/lkml/20220606152431.1889185-1-hsinyi@chromium.org/ Hsin-Yi Wang (8): drm/panel: Add an API to allow drm to set orientation from panel drm/panel: boe-tv101wum-nl6: Implement .get_orientation callback drm/panel: panel-edp: Implement .get_orientation callback drm/panel: lvds: Implement .get_orientation callback drm/panel: panel-simple: Implement .get_orientation callback drm/panel: ili9881c: Implement .get_orientation callback drm/panel: elida-kd35t133: Implement .get_orientation callback drm/mediatek: Config orientation property if panel provides it drivers/gpu/drm/drm_connector.c | 32 +++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_dsi.c | 15 +++++++++ .../gpu/drm/panel/panel-boe-tv101wum-nl6.c | 12 +++++++ drivers/gpu/drm/panel/panel-edp.c | 13 +++++++- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 12 +++++++ drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 12 +++++++ drivers/gpu/drm/panel/panel-lvds.c | 13 ++++++++ drivers/gpu/drm/panel/panel-simple.c | 14 +++++++- include/drm/drm_connector.h | 4 +++ include/drm/drm_panel.h | 9 ++++++ 10 files changed, 134 insertions(+), 2 deletions(-)