From patchwork Thu Jun 9 07:27:14 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: 12874934 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 E891ECCA473 for ; Thu, 9 Jun 2022 07:28:46 +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=CrsB1VzKhygYpRYxZkyupbELRjcZSxILclRuqFQM+r0=; b=ttBwKXnaQuRVal iamgw0TkMmR5o9dLTRRQ8B3Dj/uuK97EXTFVlW+VXUhocAgOBfDblmO7I9+jXing4X/z2QMZlRjtW DLMBSj2/61UgkZ6QO+pSecPnqAhfsBSDQkutJTrD4WJyaG69+W3jry0TI5onXFiTIDdPMafPh1WlP 9cag+mxA0dtz/G4oNYO/V5oIwl+cBXwrb3ijIe2mWBNJgspb8Ko5nWnFbgm4bjRV8MCo2dHrcLdFO IvXzDPVoY9FB7TObxzeUGgzqc8Y6lODvpsUcOIMzCY5zSpFckP4wPP2PSaTuyyD6+eouLGzZvm6Ku ERvJy3GRS4w0ZQZIdMWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzCZx-00HOSj-II; Thu, 09 Jun 2022 07:27:41 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzCZs-00HOR9-P3 for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 07:27:38 +0000 Received: by mail-pj1-x1029.google.com with SMTP id o6-20020a17090a0a0600b001e2c6566046so25978390pjo.0 for ; Thu, 09 Jun 2022 00:27:36 -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=1na78G+WYnf+bDU7BFeNQ72mHl3X9VY6UTeZz/scWws=; b=dxaeejukIjJiySX01gLIqKev5aQJJwNLrHV58fbo4DG9P6QF2p6Kji3n6hUcepaFLA usWl2HCL75kVDDyV2zNZwWPqAYwPV8uLnruCzinCg8fmJi0T+UlkAxbpspPelswch61n 0FpgmZpv8zr9gt9LWaxwPY3/gnF2ll4Wy5y74= 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=1na78G+WYnf+bDU7BFeNQ72mHl3X9VY6UTeZz/scWws=; b=0va7AZa2unwIJGgxmYfLPfMJZEdeeEAadj40JPTbhDt3NQ7m8Bf2Jtodj9Poi1vWgG gW634IEaVKFnacJmXvrFixqQWJ2zS5e/1WLccxlsp07pJyWZkH4uW8rTM3jC+BfZbsoM +rAtEtF+KDW1Arl6er117e7Z+rgBqxVO0vaiyNzoM9DnDlDaboZMRHZyoweTe33z70vv wDl+sWmPtf4j9kDm0Xx9oJLB9Bpkd5Jm5wuUlaw5iB92iBWVSrexQwrOrTt6cGSCoE3H NGDy9v4eJc67Zl8HnLJ/g5UpP1YRLYhriGcmOZOhJhDOpxvYNMs+fyFxZcjZ9rgyrOp5 o7zw== X-Gm-Message-State: AOAM533kzD/7NkXsI4q2p2+yfTwRAxAOn7H+bPcGZ8ws0GNu14RcL64j tbGh4LFSMtsT5w6uEySgQ3omIw== X-Google-Smtp-Source: ABdhPJweM0KK9iVhSZ8fBaZxUAiJUsiXSH2sG/EeYGjG+JHL8lvAGJbrav8zVhmsuoRbvr0UlIh0KQ== X-Received: by 2002:a17:903:22cb:b0:167:992f:60c3 with SMTP id y11-20020a17090322cb00b00167992f60c3mr11306012plg.59.1654759655956; Thu, 09 Jun 2022 00:27:35 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:5119:d95b:c6cd:77fb]) by smtp.gmail.com with ESMTPSA id p16-20020a1709027ed000b0016403cae7desm15312221plb.276.2022.06.09.00.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 00:27:35 -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 v7 0/8] Add a panel API to set orientation properly Date: Thu, 9 Jun 2022 15:27:14 +0800 Message-Id: <20220609072722.3488207-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-20220609_002736_875581_B37EC342 X-CRM114-Status: GOOD ( 10.88 ) 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 | 34 +++++++++++++++++++ drivers/gpu/drm/drm_bridge_connector.c | 8 ++++- drivers/gpu/drm/drm_connector.c | 31 +++++++++++++++++ .../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 | 14 ++++++++ include/drm/drm_connector.h | 4 +++ include/drm/drm_panel.h | 9 +++++ 12 files changed, 173 insertions(+), 3 deletions(-)