From patchwork Tue Jul 8 05:02:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sonika.jindal@intel.com X-Patchwork-Id: 4502551 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7FB4DBEEAA for ; Tue, 8 Jul 2014 05:06:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C7B0F2017E for ; Tue, 8 Jul 2014 05:06:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 07CB6201E4 for ; Tue, 8 Jul 2014 05:06:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 74F816E4F6; Mon, 7 Jul 2014 22:06:50 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id B800E6E4F4 for ; Mon, 7 Jul 2014 22:06:49 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 07 Jul 2014 22:01:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,624,1400050800"; d="scan'208";a="569763611" Received: from sonikaji-desktop.iind.intel.com ([10.223.25.81]) by orsmga002.jf.intel.com with ESMTP; 07 Jul 2014 22:06:03 -0700 From: sonika.jindal@intel.com To: intel-gfx@lists.freedesktop.org Date: Tue, 8 Jul 2014 10:32:01 +0530 Message-Id: <1404795723-9630-12-git-send-email-sonika.jindal@intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1404795723-9630-1-git-send-email-sonika.jindal@intel.com> References: <1404795723-9630-1-git-send-email-sonika.jindal@intel.com> Subject: [Intel-gfx] [v3 11/13] drm: Resetting rotation property X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sonika Jindal Reset rotation property to 0 wherever applicable v2: Also calling set_property of the plane to set the rotation in the plane structure. Cc: damien.lespiau@intel.com Signed-off-by: Sonika Jindal Reviewed-by: Damien Lespiau --- drivers/gpu/drm/drm_fb_helper.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index d5d8cea..30806b4 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -282,9 +282,23 @@ static bool restore_fbdev_mode(struct drm_fb_helper *fb_helper) drm_warn_on_modeset_not_all_locked(dev); - list_for_each_entry(plane, &dev->mode_config.plane_list, head) + list_for_each_entry(plane, &dev->mode_config.plane_list, head) { + + if (plane->rotation_property) { + int ret = 0; + if (plane->funcs->set_property) + ret = plane->funcs->set_property(plane, + plane->rotation_property, + BIT(DRM_ROTATE_0)); + if (!ret) + drm_object_property_set_value(&plane->base, + plane->rotation_property, + BIT(DRM_ROTATE_0)); + } + if (plane->type != DRM_PLANE_TYPE_PRIMARY) drm_plane_force_disable(plane); + } for (i = 0; i < fb_helper->crtc_count; i++) { struct drm_mode_set *mode_set = &fb_helper->crtc_info[i].mode_set;