From patchwork Tue Jun 7 09:05:47 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: 12871564 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 07C6EC43334 for ; Tue, 7 Jun 2022 09:06:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 11D7411A6A2; Tue, 7 Jun 2022 09:06:18 +0000 (UTC) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D6DC112DF1 for ; Tue, 7 Jun 2022 09:06:17 +0000 (UTC) Received: by mail-pf1-x42d.google.com with SMTP id p8so14988627pfh.8 for ; Tue, 07 Jun 2022 02:06:17 -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=1HCnyXhOafzmcP69v2HLalUicns4RO/ZQ4qvjS6XyGk=; b=ge9Jny+hYIej3cj9ag/91xWa81svwEBV3N/ogFXUBgG8rjD7S/momLJGj/7KfP47Wy LYvdSpbngfwMYyTZAwYAiJC5uxG+viVuvfdtirnB7O0giwIJnl+IUWu8X0LiYKRKC6/z Lb0aWIcnWIDHNQ4GOq+bVdZ8jjlqGU35La27o= 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=1HCnyXhOafzmcP69v2HLalUicns4RO/ZQ4qvjS6XyGk=; b=G0QjipumzNJWS6sZBxVJJTpV3KRt0bmvuqUfOqNV9Ger3xjF1Ku65YJJCRDnbPui/F db8/yzs6WrwoV514ZfGNQM/OKw47cYLp5WzcP6DVmPHqjGvPhTF0tE8YL8Qgc7JKBfxq Pxmcs1kDlZNIohWEoPu3EBBkK0U7ziM2EeW+exNX0uiYwgd66UyaB8gw42206NMftp+u WDEbPDfhGwMiva0beWndxcdY8RC9PBFB/DNjgoOBz5OIcC9xJ2eC3mst3Y6vpnJ1k/3D Sjtgf59gtO2wC6gwW2Mh8TriLhMYZ8S6l3UWBL1G1IuECW/vjewN9dwVm84z9pC8JzJ9 gBbg== X-Gm-Message-State: AOAM530I97Mmf4MdeS2Q80kvLNfTdFfJ2TK5wVAhIf/HW+NZNhjvswYm bkQJXByLme916LJcv7Tu4V3i/g== X-Google-Smtp-Source: ABdhPJxKZGd/WWz8p/7xzdQeoeP8D9dga0Yr240VSGPMjirb2qQdTmq6Ah77nkDx9vsM0hVp0VQ0UA== X-Received: by 2002:a05:6a00:1a49:b0:51b:8e5d:424b with SMTP id h9-20020a056a001a4900b0051b8e5d424bmr28485080pfv.66.1654592776372; Tue, 07 Jun 2022 02:06:16 -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.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 02:06:15 -0700 (PDT) From: Hsin-Yi Wang To: Chun-Kuang Hu Subject: [PATCH v5 6/8] drm/panel: ili9881c: Implement .get_orientation callback Date: Tue, 7 Jun 2022 17:05:47 +0800 Message-Id: <20220607090549.2345795-7-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220607090549.2345795-1-hsinyi@chromium.org> References: <20220607090549.2345795-1-hsinyi@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Rob Herring , David Airlie , linux-kernel@vger.kernel.org, Douglas Anderson , Stephen Boyd , Hans de Goede , Thierry Reding , linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Matthias Brugger , Sam Ravnborg , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To return the orientation property to drm/kms driver. Signed-off-by: Hsin-Yi Wang Reviewed-by: Hans de Goede Reviewed-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c index ba30d11547ad..58d6798c25ed 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c @@ -853,17 +853,29 @@ static int ili9881c_get_modes(struct drm_panel *panel, connector->display_info.width_mm = mode->width_mm; connector->display_info.height_mm = mode->height_mm; + /* + * TODO: Remove once all drm drivers call + * drm_connector_set_orientation_from_panel() + */ drm_connector_set_panel_orientation(connector, ctx->orientation); return 1; } +static enum drm_panel_orientation ili9881c_get_orientation(struct drm_panel *panel) +{ + struct ili9881c *ctx = panel_to_ili9881c(panel); + + return ctx->orientation; +} + static const struct drm_panel_funcs ili9881c_funcs = { .prepare = ili9881c_prepare, .unprepare = ili9881c_unprepare, .enable = ili9881c_enable, .disable = ili9881c_disable, .get_modes = ili9881c_get_modes, + .get_orientation = ili9881c_get_orientation, }; static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)