From patchwork Thu Jun 9 07:27:17 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: 12874937 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 59040C43334 for ; Thu, 9 Jun 2022 07:29:50 +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=nBkF7MPLORvEVGa6t1UaY6HJK0QtY9pNQSZ6l0mxQzg=; b=kWuG3UNJ6ZdVhg rZel2uQaNVbaBOuD77/AGAO3Kl26VlQgqiAnD+uklLlfLzyy86+bduSq95XgUMiihXSARlCQCHh3f cW/Q9zAXqXn1bXVF2aQlWaZaw2PwlcQqzOJ+XkVt6zcsL9xsTBPbxiJTWQD2wURpNKpaW+gkCu2YP ReSFMtGCclql2XGvAfXYkCZGrR8SAPDIZhWGhKWbNM1eciUMhzt3M37aOHJZlJ8xd5U9j7gqegdcH BI1jn9F70wXuQw7wh+mePp8ocmjAhWVJX5OKOL6MsZZ0cg+B9iG8ZWoJGZzoinAjY+GcSvSw6ceaP 4Gxm9Ml0lW+WSff8SIJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzCat-00HP0y-Nz; Thu, 09 Jun 2022 07:28:39 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzCa5-00HOXB-8Z for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 07:27:50 +0000 Received: by mail-pf1-x430.google.com with SMTP id w21so20412013pfc.0 for ; Thu, 09 Jun 2022 00:27:47 -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=/3gA/gCwNifa063k5zO2io8sIa7XPaHVQ/76HnmkOsg=; b=NMwQPNA8GcvOzDm4isJzui7YhPgnhg1xX3kh0UaVTH2jfU4mkwDoRC0quvFK4/QecR arfnWRpveJ0pUy0K4Zn7eItprSorYSdiUF0DxIYSzy+sPVzUfh/4UU+9GQWFSrnbBwol 4dws/dn+SgtfP55mhYaY5yVIN0hIRkMuNotpU= 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=/3gA/gCwNifa063k5zO2io8sIa7XPaHVQ/76HnmkOsg=; b=1ykqS8rsrNyNNl9EhSeaU7TeadkHXdX74o5Vhuc4ZFaAchcVrfdS/414bYZ6/WXus2 MBzwlI73EnkIliOKUQjONcXEhK+fgehQprUEFeAfCFfMvQ6si+dnDFDV+E/paxm8DQ2s 8V5K1edpQvJl0IolC8f6AcNpR274kFRc5pyd9VU22B0/jXw2TlZ2l25d+/COxjAcCeqL uo6FyZfbS/T3neY8MMq/VoNeDbXBVswdjcZuUbNifaihXa5EOLATy1KBK5/57vWpxNzX g1JqM9rgdVVgMW0I39FJtybVZt1HBXMs9I1cMlv/G3PqYHi1amMpkXobaK2VmK06u207 k8YQ== X-Gm-Message-State: AOAM530OIPwM282MkSRxNIoLcFtHDAqIOuJkNLWEQyUTXgrnJppq0bMu Fogu5YFBBmbLs/ZEawZms1J4Jw== X-Google-Smtp-Source: ABdhPJxNBX/FBxOUBMeGOirfu/EQZDMrKKnPoYbe2fo82dpTd1VenDY+rtKnkXplac6gWM5VzUu+0Q== X-Received: by 2002:a05:6a00:15d3:b0:51c:1a20:f8d8 with SMTP id o19-20020a056a0015d300b0051c1a20f8d8mr19746114pfu.57.1654759667464; Thu, 09 Jun 2022 00:27:47 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 00:27:47 -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 3/8] drm/panel: panel-edp: Implement .get_orientation callback Date: Thu, 9 Jun 2022 15:27:17 +0800 Message-Id: <20220609072722.3488207-4-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220609072722.3488207-1-hsinyi@chromium.org> References: <20220609072722.3488207-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_002749_382966_B7B0CA77 X-CRM114-Status: GOOD ( 14.05 ) 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-edp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c index c96014464355c..ee622c1dd5322 100644 --- a/drivers/gpu/drm/panel/panel-edp.c +++ b/drivers/gpu/drm/panel/panel-edp.c @@ -586,7 +586,10 @@ static int panel_edp_get_modes(struct drm_panel *panel, else if (!num) dev_warn(p->base.dev, "No display modes\n"); - /* 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, p->orientation); return num; @@ -609,6 +612,13 @@ static int panel_edp_get_timings(struct drm_panel *panel, return p->desc->num_timings; } +static enum drm_panel_orientation panel_edp_get_orientation(struct drm_panel *panel) +{ + struct panel_edp *p = to_panel_edp(panel); + + return p->orientation; +} + static int detected_panel_show(struct seq_file *s, void *data) { struct drm_panel *panel = s->private; @@ -637,6 +647,7 @@ static const struct drm_panel_funcs panel_edp_funcs = { .prepare = panel_edp_prepare, .enable = panel_edp_enable, .get_modes = panel_edp_get_modes, + .get_orientation = panel_edp_get_orientation, .get_timings = panel_edp_get_timings, .debugfs_init = panel_edp_debugfs_init, };