From patchwork Wed Nov 1 16:37:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 10036737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F16FD602B5 for ; Wed, 1 Nov 2017 16:37:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8784428698 for ; Wed, 1 Nov 2017 16:37:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A5B728CBC; Wed, 1 Nov 2017 16:37:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6C62B28698 for ; Wed, 1 Nov 2017 16:37:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6EDC16E7B1; Wed, 1 Nov 2017 16:37:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-f66.google.com (mail-oi0-f66.google.com [209.85.218.66]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3319B6E7B1 for ; Wed, 1 Nov 2017 16:37:13 +0000 (UTC) Received: by mail-oi0-f66.google.com with SMTP id w197so5350531oif.6 for ; Wed, 01 Nov 2017 09:37:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=mpxl8aX2JcKjgGkxiJt5/hHMMRtY3jKrf7/3HumxhKQ=; b=WO4leHzMOJgWOuPKbl9Eu7XtB+MTFADqLTBAozLVWNLbupi2LGqmic4sIkuwr78ACC /IFo4NGbMEGujfwedSrpORh2EtGclzqrBoQGCL1D5dO6/7PDfzJcOPEQSR9k2JSCFqYs FNjBfpDDmEsPhjS/9Ob6EZGZV7y5B68tm6j7JV7oQGKPVXKB5ihkR6TOIyo+z62p1SSH NYMPM8kAxhQ9zy/k9g6wfe67JaFpK0Fg7mc2wZGQq1eBi+Fkw0dbP9vapd5cWrD8Akio pHhuv90EbjVLanaMHpV06djdoNgKe0Cwaf+26m7gG+3BmkBQHpy7Swlo+wUEfiImTF9h PbqQ== X-Gm-Message-State: AJaThX5CgiaVpArJKZtAoatNb8YEBH9n525jiPV2gqzZ335XWlLdI8gd uBncAGH+ZCiz6cItIelxZQ+R3gc= X-Google-Smtp-Source: ABhQp+TVJTBT61z0pRb5CDoP8Om3wiaNk1YAy8OECT18jViIyDpl6GDtKjKcIv/A/HghChyg69G9ZA== X-Received: by 10.157.46.23 with SMTP id q23mr238899otb.180.1509554231940; Wed, 01 Nov 2017 09:37:11 -0700 (PDT) Received: from xps15.herring.priv (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id b9sm368499oii.25.2017.11.01.09.37.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Nov 2017 09:37:11 -0700 (PDT) From: Rob Herring To: dri-devel@lists.freedesktop.org Subject: [PATCH hwc] drm_hwcomposer: correct handling of DRM_MODE_ROTATE_0 Date: Wed, 1 Nov 2017 11:37:10 -0500 Message-Id: <20171101163710.13779-1-robh@kernel.org> X-Mailer: git-send-email 2.14.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP If the rotation property is supported for a plane, then the rotation value must be non-zero. For the case of 0 degree rotation, DRM_MODE_ROTATE_0 needs to be set. Signed-off-by: Rob Herring --- drmdisplaycompositor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index 8225726df5cd..dceb78d452c4 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -581,6 +581,8 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, rotation |= DRM_MODE_ROTATE_180; else if (layer.transform & DrmHwcTransform::kRotate270) rotation |= DRM_MODE_ROTATE_270; + else + rotation |= DRM_MODE_ROTATE_0; if (fence_fd < 0) { int prop_id = plane->in_fence_fd_property().id(); @@ -610,7 +612,7 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, } // TODO: Once we have atomic test, this should fall back to GL - if (rotation && plane->rotation_property().id() == 0) { + if (rotation != DRM_MODE_ROTATE_0 && plane->rotation_property().id() == 0) { ALOGE("Rotation is not supported on plane %d", plane->id()); ret = -EINVAL; break;