Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp599383ybz; Wed, 15 Apr 2020 14:53:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKjPoW/0gX6qdlR1k6CMgiyxUyZNm6/++i6QXBGwwJqly+qJuTbvxvNCYMHs4foNCP6sg6y X-Received: by 2002:a50:c20a:: with SMTP id n10mr27878231edf.319.1586987611640; Wed, 15 Apr 2020 14:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586987611; cv=none; d=google.com; s=arc-20160816; b=BiyFtfyTw+Hn6zO1wFQ9DPD1/9QN28mFYvabgpk6urxWhtiJ4jU9fNBsevIKjAlUri 95K6BZBWrhbU1f3cYRYjx0gScXMLfjLkrCBgpOYgTJiDHF7otKk7Tcqjj2rOK42H20IJ UV4So2QFvAAmg0gs6CSlEc1Fxadhxw9k8piQZ2KpibUmyqZolWHqVgtaeyFfg8ASatTY qEsNjGwJmFV1sFIZEM5BHD7O+qJ+cZs3l+Ufm8pnxtbPbsoaB52+xjOYavxJOXl0HKJ/ o25cIP+fvnHllBmyBdVulxj8oWkouY4GTuAvx1eogIEAv5noR+ji7sbuWDB9AQkQPNP1 Rj3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=r6dF4D+wN0hoeI/HD/8hpNX9Zi5cUiRTSVM80fnZiTg=; b=llqvd7qJfr4RcWmxlaRrhKAIVr12XMYb0yS4o02/BTDPveH9qIqLQHX0UiPEiMfMdN lYSyv+Up4luAphtocKxkxUzL3aou7bkGz7PRANi9ZX+KTYBRpEi5W2I0Sm/PSH8ekHoK PgyR49PbQTX+07vibhHwuD5sF2qdgSgvswwc9ATerYmcx/Qh23Y9QTi+GEFBUnYKho7m JhdSYwUQZZyzsxAKY6SagKSKlJzuWmmij9iX42UbNFEoJ3JKL4S9t4JujZAfcDu2h9eG xt+17ERKfmShF0cUQ/0AsmnMltRqPLUJONSL5hXEFUjqbIlvDZRBsrZJlzIjVkCohRCO hWWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fBwO8Izr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si11092275edq.38.2020.04.15.14.53.08; Wed, 15 Apr 2020 14:53:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fBwO8Izr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504846AbgDNTcx (ORCPT + 99 others); Tue, 14 Apr 2020 15:32:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2504842AbgDNTcP (ORCPT ); Tue, 14 Apr 2020 15:32:15 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A31AEC061A10 for ; Tue, 14 Apr 2020 12:32:14 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id a81so15586108wmf.5 for ; Tue, 14 Apr 2020 12:32:14 -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:content-transfer-encoding; bh=r6dF4D+wN0hoeI/HD/8hpNX9Zi5cUiRTSVM80fnZiTg=; b=fBwO8IzrniZxcSL/9GbflmZPAl8MqOi6BSiWdmNVZDtvwiDrXcJ8sFwXX48lFfCr/X wAgnGE8TBRQDx7zep17eczot4owoqocmojJ2B1UIF3996KL5H5yKdjPmNSVnUf4AqjNa rln2yoActQTeguQWHfcZC3czrrvZnhzuMvVik= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=r6dF4D+wN0hoeI/HD/8hpNX9Zi5cUiRTSVM80fnZiTg=; b=jRZ/TtiuA3Grkkk4jpAsnki4NPcI4pB3Fnvx4W/Swty3O9+lriZC0KyXRUI3JuXTUY XC75oRFyUJkfZ1n3bfAYsXMU9hagDzSuu/YzDwYc8W+taNuUsU0fGoj54S8XqnsKvUQj aGxC5g5U1+qeG5vRxqZaBFXfhkK5A4fyOV9kImTHR+dQNa3LC46hDzXnMxCLXL1cc9ko BWjamDzYZjqgU3AdWYzmevaUWp4GATGPMnA7hX2luHdkpqpUUhJNHrxGfjyC29rg3ZXz UGMeaI67YALDLstW2z4od+uB0PKzah+U0C162cONTtYPNk2T9gMN0gChXZxzXGvNWKNT OU5A== X-Gm-Message-State: AGi0PuZKGTUtS+4epN0/vaxddYm6xzBqMvg2nWQnUCi/OAMdC63f5s+T qMHwNABOYTr7XvRb59MsO+VVZG9ssxT3U6tPxtrC1w== X-Received: by 2002:a7b:cb03:: with SMTP id u3mr1303254wmj.12.1586892732880; Tue, 14 Apr 2020 12:32:12 -0700 (PDT) MIME-Version: 1.0 References: <20200306002112.255361-1-dbasehore@chromium.org> In-Reply-To: From: "dbasehore ." Date: Tue, 14 Apr 2020 12:32:01 -0700 Message-ID: Subject: Re: [PATCH v10 0/2] Panel rotation patches To: Dmitry Osipenko Cc: linux-kernel , Thierry Reding , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Sam Ravnborg , David Airlie , Daniel Vetter , dri-devel , "linux-tegra@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, sorry for the late reply. On Sun, Mar 8, 2020 at 12:25 PM Dmitry Osipenko wrote: > > 06.03.2020 03:21, Derek Basehore =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > This adds the plumbing for reading panel rotation from the devicetree > > and sets up adding a panel property for the panel orientation on > > Mediatek SoCs when a rotation is present. > > Hello Derek and everyone, > > I'm looking at adding display rotation support to NVIDIA Tegra DRM > driver because some devices have display panel physically mounted > upside-down, and thus, display controller's scan-out needs to be rotated > by 180=C2=B0 in this case. > > Derek, yours panel-rotation patches add support for assigning panel's > orientation to the connector, but then only primary display plane > receives rotation value in [1], while rotation needs to be applied to > all available overlay/cursor planes and this should happen in other > places than [1] as well. This is intended. We don't correct the output in the kernel. We instead rely on notifying userspace that the panel is rotated, then we handle it there. > > [1] drm_client_modeset_commit_atomic() > > Please also note that in a case of the scan-out rotation, plane's > coordinates need to be changed in accordance to the display's rotation. > > I looked briefly through the DRM code and my understanding that the DRM > core currently doesn't support use-case where scan-out needs to rotated > based on a panel's orientation, correct? Is it the use-case you're > working on for the Mediatek driver? Yes, we rely on userspace to rotate the output. The major reason for this is because there may not be a "free" hardware rotation that can be applied to the overlay. Sean Paul and others also preferred that userspace control what is output to the screen instead of the kernel taking care of it. This code just adds the drm property to the panel.