From patchwork Wed Jun 8 09:48: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: 12873114 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 BA3FCC43334 for ; Wed, 8 Jun 2022 09:50:31 +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=nMfeYzTVqVpHkU/9n/6xOcyYprPcWX8J2n+v4p9WozA=; b=QZtuNIxAMLkQGy A/FoeY8pPWuqqALJSt+kaqgfW95lMGGS1yUNkNT57U8lNzpgFqsJjUzF98MIqXVSWL2w5TI4mcfE2 X8A6EeaWYgC1guFXJHipTdMs6O/6gXM3n/EI9vrsZqLe+zM9oHjlRMtR3HxtupWJWz0s93ltInC76 spptkdVNzoqUMf9KoPJCf0WkTSJ8BeiezCsiCa4zv1LrxZCC5R3WVUOKPMJfxvbZqQpshfSUYA9mI xKdW1y8LoMRedFX3Ti+ck2QAaQ+DEHcu+UGFp6gmyxbDvu1Pal0nilEFtSscbMUlu1FI/qM7ZuyKl 1O5QgHsrz6uN/W5ishOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nysJS-00CTRX-Tb; Wed, 08 Jun 2022 09:49:19 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nysIr-00CT9v-G3 for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2022 09:48:42 +0000 Received: by mail-pj1-x102c.google.com with SMTP id d12-20020a17090abf8c00b001e2eb431ce4so17861673pjs.1 for ; Wed, 08 Jun 2022 02:48:41 -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=TKlka2JWr44ssLLTx/ABCtjfqthwug/PJ8osEPhlEiu9s3s0R2eFiNlLU2VVBCK2oY spEI6IcIC0Y7RuS5XIz/7AcpSgMzg9RJ+pNYuGhUAVQ+QcbzhgLC4+gLDblo9s8kXDwj LwKR6/SQt8R+YXpVbDMufrMBVQbFsJS6qxt74= 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=0HMBoCL5Od3NMRJEwWH2HL0bxZq3HrWJ0NYOlx5ZTB0KCw9brZpHz+Dry1hOxg6IxI tnWwIJrqPgWK4qW/kzfxYIKJ57bmIRFGyKJ1IZIdti5PxNAh+vgvwX2mYqQbcluphch1 2udBra5lpvBrKCXsP+4kBFajYeJjYuiXqMrWpx370yyyUTVg+4a4pcdMHhoF10xuuFwC T0jkOVgy4zKjN1ahynP840R5ruDfsBGEXs2kYf8t6/x1xtM1GoR2JNnFZqatBtDC2Oe1 tFVLmQMIjDKf1xlw5qYcptsRpF033SoUm1EcxmCu+3VUCDS7l+6FSgL3gfs22fB1Dyri Enkw== X-Gm-Message-State: AOAM530l3F9PcGhww3yEbDgeibwgBMGpTtF+zlepokv3JquWXbhyQ9x2 3/o5b202gRuNOSKJtFm6Hf0oTw== X-Google-Smtp-Source: ABdhPJziscByCaE36IM356mQcufbuxFzgH4ydP6X03lbRU/92TTGOXEDQhe7TphA6EcNjWJhBZO09g== X-Received: by 2002:a17:90b:1d8e:b0:1e6:74da:97b4 with SMTP id pf14-20020a17090b1d8e00b001e674da97b4mr37453886pjb.147.1654681720998; Wed, 08 Jun 2022 02:48:40 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 02:48:40 -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 6/8] drm/panel: ili9881c: Implement .get_orientation callback Date: Wed, 8 Jun 2022 17:48:14 +0800 Message-Id: <20220608094816.2898692-7-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_024841_575840_C5563B0C X-CRM114-Status: GOOD ( 12.06 ) 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-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)