From patchwork Tue Jun 7 09:05:45 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: 12871576 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 99CC7C433EF for ; Tue, 7 Jun 2022 09:14:45 +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=iVcowEgNVI657t /Ui8ccK5L+I6JwsKeHEnOyFbNRmmIoov6GijuQ07uM/qiX9CVYpMq5FzfiQR0svVSK3Eo5yCA7hRD NIQxvajN33RG+gcLtPfAJgzlpbjhJvCPtuKkHeg/T/DHlaIEEteX6fGD6qYCqluruoz2IbzTqgxwC i3QueimOEAemrCwqclJV27HAhmCpFjKVJGlK/NSEOCGD5edjHGgf8QqonWrkteyQuoupa0kfknL4h SoDeVlrSoyaCxxkqqDr3I26fBozndEByuvdfgNzW1hFj6NkBn3akUY/uzvzwLVJXM/Ar8Vgwh+ffI 6gVma4WtHIB17s7K1QUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyVHB-00673D-Gz; Tue, 07 Jun 2022 09:13:26 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyVA9-00636m-L2 for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2022 09:06:12 +0000 Received: by mail-pl1-x62d.google.com with SMTP id n8so14328167plh.1 for ; Tue, 07 Jun 2022 02:06:09 -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=KkdhkZR0WaPbNGFjnV5JiCzsW/4Td/Y1uAFcoXb7bs6qedkwYqr4useNkOhECnjn51 Aq3h7Q9o6cOxgUZHsiYDmtF1268mVFmhpOCB/F3QQ8y02faY5NkR3KYqvXQzUO7cqmiO 2nqtwa7AfOlK/1DOFkxqwBsRQTuz59g/WYL28= 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=eo3myc+2W8IlldyUrnOk9nxXwIcZpsoSJ6qqF1t92xaEr+vxeOd65f5ZWQpFr/FX68 8vlRQeZkl7F8Fgl7gkHUct36GEDjCgyUO1PatavgGYNyiUzbisuA51mOWDRi6WOi7wcr Tlv/6okpMLl8pFpWXIqbJZNR918o/Do7eDvbUyosm4zCsi95pV/r6d/Arg1VUgHkqoQU LS8YGmfjDvkg7Y/iB/o/Y+QC9bRdXVoDv3Vjv0Wv8Xm6I4VhPszVMWmxBZwwh/lzFPrf KJuC17ObIuDnSFU8l6DnEh/d+VWuEP8QSUxlSwkDxhJud95TKFOgq1fHbDSISxYyM4EM aDkg== X-Gm-Message-State: AOAM531WG/iPsVP9rBejvuVWyAdRVRe4w9ovlcfjAiwxH1AmkMl3khks 6D4HIsuyz+4kDOyQqTROjWvXPA== X-Google-Smtp-Source: ABdhPJxUb/prMt/A7sRaNQTJtn9oWDj3rVo1IOvfLfcAgTaDday8s3jr1NXmj+cqqrwS88WfrUyMFA== X-Received: by 2002:a17:90a:8b93:b0:1e2:728b:1fa9 with SMTP id z19-20020a17090a8b9300b001e2728b1fa9mr31329972pjn.167.1654592769235; Tue, 07 Jun 2022 02:06:09 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 02:06:08 -0700 (PDT) From: Hsin-Yi Wang To: Chun-Kuang Hu Cc: Hans de Goede , Thierry Reding , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Rob Clark , Stephen Boyd , Douglas Anderson , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 4/8] drm/panel: lvds: Implement .get_orientation callback Date: Tue, 7 Jun 2022 17:05:45 +0800 Message-Id: <20220607090549.2345795-5-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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_020609_769475_9C57FDD9 X-CRM114-Status: GOOD ( 13.32 ) 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 --- 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)