From patchwork Wed Jul 11 14:28:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1183771 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 807343FC8E for ; Wed, 11 Jul 2012 16:00:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 292FFA0E8E for ; Wed, 11 Jul 2012 09:00:50 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTP id 773ACA0E57 for ; Wed, 11 Jul 2012 08:35:48 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id hq4so3953871wib.12 for ; Wed, 11 Jul 2012 08:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=ZTjzEyIOpqzgXXxez3JNDobzzjVPuqM79OI9VFeKmfg=; b=fM8Og5vWemfrjhAyd/DPuTv8r+eKSWXa+yNhtFB3ZzEKgqpvpxD8UDDdfMlsWmku9W l0McIY5ENxar0AYPdgc1Lbv+0xUToB+cplj+i1PfdOZT7A63vx+dHprqEaoDA72UJ+RW bDpbXLj0CDL5hcRXi8EJu6nkUw4UY/RJDss7c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=ZTjzEyIOpqzgXXxez3JNDobzzjVPuqM79OI9VFeKmfg=; b=mGOH9h8rzAO1HUkm/IVrfF3Ard4eDxmnrXztXg8j1wCSGRUd2X6kSLI4n60qMJ3ivV Pw0Cmk4JA1TuVfvsG9azhJtsD16t0RR9K7Tp8TNX5XdZGDh+sAJIUHSYgTvxwYCtFigZ KqN9Nh1QUNrmPLsXuOK82VNA5V06q4IeIiHl2K9vnPJYGhr1S+qL4neBM+oN02mr35PU 9Z+zSjgGopU9yUOHeBLV6o4xcOaVsTRRzPSXNdUtnu45x9JVb7qbl1gL93A5noE+IQs1 59M7wLcib1Slr5DHnlhNxa52SaPZhdx6hY7cik9O8oHN9exlAZhU2T/RKmaGzIH4jpZ/ M/qA== Received: by 10.180.107.103 with SMTP id hb7mr48199995wib.3.1342020948281; Wed, 11 Jul 2012 08:35:48 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id bc2sm5777080wib.0.2012.07.11.08.35.46 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jul 2012 08:35:47 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 11 Jul 2012 16:28:13 +0200 Message-Id: <1342016944-23395-31-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1342016944-23395-1-git-send-email-daniel.vetter@ffwll.ch> References: <1342016944-23395-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQkge8eONqbjoWsNs1ofMKcy2YTo7d86rQzbQa2TdEsCQLzCCoJ5hgdcpe5UHS9NhS/gOsJn Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 30/81] drm/i915: simplify intel_crtc_prepare_encoders 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: , MIME-Version: 1.0 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 - We don't have the ->get_crtc callback. - Call intel_encoder->disable directly. Signed-Off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 25 ++++--------------------- 1 files changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d687bff..cec8b82 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -6636,31 +6636,14 @@ intel_crtc_helper_disable(struct drm_crtc *crtc) } static void -intel_encoder_disable_helper(struct drm_encoder *encoder) -{ - struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; - - if (encoder_funcs->disable) - (*encoder_funcs->disable)(encoder); - else - (*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF); -} - -static void intel_crtc_prepare_encoders(struct drm_device *dev) { - struct drm_encoder_helper_funcs *encoder_funcs; - struct drm_encoder *encoder; + struct intel_encoder *encoder; - list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { - encoder_funcs = encoder->helper_private; + list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head) { /* Disable unused encoders */ - if (encoder->crtc == NULL) - intel_encoder_disable_helper(encoder); - /* Disable encoders whose CRTC is about to change */ - if (encoder_funcs->get_crtc && - encoder->crtc != (*encoder_funcs->get_crtc)(encoder)) - intel_encoder_disable_helper(encoder); + if (encoder->base.crtc == NULL) + encoder->disable(encoder); } }