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: 117731 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1092810qgn; Wed, 1 Nov 2017 09:37:17 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RpwhBEy/1g+E0AK6cbDC72VeiJsaXhqM+shZGIIXwSJwy0DUM0f7JoVOp0OSvxhawtkUJo X-Received: by 10.99.38.129 with SMTP id m123mr457007pgm.53.1509554237166; Wed, 01 Nov 2017 09:37:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509554237; cv=none; d=google.com; s=arc-20160816; b=MTOyQqX2FrjTbY5ydaoBMTtPDyJa9agbo3E3gzD9iMsFxJEvtcRJiF7KWorknxoP5i J+A627bpxbtGcBt34j0xU3WBhqf8qzheCGifWIMJL8gEv5NsOnzOGEfxTq6olfFoN2QM sJTaOaZqkCKY4F0rixJxjNDULFAi/Y+xcqVmZ3ueqYtDCCJhhI8z3fBVJFHcQC9RbzNs mC96zS6in1ANag4WM/MYS3WLcHK2Vus9oSEtcJ2j9KKW9f5Nxxy+6DVzNGMuNhc3L08D dkWRYddXHF1YcqSdYaRLZw8U2Z1XUjyCHDMPfy0UtWNwPvPuBPHAX2Q92nPe4uKoltEd sVYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=Y+TZNIZAVyaVM6YaTeOEw9jNt7PxEfmSW3111+QARmg=; b=A25WedoquLkJ2Xswky0LXor9byCSZWFqBifGomYjHpUbvkxlMZdnf4PjgGunWFf4zk ZqkQl3GmUnFa3hxYBqDj6i36f7ecG+facQwUac1wrKaBNKfeeE3pQp8yM+9orafB+722 5G2l7v9MQnWNdujqDvVmttboNCVuoHpr7PWeYPLVBUZaeSFtFqpiD6OH84pp+o9mZ5vW nxaEbTGNGPLU38msXCswlIDgnBmy42hYQqvBil4NbpVYFBD6MJWx6NRIdMKVPS2kVCeq EVb1dejvAmkrWuKWBqR1WRfqJINjpYnRPZLxLZEWOHUhXyVmPDLVw+ji+XbcE0xJdhID 8Cqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id m6si111159plt.677.2017.11.01.09.37.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Nov 2017 09:37:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org 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-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" 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;