From patchwork Wed Jul 11 14:28:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1183721 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id BFAC8DF25A for ; Wed, 11 Jul 2012 15:56:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 764F89E94F for ; Wed, 11 Jul 2012 08:56:45 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id CAA849EF0B for ; Wed, 11 Jul 2012 08:35:42 -0700 (PDT) Received: by wgbdr1 with SMTP id dr1so946968wgb.12 for ; Wed, 11 Jul 2012 08:35:42 -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=IUqjGXaWoiFKY13wUdyd+BIJZckfyeCLPhGDrJmaIPU=; b=IOTYbLmf8FyOP8wcqXUxSN6AHsAhpJAjfEHZxeM8/ehapvOVCAB9IFvsqSvWnUFsyP 70XoTtnaHUfOYjRLyCeRdqu8JGpIq3K+tqUJPePSjXuWbTJthzaoaoEj64Jc8uhrEHrZ RuLDGthEH9UY+eKRomV96rVeB65Z0cYbh60J8= 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=IUqjGXaWoiFKY13wUdyd+BIJZckfyeCLPhGDrJmaIPU=; b=BDvfNUNxBuPqHCWGXVRQWZfBXNVLR9zWczEdICEbOPWLiEcdz06uAdX2ynsfR54c0j rcPkBNiFphbupu69mltGfiauYkq5A+GHwlfY32cOMu2IxgdRkvKAXXoo2+Oaa+ktd0qw j1R3urTOQmK3fx9rbHbMOLjvPsL5mr11qb1cuRfSZVeupN9AJttLXV9i/eipxcZ0nvQr M2OIwr9P9aX7rmRNKdfLG4h0oz4+G0ZsPErmRJx0Up9SfYMlOgcFIwX8HBLDweGMwEaR 3TSFi/UwPtEw5Eg0eP700TfgPOGngundRKM7S+Gtn/tb3AspYYwVe56L2n7+ZEjm5Dvt P1pw== Received: by 10.216.138.73 with SMTP id z51mr20414215wei.39.1342020937028; Wed, 11 Jul 2012 08:35:37 -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.35 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jul 2012 08:35:36 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 11 Jul 2012 16:28:05 +0200 Message-Id: <1342016944-23395-23-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: ALoCoQlK8Z99eDzVrfz1glLJPvxl9CjROEQtQdf/G6crqNgNBQgVRf8gPGXRoZhRP5WTq1jSo6Dt Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 22/81] drm/i915: rip out encoder->disable/enable checks 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 All encoders are now converted so there's no need for these checks any more. Signed-Off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 24 ++++++++---------------- 1 files changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index eb3b7ab..cf2546c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3236,10 +3236,8 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) intel_crtc_update_cursor(crtc, true); encoders: - for_each_encoder_on_crtc(dev, crtc, encoder) { - if (encoder->enable) - encoder->enable(encoder); - } + for_each_encoder_on_crtc(dev, crtc, encoder) + encoder->enable(encoder); } static void ironlake_crtc_disable(struct drm_crtc *crtc) @@ -3254,10 +3252,8 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) /* XXX: For compatability with the crtc helper code, call the encoder's * disable function unconditionally for now. */ - for_each_encoder_on_crtc(dev, crtc, encoder) { - if (encoder->disable) - encoder->disable(encoder); - } + for_each_encoder_on_crtc(dev, crtc, encoder) + encoder->disable(encoder); if (!intel_crtc->active) return; @@ -3400,10 +3396,8 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc) intel_crtc_update_cursor(crtc, true); encoders: - for_each_encoder_on_crtc(dev, crtc, encoder) { - if (encoder->enable) - encoder->enable(encoder); - } + for_each_encoder_on_crtc(dev, crtc, encoder) + encoder->enable(encoder); } static void i9xx_crtc_disable(struct drm_crtc *crtc) @@ -3417,10 +3411,8 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc) /* XXX: For compatability with the crtc helper code, call the encoder's * disable function unconditionally for now. */ - for_each_encoder_on_crtc(dev, crtc, encoder) { - if (encoder->disable) - encoder->disable(encoder); - } + for_each_encoder_on_crtc(dev, crtc, encoder) + encoder->disable(encoder); if (!intel_crtc->active) return;