From patchwork Wed Jun 8 09:48:12 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: 12873117 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 A6CE7C43334 for ; Wed, 8 Jun 2022 09:51:33 +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:References:In-Reply-To: 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: List-Owner; bh=16vXaaVFGnNpak31TxmhOhH1K67eK88C/LiYMPWUzuk=; b=uzaNv8pKLlhtOZ P3TL0wOIk11nd4JIYcF/2GCuu/R2jz+qPjw7nn45DZ/LfSxFMMUmHZVOLrQ8RL4Jpd2+H2qyfoEBJ 1bBOXmeaO7TQ0jaQdpNV93Js1yPiJkBQ2SzDAkPfZEMYCpl/EKxdh7DBdd3ALKgWw+89ozX6zUq47 8eH+8y7bUs/L0qkR+qsKPi+4GXyVNJlnJJ/YVKgjWHyKTLv1Ng90lX1qOgo0xry6BPW5XRMoPWb1T WT8cbUr1OwgA6/mSGjAol5IIV0zvoFtB7afUNjPuqRSe47ibXDeNs/hYatNskCEIojkmJiUqu/j9d 8MBL5VPmmJ45dwcLNWTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nysKS-00CTt1-RU; Wed, 08 Jun 2022 09:50:21 +0000 Received: from mail-oa1-x2c.google.com ([2001:4860:4864:20::2c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nysIy-00CTBt-6C for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2022 09:48:49 +0000 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-fe15832ce5so826997fac.8 for ; Wed, 08 Jun 2022 02:48:45 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=URQgL2yUP1UPEGjFj3Vtkw+GlIVy5pPiHox/tAieZas=; b=guUBWKPAZLE2AlknSqalQJBGhSqpjjGX0nCX7fEpw8mzo0ObUjigy0AnDfLEAgdFk7 Y8GbNFpn/KksfZR0VbXB03OYgAEdrAzGbZiNOhgBNz3CaGmcY822U1qi1ig0Bh6r+fBz n+dMy4c5aZO+9GYZOnCLA+xXQx2vcJI4LqdQ0= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=URQgL2yUP1UPEGjFj3Vtkw+GlIVy5pPiHox/tAieZas=; b=cdqzTx9dA0/OakOUqpbnVhf+mL7Ecd7QAWf/lFxJZFIdO8hlMXztLlnfVjgWfnENJA SbdrhZk3v1dsQZM/cKdN5adlNrn/7t06L5AGfcCEm/NMc2jsh8KfyEjkb0NDSyyt77Cz L48Hkbd50qf/6mLADZcJxjUt/npfVO3kRVVP77K4N8ZLvP1qTnVNmOfKKjGcG4mArmSI t8yp4kLOq8UnzCMQGY7y1hoYs8VY5LcW6ERzfUHBfmZiTwLwH9rL11DB1jFm4wpLzbjU H57/F4+fWhZAPSlcmKBrV0+diEsb7ytquOucJCbIWSP4KdLRZMnIpfXYrGzzESPz43Ro mmYQ== X-Gm-Message-State: AOAM531cskw4EOmKiURl9irSoZ6zD6ooP1PiznO7XxW2TGaprD+3P5Zv bYpMU5PGv9GMQKujrEBZuK5Vqqtm8ardXQ== X-Google-Smtp-Source: ABdhPJwy4JZc4zb4+EKQwQ9hvDSYmC3kXEw76KbN7E6cksRjAfK4BeN+5E0C6Ehlqqimys/OXDBLMw== X-Received: by 2002:a17:90a:4897:b0:1c7:5fce:cbcd with SMTP id b23-20020a17090a489700b001c75fcecbcdmr72094458pjh.45.1654681714929; Wed, 08 Jun 2022 02:48:34 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 02:48:34 -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 4/8] drm/panel: lvds: Implement .get_orientation callback Date: Wed, 8 Jun 2022 17:48:12 +0800 Message-Id: <20220608094816.2898692-5-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220608094816.2898692-1-hsinyi@chromium.org> References: <20220608094816.2898692-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220608_024848_298437_B89CD82A X-CRM114-Status: GOOD ( 12.39 ) 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 To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd --- drivers/gpu/drm/panel/panel-lvds.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c index f11252fb00fe..7a4fedc63e8e 100644 --- a/drivers/gpu/drm/panel/panel-lvds.c +++ b/drivers/gpu/drm/panel/panel-lvds.c @@ -99,15 +99,28 @@ static int panel_lvds_get_modes(struct drm_panel *panel, drm_display_info_set_bus_formats(&connector->display_info, &lvds->bus_format, 1); connector->display_info.bus_flags = lvds->bus_flags; + + /* + * TODO: Remove once all drm drivers call + * drm_connector_set_orientation_from_panel() + */ drm_connector_set_panel_orientation(connector, lvds->orientation); return 1; } +static enum drm_panel_orientation panel_lvds_get_orientation(struct drm_panel *panel) +{ + struct panel_lvds *lvds = to_panel_lvds(panel); + + return lvds->orientation; +} + static const struct drm_panel_funcs panel_lvds_funcs = { .unprepare = panel_lvds_unprepare, .prepare = panel_lvds_prepare, .get_modes = panel_lvds_get_modes, + .get_orientation = panel_lvds_get_orientation, }; static int panel_lvds_parse_dt(struct panel_lvds *lvds)