From patchwork Thu Jun 9 07:27:18 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: 12874938 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 81478C43334 for ; Thu, 9 Jun 2022 07:30:41 +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=Oe0mbQDmLPZ4BFSkVo6wRg310p+fvirWK5bfpiPAl8w=; b=M46AYpFGghrgBA 367VrKZnLOBkVqKcxFaVfgZCyKAzQ9k6WbYKXD3Xu+ihLHLp8XfyxStcYpMN7v7fYaOXNfXLSaa+m JWVbQqr4/5kGmZ3Rs/RWqbsHIzdCQyI60gAlUH8OoBO/d0qYwatLtb7l/pB7ORcu1yLeh2CDhOkK7 R9a5MMmXBmFslqXBFf2ixeIud1B33PZITCqhEt/EaA3XT6m1rpu/nZyZClADtMdUEVZUPkFaIh0vR mQyZb7t0YFYH1MraKQUBXXYbrdn3wcqhVBbIVUhl0WlxggBoyHfC5khe+NdbdTzHdxDT0eflzolR+ 2NxLJVLcysVDVoUPt66w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzCbe-00HPOU-7k; Thu, 09 Jun 2022 07:29:26 +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 1nzCa9-00HOZg-VV for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 07:27:55 +0000 Received: by mail-pj1-x102c.google.com with SMTP id a10so20640596pju.3 for ; Thu, 09 Jun 2022 00:27:51 -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=979njmg3lDINGZi/hjk1WmVdoXok3WEPuAqEU9cZJ2k=; b=j9KpAI/b9qRseLDWsOBweqGi86kh7wYZQ3ofyFDfkDqIfZ+/HB8ErM8G4QPMbx/1K/ wrn500+3sYP2OfOeyGIlRevPsuSzxegJU4bDZ01Hl0kdJZqsMwrQoTkyshushfeQtZor gqU3O6bM87DjmVq4Kln8bX86DBr+n1dbNzoV4= 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=979njmg3lDINGZi/hjk1WmVdoXok3WEPuAqEU9cZJ2k=; b=oPozhzRwVqE/R5aV1717fNcKSfus5q+W3MQXLnvBcD5c0j2ILD5gtSbZHp7vZaEwDz VCscH1AeSKEgweHmRvQDONH0AzJJvRo4hPxDLQv15iZPtMHXiHa07NUzWkS42i7BCyCU 3kYExh0zS+26PEwBiwnirHyXgL3fnNNgWlbGS4u4w08LGYQtr/owXrkLqjzdOmwEi3kM TV13Goy+nt3KNBuBPBwIMvQBvt8VEMcfFu+JyUHrqtjRyUF7det9oC+s3/ZW+oT/G9Xy YkNE4Bwfv96UcUd0SqxKgrF4z/DOBRrQIsJbNomioXsJzqSSBTxexhJ2SwHx+OeALvhV CtAw== X-Gm-Message-State: AOAM5311pwuGCy9513iyM+Fx4KICnSM6mWEw8nizAceuPeQ2qnq9Fnav k7tCNQk4g7PeR1Qy1+HbxJuhUQ== X-Google-Smtp-Source: ABdhPJzUtYiKc+YHbz9WSYk2PsW/dDB6EjjkY/X/5kiQ0m6h6L5dfv1hbOR67mOKxuCqT6BPA0oK+g== X-Received: by 2002:a17:90a:4e82:b0:1ea:3f61:51b with SMTP id o2-20020a17090a4e8200b001ea3f61051bmr2127811pjh.16.1654759671059; Thu, 09 Jun 2022 00:27:51 -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.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 00:27:50 -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 4/8] drm/panel: lvds: Implement .get_orientation callback Date: Thu, 9 Jun 2022 15:27:18 +0800 Message-Id: <20220609072722.3488207-5-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_002754_080283_AAA9D9B3 X-CRM114-Status: GOOD ( 12.04 ) 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-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 f11252fb00fea..7a4fedc63e8ec 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)