From patchwork Fri Jul 4 09:44:03 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: 4479371 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A10489F26C for ; Fri, 4 Jul 2014 09:48:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D959B20412 for ; Fri, 4 Jul 2014 09:48:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2847D20411 for ; Fri, 4 Jul 2014 09:48:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A05F46E7D5; Fri, 4 Jul 2014 02:48:48 -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 E6AC06E7D5; Fri, 4 Jul 2014 02:48:47 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 04 Jul 2014 02:43:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,600,1400050800"; d="scan'208";a="538762681" Received: from sonikaji-desktop.iind.intel.com ([10.223.25.81]) by orsmga001.jf.intel.com with ESMTP; 04 Jul 2014 02:48:45 -0700 From: sonika.jindal@intel.com To: intel-gfx@lists.freedesktop.org Date: Fri, 4 Jul 2014 15:14:03 +0530 Message-Id: <1404467043-5072-12-git-send-email-sonika.jindal@intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1404467043-5072-1-git-send-email-sonika.jindal@intel.com> References: <1404467043-5072-1-git-send-email-sonika.jindal@intel.com> Cc: dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [v2 11/11] 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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;