From patchwork Sat Sep 3 18:37:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Fierke X-Patchwork-Id: 602496 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 6E3A6ECAAD5 for ; Sat, 3 Sep 2022 18:40:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231719AbiICSkn (ORCPT ); Sat, 3 Sep 2022 14:40:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232102AbiICSkh (ORCPT ); Sat, 3 Sep 2022 14:40:37 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 274C929839; Sat, 3 Sep 2022 11:40:35 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 631555C00FE; Sat, 3 Sep 2022 14:40:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 03 Sep 2022 14:40:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maxfierke.com; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1662230434; x= 1662316834; bh=Tx3DFdgigyfpS0RGXNOmDW5kr5FUnVG7KC79bAVMMLo=; b=T b2mptC1d2k7blc6CQXb8fB9SsHbY4U8HviqJsA+Iy1QU7eOZElNHjEtOmUMXj5Rg ZqCst2AWcrYm3t4Cxm2z3txof5Mbuz2sihMwtYglMwMN5UDFBvE2sxVjtl2HzYu4 IIloOuhkdKQAK4jUnl2poJvbuULdC/qcFZhePxTjNGv872tm8O9len3EexODi7Yq wemJ4XEzfMUfNpHE2PLr7GmKt7GiKycKwyLQEXw/C/CZFUnZZfWyoOxJlMG+PJZL zfDpHiFbmSrghJ22jZEyDxUJEQo1n6GWraDAlRI14ErRYN7gSlZqNG62vFZwbyoM 757QdxwICyS4khF6+0hnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1662230434; x=1662316834; bh=Tx3DFdgigyfpS 0RGXNOmDW5kr5FUnVG7KC79bAVMMLo=; b=NnQTErZDs8y0O47HjG2lI9s/qtqTR TjedFU0rxaiHOfL82oqwaLvRreaJrjFhzsT0wm7k5NsSrmMp53f45djmr1QIN9nd C2wwQ8ny5GUOw8z/njLWfRhkJhCGhaC1cou2QzvzIp7CoUyd8GOwCQb2+/xxlAV1 +6W4CRzZOH33wNP5fqIHLJqmqfEAIpe5cA0HoLVJRCXhYlCVLF2awEe4eS8C2byx KFuqBNt1cNqIJgFnabU6Ba9omTBVFVkyzUZ87ZPDcus1qwLgnWPnpjr4rsVp+evx bgE2R58NKcdl+/FDcbl1iKIxSj6cyfw674byOSvUUR2rU35KAxPO0FhqA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdelvddgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestd ekredtredttdenucfhrhhomhepofgrgicuhfhivghrkhgvuceomhgrgiesmhgrgihfihgv rhhkvgdrtghomheqnecuggftrfgrthhtvghrnhepudelvedvtdffhfeugfelieevvedvhe fgvedtteefkeevvdfhieekudeuteefgeeknecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepmhgrgiesmhgrgihfihgvrhhkvgdrtghomh X-ME-Proxy: Feedback-ID: idee9475d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 3 Sep 2022 14:40:33 -0400 (EDT) From: Max Fierke To: thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Max Fierke Subject: [PATCH v2 4/4] drm/panel: clockworkpi-cwd686: Implement .get_orientation callback Date: Sat, 3 Sep 2022 13:37:53 -0500 Message-Id: <20220903183753.25736-5-max@maxfierke.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220903183753.25736-1-max@maxfierke.com> References: <20220903183753.25736-1-max@maxfierke.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Returns the panel's configured orientation Signed-off-by: Max Fierke --- Changes in v2: - this was added as .get_orientation is now available in drm-misc-next since v1 drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c b/drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c index 87d20d784596..2c433a458c8b 100644 --- a/drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c +++ b/drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c @@ -340,7 +340,10 @@ static int cwd686_get_modes(struct drm_panel *panel, struct drm_connector *conne drm_mode_set_name(mode); mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; - /* Set up connector's "panel orientation" property */ + /* + * TODO: Remove once all drm drivers call + * drm_connector_set_orientation_from_panel() + */ drm_connector_set_panel_orientation(connector, ctx->orientation); drm_mode_probed_add(connector, mode); @@ -348,10 +351,18 @@ static int cwd686_get_modes(struct drm_panel *panel, struct drm_connector *conne return 1; /* Number of modes */ } +static enum drm_panel_orientation cwd686_get_orientation(struct drm_panel *panel) +{ + struct cwd686 *ctx = panel_to_cwd686(panel); + + return ctx->orientation; +} + static const struct drm_panel_funcs cwd686_drm_funcs = { .unprepare = cwd686_unprepare, .prepare = cwd686_prepare, .get_modes = cwd686_get_modes, + .get_orientation = cwd686_get_orientation, }; static int cwd686_probe(struct mipi_dsi_device *dsi)