From patchwork Tue Jul 7 07:08:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 6730521 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2B8F3C05AC for ; Tue, 7 Jul 2015 07:08:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5CB3920734 for ; Tue, 7 Jul 2015 07:08:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5D88D20741 for ; Tue, 7 Jul 2015 07:08:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F9FA6E411; Tue, 7 Jul 2015 00:08:51 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mblankhorst.nl (mblankhorst.nl [141.105.120.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id A465A6E40F; Tue, 7 Jul 2015 00:08:48 -0700 (PDT) Received: from patser.lan (5ED48611.cm-7-5c.dynamic.ziggo.nl [94.212.134.17]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mlankhorst) by mblankhorst.nl (Postfix) with ESMTPSA id 33F5C18C013; Tue, 7 Jul 2015 09:08:46 +0200 (CEST) From: Maarten Lankhorst To: intel-gfx@lists.freedesktop.org Subject: [PATCH v2 02/20] drm: Don't update plane properties for atomic planes if it stays the same Date: Tue, 7 Jul 2015 09:08:13 +0200 Message-Id: <1436252911-5703-3-git-send-email-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436252911-5703-1-git-send-email-maarten.lankhorst@linux.intel.com> References: <1436252911-5703-1-git-send-email-maarten.lankhorst@linux.intel.com> Cc: dri-devel@lists.freedesktop.org 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" X-Spam-Status: No, score=-5.0 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 This allows the first atomic call during hw init to be a real modeset, which is useful for forcing a recalculation. Cc: dri-devel@lists.freedesktop.org Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/drm_fb_helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index cac422916c7a..33b5e4ecaf46 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -322,10 +322,12 @@ 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) { - if (plane->type != DRM_PLANE_TYPE_PRIMARY) + if (plane->type != DRM_PLANE_TYPE_PRIMARY && + (!plane->state || plane->state->fb)) drm_plane_force_disable(plane); - if (dev->mode_config.rotation_property) { + if (dev->mode_config.rotation_property && + (!plane->state || plane->state->rotation != BIT(DRM_ROTATE_0))) { drm_mode_plane_set_obj_prop(plane, dev->mode_config.rotation_property, BIT(DRM_ROTATE_0));