Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp127500iof; Sun, 5 Jun 2022 23:11:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxikf+VMLVeI12WFTJKlr+SxENQyNrRNxCQCScYmFi4UeF4FbN3Br9vnUaWP9yT0gtoNOrL X-Received: by 2002:a17:90b:1b08:b0:1e7:71de:7714 with SMTP id nu8-20020a17090b1b0800b001e771de7714mr18975439pjb.214.1654495867826; Sun, 05 Jun 2022 23:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654495867; cv=none; d=google.com; s=arc-20160816; b=QNxOjOh1e3UQD7onwJsKUq2cfXCqEKSJcpzTXiOKxARfkdWiCkKrb6JGk1m0xPBjuF AFBKo8iiY/520prt4gvgyXFA21G13lyMiUXkR5FUGEidTFlgEatG9+nNtN1y4C44wSrU Y30v+JiG+07mklKJAw9iLulG6JA6+5qgjSBPW1es1bv8oj9WuDZtm1GKGVev26mhzypn 4ZesXKwB4EtkSf2azNWNTzqt8tE5ZbKo8lWsgdwG1L8qSL0Gol+uaPUK5BBZDgadUDFv H46vaOZRSQF/HZuRT5R0/56ScENV4ccEIY43DgYtJJYymSGVMLxqFm0Zilr6lgBZjS9w bh0A== 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=hGnDD5r5M3UXCU6BZiTbTzLZsBiSocgUQfxs0cDS1G4=; b=EkZya7L5gHHNS4rNbBsN99NpC5a/GvJs8tOJZvvny+bBtjoJAz+3ErMIaYzekCplt2 PfOEC2H+pTdIl27Bye3SwARC9Bdddsy8Er7p/iSyEAVciHqAxjyViv68HyT2uvZK6cSA c5XxyIg4MGhnGTEShfqoaakhnD62YW8oGeCsJE/A9YEfzLy5Ps1dV1hBoT3PNWMD/OEC 1j55VqWSGzPWlA35dv82azW8eTmTAxv9zoxP4FojyNhSSo4ev/dX4YP0saJQRu7osrR8 NaV2aGdODn+9ObrGMWak7wnTv6QrtpHDLDSghO8Hw1f4/+9Z+FOaBVkaCLhlB79NxLF0 K6Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=l30rCOLi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id o88-20020a17090a0a6100b001e858081883si6934969pjo.64.2022.06.05.23.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 23:11:07 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=l30rCOLi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 39071150A28; Sun, 5 Jun 2022 22:03:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229495AbiFFEuX (ORCPT + 99 others); Mon, 6 Jun 2022 00:50:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbiFFEuV (ORCPT ); Mon, 6 Jun 2022 00:50:21 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB05C2F1F32 for ; Sun, 5 Jun 2022 21:47:34 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id mh16-20020a17090b4ad000b001e8313301f1so4907459pjb.1 for ; Sun, 05 Jun 2022 21:47:34 -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=hGnDD5r5M3UXCU6BZiTbTzLZsBiSocgUQfxs0cDS1G4=; b=l30rCOLic8LaKGIFsKhI6vz67rGgjxbrO3jiCldFNIW8I5OkLf9aDeJzRGh8jMUXQr SdCvlbgXiwhwr5/BW2rNXyL5J0Ps9u1DEZr8MjIpgqYLPWpvNzo7Yl+yZKxpXm2JIANR IIiMhDTbZV4a5Cc7egdsQqqF+o3IIyQ41+HPU= 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=hGnDD5r5M3UXCU6BZiTbTzLZsBiSocgUQfxs0cDS1G4=; b=UgbquxQb1V6Lz7ZXR1KVCtotfAyYAjGyHHKDtKpC5KBeaFZ6Wn0pU8pW4LCWEaAmLK kRhRuZZDCA/8HHR6uQJrokgDtjmzAcelKAWBO/UIjaFqdWE56E/Nk4ZzGQjtJGZoXU36 VZ/91cD5c2Mvb1bpj6ueqf87nw5HA1x/C8iGwG0oh1yT0Qo1QgJF1Sgjd9wKALwAr0iL D0Q1kvm2MiS9Cuvh8JCZsN12Pyxt21v3bczaczj0xPK/KkBZtHjPJDVLLwbEmlSLg42x UmJ9qi0scOdRQmj7s2rUhkKaWU4G6hPUi5UrW39/S59k0QdvpIiWGYMKfy4RKU+7RR7X cluA== X-Gm-Message-State: AOAM533tnqrJdRrUM21Xraaio73Feq78tCDzt1HxG+A45b0QcieAWu6h CdSaO1Ul4lKg/GiYkqmCZ+OEQg== X-Received: by 2002:a17:902:c407:b0:163:df01:bbbc with SMTP id k7-20020a170902c40700b00163df01bbbcmr22376780plk.4.1654490854118; Sun, 05 Jun 2022 21:47:34 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:ced3:b110:401b:b32c]) by smtp.gmail.com with ESMTPSA id t190-20020a6381c7000000b003db7de758besm9718609pgd.5.2022.06.05.21.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 21:47:33 -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 v3 2/8] drm/panel: boe-tv101wum-nl6: Implement .get_orientation callback Date: Mon, 6 Jun 2022 12:47:14 +0800 Message-Id: <20220606044720.945964-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220606044720.945964-1-hsinyi@chromium.org> References: <20220606044720.945964-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 --- v2->v3: add comments for notice. --- 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