From patchwork Wed Dec 12 16:16:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ville Syrjala X-Patchwork-Id: 1868931 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 1897F3FC81 for ; Wed, 12 Dec 2012 17:31:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BAEBE65DC for ; Wed, 12 Dec 2012 09:31:31 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id E1924E5CE7; Wed, 12 Dec 2012 08:19:46 -0800 (PST) Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 12 Dec 2012 08:19:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,267,1355126400"; d="scan'208";a="179978011" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.168]) by AZSMGA002.ch.intel.com with SMTP; 12 Dec 2012 08:19:44 -0800 Received: by stinkbox (sSMTP sendmail emulation); Wed, 12 Dec 2012 18:19:43 +0200 From: ville.syrjala@linux.intel.com To: dri-devel@lists.freedesktop.org Date: Wed, 12 Dec 2012 18:16:15 +0200 Message-Id: <1355329008-31459-49-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1355329008-31459-1-git-send-email-ville.syrjala@linux.intel.com> References: <1355329008-31459-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 48/81] drm/i915: Update CRTC properties after modeset X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Ville Syrjälä Update cursor related CRTC properties after a modeset. The cursor properties aren't handled by the drm core since not all CRTCs have cursors. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 566bf29..321c840 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6368,6 +6368,8 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, if (old_obj) intel_crtc_cursor_bo_unref(crtc, old_obj); + intel_crtc_update_properties(crtc); + return 0; } @@ -6380,6 +6382,8 @@ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) intel_crtc_update_cursor(crtc, true); + intel_crtc_update_properties(crtc); + return 0; } @@ -7341,6 +7345,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, trace_i915_flip_request(intel_crtc->plane, obj); + intel_crtc_update_properties(crtc); + return 0; cleanup_pending: @@ -8067,6 +8073,7 @@ next_encoder: static int intel_crtc_set_config(struct drm_mode_set *set) { struct drm_device *dev; + struct drm_crtc *crtc; struct drm_mode_set save_set; struct intel_set_config *config; int ret; @@ -8140,6 +8147,10 @@ static int intel_crtc_set_config(struct drm_mode_set *set) intel_set_config_free(config); + /* changes in one CRTC can affect the others */ + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) + intel_crtc_update_properties(crtc); + return 0; fail: @@ -8151,6 +8162,10 @@ fail: save_set.x, save_set.y, save_set.fb)) DRM_ERROR("failed to restore config after modeset failure\n"); + /* changes in one CRTC can affect the others */ + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) + intel_crtc_update_properties(crtc); + out_config: intel_set_config_free(config); return ret;