From patchwork Wed Jun 8 09:48:08 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: 12873110 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 D51ACC433EF for ; Wed, 8 Jun 2022 09:49:37 +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=RIn9JP6dVJtqMSgiDh9SxwRDeuxqq7wd+hqseQ05wbo=; b=u8cEjC75xy4BZR 6ajRm0PfCGWAp+q/BBZWWs+Dc7NPxKIutD8DAz2WfmFSmLxCw0IX9mwM8aumnLAmyPF4cY+HWW7p9 R9HacBSkSRdFRpHcNyAbMm1flRs3H6qlFhqR4v3ARuV2/qYKIFyB+ii/94xwnP6Z9ZnIJH+a9ITPs bLbt+n3OlS1tvM+szfK2VHaETH/8kPPIkhTS1VbthGT291Tte+ZUpS9NcEv5RnyrimVEGvfcKcPVD lgdiYJWtjtxZEus39h/WRsaAe8arqLCdaqvDRj8OkxGrZQlHLDUncaMWOVYZbzB4oxovdRVb/Mvri EhfP7N2nBdyGwsrv6J9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nysIe-00CT5f-Gs; Wed, 08 Jun 2022 09:48:28 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nysIa-00CT4C-Mn for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2022 09:48:26 +0000 Received: by mail-pl1-x633.google.com with SMTP id d13so1518755plh.13 for ; Wed, 08 Jun 2022 02:48:23 -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=Xoj6Y6vsBc6hOtaXqeaeGFoJW8FafEOdkg5HbhVP/pQ=; b=ID4FZPatRWu6aKxAGWULNw3AmgDv3Cu0P9obA2A1AwWJXmfD1b1bk4RFCLFLnxOJib MpCD28iv6vJrfnKfQ/hNC9AfC4h6piTj0FtXXRNEncuhiyBwMcsIC+uLHVEh+DBKUH9H g/XjIEptHyQJv3NBf4eiNQu5uy1eX43PcqjJk= 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=Xoj6Y6vsBc6hOtaXqeaeGFoJW8FafEOdkg5HbhVP/pQ=; b=ZWdqg8AW0Cl45XB7eVjAvT5/kWIHDQpi/8zaDVratNBpgIPEu8+9G9QXhxcXqnExTn nuy3rUeqNZhTMBkRpyHt9963PZYVIj6ZTcyNdVYDXjlB99De0fKrJrRANm0KCRV2j8rT IKofAKiicDKwAuFG/s9gJrERoanOBSvcmeJ1oF52dtyR7TD6hEQUTjMWmpIwsZ3U9jFD meKRn0EjOSiwjDelrBlzDAyokcNUMoYcuM1vfZUvJDT8YzPqZYzO+WVG3aY8csj47MDV L+nnbhaymd1IOU41fzPFNp5vTCUP42GUQvAFz29IgdazMw8xs3mufM2+fkGVZ58/NAQK 9qKQ== X-Gm-Message-State: AOAM531isSWjfnik+UmrCLIIfiuN6pfytm8jgC819bJb4wK8vvLS53y8 YvSqAgIiXmd6g8ZLBMDkJeZyoQ== X-Google-Smtp-Source: ABdhPJxPs9NcvxXZUKf1/v6rkHbKlBgtRBGn0bAl8jj+zewKhtrKaIRrG03sGONezyJrVcrnO9M6ZQ== X-Received: by 2002:a17:902:bd83:b0:167:8dd5:6a5a with SMTP id q3-20020a170902bd8300b001678dd56a5amr9767295pls.114.1654681702602; Wed, 08 Jun 2022 02:48:22 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:c46b:e7b1:f6c8:5eb8]) by smtp.gmail.com with ESMTPSA id t10-20020a17090a950a00b001e28e80a8d6sm13584038pjo.38.2022.06.08.02.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 02:48:22 -0700 (PDT) From: Hsin-Yi Wang To: Hans de Goede , Sam Ravnborg , Stephen Boyd , Douglas Anderson Cc: Thierry Reding , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Rob Clark , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 0/8] Add a panel API to set orientation properly Date: Wed, 8 Jun 2022 17:48:08 +0800 Message-Id: <20220608094816.2898692-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-20220608_024824_804061_67C28138 X-CRM114-Status: GOOD ( 11.21 ) 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/ 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: Config orientation property if panel provides it drivers/gpu/drm/bridge/panel.c | 36 +++++++++++++++++++ drivers/gpu/drm/drm_bridge_connector.c | 8 ++++- drivers/gpu/drm/drm_connector.c | 32 +++++++++++++++++ .../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_bridge.h | 3 ++ include/drm/drm_connector.h | 4 +++ include/drm/drm_panel.h | 9 +++++ 12 files changed, 165 insertions(+), 3 deletions(-)