From patchwork Mon Oct 24 10:03:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Archit Taneja X-Patchwork-Id: 9391815 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 7A9D66077A for ; Mon, 24 Oct 2016 10:03:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B122280B0 for ; Mon, 24 Oct 2016 10:03:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D0C228ED7; Mon, 24 Oct 2016 10:03:34 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 C45B2280B0 for ; Mon, 24 Oct 2016 10:03:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 329F06E246; Mon, 24 Oct 2016 10:03:29 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id EA6DC6E246; Mon, 24 Oct 2016 10:03:27 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CE5B761ADE; Mon, 24 Oct 2016 10:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1477303407; bh=19DLn7aed7GeUK8cZTk0UZ1UU+5rEfLfGrJ7qENZWDs=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=mqK9m2h29TrtCg8YDqqycHLmbDwhLpke3d7JS5ROJPW8K06RLtUscCgtHAZmIwRt2 81JVKRPhWMqKjHt3K5S5nwcJ6VVMpQC8V0tycGK3bWVrylR9uu73SwkWGp7yOIVGQo j3is+k7eGBapbU05r9/q3KvQbzt1l3TQAJoI5Cl4= Received: from [10.79.40.55] (unknown [202.46.23.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6A79961ADC; Mon, 24 Oct 2016 10:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1477303403; bh=19DLn7aed7GeUK8cZTk0UZ1UU+5rEfLfGrJ7qENZWDs=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=Rz3Hv9XHkyAKxZN+jqYxEQH+/hsgLaaP70VBBnvPGxfNmDBa/bpkbJ4WvN6v/0zaG 99udjlDk6PwWxE1FeW2qXpf0FoSVfGHxHdqlA7DRlk8V/6e+QKluBG0TScSp6Rh2nB 7lAAGdFhg0ySsPZINNWeJrxMBWryXfgwTJ97Vvms= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 6A79961ADC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=architt@codeaurora.org To: ville.syrjala@linux.intel.com, dri-devel@lists.freedesktop.org References: <1477077768-4274-1-git-send-email-ville.syrjala@linux.intel.com> <1477077768-4274-2-git-send-email-ville.syrjala@linux.intel.com> From: Archit Taneja Message-ID: Date: Mon, 24 Oct 2016 15:33:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1477077768-4274-2-git-send-email-ville.syrjala@linux.intel.com> Cc: Jilai Wang , intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH v2 1/6] drm/msm/mdp5: Use per-plane rotation property X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Hi Ville, On 10/22/2016 12:52 AM, ville.syrjala@linux.intel.com wrote: > From: Ville Syrjälä > > The global mode_config.rotation_property is going away, switch over to > per-plane rotation_property. I was trying to test this on msm/drm using modetest. The 180 rotation works fine, but drm rejects reflect-x and reflect-y rotation prop values. Is this expected? I needed to make this modification to get reflect-x/y working too: Otherwise, the patches look fine to me. Thanks, Archit > > v2: Drop the BIT() > > Cc: Rob Clark > Cc: Jilai Wang > Cc: Archit Taneja > Signed-off-by: Ville Syrjälä > Reviewed-by: Rob Clark > --- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c > index 951c002b05df..2653ad893ebc 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c > +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c > @@ -75,15 +75,11 @@ static void mdp5_plane_install_rotation_property(struct drm_device *dev, > !(mdp5_plane->caps & MDP_PIPE_CAP_VFLIP)) > return; > > - if (!dev->mode_config.rotation_property) > - dev->mode_config.rotation_property = > - drm_mode_create_rotation_property(dev, > - DRM_ROTATE_0 | DRM_REFLECT_X | DRM_REFLECT_Y); > - > - if (dev->mode_config.rotation_property) > - drm_object_attach_property(&plane->base, > - dev->mode_config.rotation_property, > - DRM_ROTATE_0); > + drm_plane_create_rotation_property(plane, > + DRM_ROTATE_0, > + DRM_ROTATE_0 | > + DRM_REFLECT_X | > + DRM_REFLECT_Y); > } > > /* helper to install properties which are common to planes and crtcs */ > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index a747bb1..9fcc2c9 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -711,7 +711,7 @@ int drm_atomic_plane_set_property(struct drm_plane *plane, state->src_h = val; } else if (property == config->rotation_property || property == plane->rotation_property) { - if (!is_power_of_2(val & DRM_ROTATE_MASK)) + if (!is_power_of_2(val & (DRM_ROTATE_MASK | DRM_REFLECT_MASK))) return -EINVAL; state->rotation = val; } else if (property == plane->zpos_property) {