Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp122256iof; Sun, 5 Jun 2022 23:02:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUgZDOxsbcb+lYSgd8gevyJF2L3CSHUdxyZ3L9KxAj74T8PJnfVIwtOrYs8OP0O1jBChWB X-Received: by 2002:a17:903:11c9:b0:154:be2d:eb9 with SMTP id q9-20020a17090311c900b00154be2d0eb9mr22372565plh.91.1654495343076; Sun, 05 Jun 2022 23:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654495343; cv=none; d=google.com; s=arc-20160816; b=Z0AdgPNut+u7cFszM0oVJHAcqbD1u1n6wmnmostudpPhcCqLcEu+nD0+DYWe1ViTPd JZdq9zc3206/Ia9n2kczFUbZSE1NumzmjEVcvaVNlW/o3/qakCqJrGtq0kJMdalBA4L4 80DqB08anWcgIl7KO5Sd4uTLg7r7YsG0d3wlTpTByyc9ank8sOkdXrP6/dbs+3A3XEBe 2PxLFc3Tm9PB8KdQdKMuZmVHu1KADOPwMXZsKQFwe6jGkg6vAiD6w1zNDlwCjI8Unxcq PQFop+LlGngvcHOGTFi+EorHbQC6VTPAuurQ6HWU8Bjf1bGxhRbCIRcSTOAmg56GWsCT c0CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=W8bVxKeCs+luEXxpnTLIbgpg19GNEZEh9tmWHWEe4S4=; b=gtsU9pintEPbQ/0P1v21Wour/ZjQE1l8rbVTvV2x1hK/r2hQvlP09uPId654Vgned7 PrvF68UIe77OeZgRfStjXWwCJH2xQqqDceYw1XN18pkEOxn8+ZuHm07prbLSt0W+ribq KlZtRFzNj6BJ9SBtnNm82Euio/sR8uzcam1Av4blexdQ96nh8F9AESv4uhOtOs9+R0Q4 C7gAVcgV7sAhdfWwqy5gkzhHkmv67n0V8y7eh2l8OekGEvk4cTPJ4G5Ugxlg12K7YDUU rvgmea2Iy4JoNbv8gFQFfjb4WXvMkL0nsemSJuGqFoCfI9amZshEULwD9/jAZc/Vg4XV /P8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fD7kHLPG; 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 t62-20020a638141000000b003db947d50fcsi18924932pgd.174.2022.06.05.23.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 23:02:23 -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=fD7kHLPG; 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 EF8126AA7B; Sun, 5 Jun 2022 21:50:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236612AbiFCEBj (ORCPT + 99 others); Fri, 3 Jun 2022 00:01:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233213AbiFCEBh (ORCPT ); Fri, 3 Jun 2022 00:01:37 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C34F31DC0 for ; Thu, 2 Jun 2022 21:01:34 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id rq11so13623065ejc.4 for ; Thu, 02 Jun 2022 21:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W8bVxKeCs+luEXxpnTLIbgpg19GNEZEh9tmWHWEe4S4=; b=fD7kHLPGCLB6BwqWqEUYpaRcFdRj6SfBXhNT8BN4I9zVIbzLaLp78HxuCGvWRZQMTi uyG/1hzIApR7fvPr0IySLfmaArCFTCp8JebyXa3+LDLDErePMizdjtRfFzLMYQpXcFiQ DZ2TCHIo3llis01Zupghoa06ycO+92zWx1r+s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W8bVxKeCs+luEXxpnTLIbgpg19GNEZEh9tmWHWEe4S4=; b=TshGQ8kv6154XzSb/FMsDmJUsZrSA+DW65A4LvzKTo4uKA/GWFMLKb1nZmNfkOmf9z flQQD1vssBMUh02SsXXk9nId8r9IbvxJQO5F0j5gn7FJDrtrSbCj3uomJrqw/xtyNGxi 1T6p74t2Tzz6Wka+I+TF8uGb54x5YbmZlD4o/BVV3VvmTN3lnVSOk8Lp5dhUGRRCZrQb NOsm+AbV+ygqTaL5h0IhM8xWcvj2unO83n8PQfeiAStVptfkutYd2gj08zD+QRqbuuTW WVQRPInkVddbCnyyW5ZGIhcHf7OY4R1Ksc9ZQPakzu/zLH2nQWNQrBhkVg7n/+STAwBy QYwA== X-Gm-Message-State: AOAM5317WiJzqYyD+HnLHbClOkNmqqN8QpY7Dy5K9a6CQ1ghDThMov+Z /7Vrj8NY9Fs7N/nzLM6bGKk+xyoqkzQy6k1jLRHIEw== X-Received: by 2002:a17:907:2ce2:b0:6ff:30e2:25c3 with SMTP id hz2-20020a1709072ce200b006ff30e225c3mr6928613ejc.494.1654228892918; Thu, 02 Jun 2022 21:01:32 -0700 (PDT) MIME-Version: 1.0 References: <20220601094637.1200634-1-hsinyi@chromium.org> <20220601094637.1200634-4-hsinyi@chromium.org> In-Reply-To: From: Hsin-Yi Wang Date: Fri, 3 Jun 2022 12:01:06 +0800 Message-ID: Subject: Re: [PATCH v2 3/8] drm/panel: panel-edp: Implement .get_orientation callback To: Doug Anderson Cc: Chun-Kuang Hu , Hans de Goede , Thierry Reding , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel , "moderated list:ARM/Mediatek SoC support" , Rob Clark , Stephen Boyd , Rob Herring , Linux ARM , LKML Content-Type: text/plain; charset="UTF-8" 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 On Fri, Jun 3, 2022 at 5:51 AM Doug Anderson wrote: > > Hi, > > On Wed, Jun 1, 2022 at 2:46 AM Hsin-Yi Wang wrote: > > > > To return the orientation property to drm/kms driver. > > > > Signed-off-by: Hsin-Yi Wang > > Reviewed-by: Hans de Goede > > --- > > drivers/gpu/drm/panel/panel-edp.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c > > index 1732b4f56e38..a2133581a72d 100644 > > --- a/drivers/gpu/drm/panel/panel-edp.c > > +++ b/drivers/gpu/drm/panel/panel-edp.c > > @@ -609,6 +609,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 +644,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, > > }; > > I'm curious: should we be removing the old > drm_connector_set_panel_orientation() from panel_edp_get_modes()? > ...or maybe you want to keep it for now because you're only adding > support to the mediatek driver and for other drivers the WARN_ON is > better than no orientation support at all? Right, for the drm/kms drivers that calls drm_connector_set_panel_orientation(), the drm_connector_set_panel_orientation() called in panels is no-op, but others they still need this to be called in the panel. > > Maybe you could put a comment next to the old > drm_connector_set_panel_orientation() saying that it's deprecated and > that drm drivers are expected to add a call to get_orientation()? Then > when people see the WARN_ON splat they'll quickly figure out how to > fix it. ...and eventually we can probably remove all the old calls > from get_modes() ? Sure, sounds good to me. I will add this. > > -Doug