From patchwork Mon Jun 23 05:36: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: 4399411 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 F401BBEECB for ; Mon, 23 Jun 2014 05:39:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 304E720295 for ; Mon, 23 Jun 2014 05:39:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4A7F4202A1 for ; Mon, 23 Jun 2014 05:39:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 89A2B6E0FD; Sun, 22 Jun 2014 22:39:30 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 24A786E10A for ; Sun, 22 Jun 2014 22:39:30 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 22 Jun 2014 22:39:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,527,1400050800"; d="scan'208";a="532508980" Received: from sonikaji-desktop.iind.intel.com ([10.223.25.81]) by orsmga001.jf.intel.com with ESMTP; 22 Jun 2014 22:39:28 -0700 From: sonika.jindal@intel.com To: intel-gfx@lists.freedesktop.org Date: Mon, 23 Jun 2014 11:06:01 +0530 Message-Id: <1403501761-15049-4-git-send-email-sonika.jindal@intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1403501761-15049-1-git-send-email-sonika.jindal@intel.com> References: <20140619082148.GR5821@phenom.ffwll.local> <1403501761-15049-1-git-send-email-sonika.jindal@intel.com> Subject: [Intel-gfx] [PATCH 3/3] 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. Removed few unused variables. Cc: damien.lespiau@intel.com Signed-off-by: Sonika Jindal --- drivers/gpu/drm/drm_fb_helper.c | 14 +++++++++++++- drivers/gpu/drm/i915/intel_display.c | 1 - drivers/gpu/drm/i915/intel_sprite.c | 2 -- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index d5d8cea..91e611a 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -282,9 +282,21 @@ 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; diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 85bd3b8..2006e91 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11405,7 +11405,6 @@ static struct drm_plane *intel_primary_plane_create(struct drm_device *dev, { struct intel_plane *primary; const uint32_t *intel_primary_formats; - struct drm_i915_private *dev_priv = dev->dev_private; int num_formats; primary = kzalloc(sizeof(*primary), GFP_KERNEL); diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index aa94f67..aa63027 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -1206,7 +1206,6 @@ static int intel_plane_set_property(struct drm_plane *plane, struct drm_property *prop, uint64_t val) { - struct drm_i915_private *dev_priv = plane->dev->dev_private; struct intel_plane *intel_plane = to_intel_plane(plane); uint64_t old_val; int ret = -ENOENT; @@ -1289,7 +1288,6 @@ static uint32_t vlv_plane_formats[] = { int intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane) { - struct drm_i915_private *dev_priv = dev->dev_private; struct intel_plane *intel_plane; unsigned long possible_crtcs; const uint32_t *plane_formats;