Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp568933iof; Mon, 6 Jun 2022 08:39:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2AEjKTGUx0Dl0KOOxN9pWojwiICfFcj8/58bayLanFzAtTJFcUfmP6BZ30PstEkG3LrTH X-Received: by 2002:a17:90a:77c5:b0:1df:dc04:526e with SMTP id e5-20020a17090a77c500b001dfdc04526emr62471823pjs.225.1654529976741; Mon, 06 Jun 2022 08:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654529976; cv=none; d=google.com; s=arc-20160816; b=B1LHff90IiXFPd8A5HWZttyWWVQUx2Kk6Tqcc7K98HNCugTjbsBTQeorIKaE0ITm66 8U5CybLEbbPkxxGvUiW7EzqDmfSb1XMceO2DfXy/elP85cRI/bPRL/l1aHR01hjJAXBT B+7iaMOaqsOx9/oi5HngvyYGd8JSOy7qkL4/ri8sPkebr52GRJrL42PRW2fx3SZE8JpK DciRFpIlDSagrs9AmUTRoLOR+A2pHnmQKrQm3+Flnidu3Rj4shMH//2sjC0ChQxN2ol9 /AhlqecKMNx+yiFiNz/J3drSKc+tDodQ4o068IxUV1ublDE0fqUfrXsnRDTKfvbGL7nX 7kjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/04hnBCcV0Pb71XDCLpgktf4L1f1O++fCdArJyAeL3A=; b=TOhSRthhUid6phYP08zq/V921kIWEaVTF5V/xEFFrwJ1ThEhc/sHNgBotBK0TGJrWo +9/oqQ12XnoKUoZ0P/uerAKaKgT0iI4OURUzvXdmdjSDp+/z53lbavTyyRFjdzzjVT5z LSazeIcow+ijY27/ISwvUmLZjT42/iL3sJPgg2zuLFEfFINNV5lvoBsuPSL1q1RvOObq OPL9JQpiwPgDHHmLfjG6bELeoJyoUDUyrTkU8jEQVfsN1fXWmwx2W15XypuWw8dv6PiL 0tHMtY9EIuwrZ9lsOqUjz0Dd6mSV4bFJC5lPkKYioh5beBP/EJoWhSD98qsARmjNpWJV WdUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="hvgs/sbS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m11-20020a637d4b000000b003f9e159641fsi21953334pgn.663.2022.06.06.08.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 08:39:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="hvgs/sbS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0C44A31C162; Mon, 6 Jun 2022 08:25:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240535AbiFFPZE (ORCPT + 99 others); Mon, 6 Jun 2022 11:25:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240513AbiFFPYq (ORCPT ); Mon, 6 Jun 2022 11:24:46 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0FBA2BA946 for ; Mon, 6 Jun 2022 08:24:44 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id h192so6379104pgc.4 for ; Mon, 06 Jun 2022 08:24:44 -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=/04hnBCcV0Pb71XDCLpgktf4L1f1O++fCdArJyAeL3A=; b=hvgs/sbSKFZQ23bXVpNvG2e3L5fQtSrJK3kobvZqiQL7AvZNRVYWFjhg8WgisISjVe dLXOT07VdQ2XS6nNO95Rr1zbAA7rrlxjJvM8Tr0ZpAaRqKqEtYEBCYc243PiP68vQdDC NbvC5YDPj4dIkZ7/lF1Ffu7sOaDHoluH+DNMM= 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=/04hnBCcV0Pb71XDCLpgktf4L1f1O++fCdArJyAeL3A=; b=cZxlaZFxT1RCsYcsmfCjyNZVeCBtgUkWOgE3Mdw4NqSpAS2W4ja0nHyCX2wGMujHcx ofqULgbC5LGne6m3ywN2waFT+TmcO5DRPrzUFxceBgB9uStGxNhYPcPm7HWFhSHETMbR ZezqJkHSxxg6R368XtWZsuMwzVEOSCq3xjGV10n37IwSE/nEOa5omH6OoRuoL1C2O27N HN8YBxjQ2spgaTqFBiKSniENhD+rlxSDH0TMQ6zHrrNhZM0iioK1QoU2CFXYkLbe1JKc 9t73Nu3syzHXitFst3JvW8VHPeFFA5fyMWokOCwmq1WAHcwEALzViBawghfGaTPBrRcE Zg6g== X-Gm-Message-State: AOAM532WoEjgvdDfQd8qPED5JH4FhwAJ7ndB3D05wAfQTCyUX/jo/f5U dcbrqmL1t//TbDH2A281pRM/7w== X-Received: by 2002:a05:6a00:23ce:b0:50d:823f:981 with SMTP id g14-20020a056a0023ce00b0050d823f0981mr25132792pfc.10.1654529084342; Mon, 06 Jun 2022 08:24:44 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:a0a:5e4:e24:c8c4]) by smtp.gmail.com with ESMTPSA id h1-20020a655181000000b003fbaae74971sm10749306pgq.72.2022.06.06.08.24.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 08:24:43 -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 v4 2/8] drm/panel: boe-tv101wum-nl6: Implement .get_orientation callback Date: Mon, 6 Jun 2022 23:24:25 +0800 Message-Id: <20220606152431.1889185-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220606152431.1889185-1-hsinyi@chromium.org> References: <20220606152431.1889185-1-hsinyi@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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-boe-tv101wum-nl6.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index 1be150ac758f..a9cd07234179 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -1511,16 +1511,30 @@ static int boe_panel_get_modes(struct drm_panel *panel, connector->display_info.width_mm = boe->desc->size.width_mm; connector->display_info.height_mm = boe->desc->size.height_mm; connector->display_info.bpc = boe->desc->bpc; + /* + * drm drivers are expected to call drm_panel_get_orientation() to get + * panel's orientation then drm_connector_set_panel_orientation() to + * set the property before drm_dev_register(). Otherwise there will be + * a WARN_ON if orientation is set after drm is registered. + */ drm_connector_set_panel_orientation(connector, boe->orientation); return 1; } +static enum drm_panel_orientation boe_panel_get_orientation(struct drm_panel *panel) +{ + struct boe_panel *boe = to_boe_panel(panel); + + return boe->orientation; +} + static const struct drm_panel_funcs boe_panel_funcs = { .unprepare = boe_panel_unprepare, .prepare = boe_panel_prepare, .enable = boe_panel_enable, .get_modes = boe_panel_get_modes, + .get_orientation = boe_panel_get_orientation, }; static int boe_panel_add(struct boe_panel *boe) -- 2.36.1.255.ge46751e96f-goog