From patchwork Thu Jul 26 18:48:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1244841 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 B25FB3FC33 for ; Thu, 26 Jul 2012 20:16:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 74DD3A0E99 for ; Thu, 26 Jul 2012 13:16:13 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F0F39EB84 for ; Thu, 26 Jul 2012 12:56:33 -0700 (PDT) Received: by wibhm11 with SMTP id hm11so1801934wib.12 for ; Thu, 26 Jul 2012 12:56:32 -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=05tt1YLyyHpTrOrGtrAX4wdvt1er1wC4ubRppN1cVDM=; b=DzG174qm++GzHnOyLSeXMd3CLH91fEyyFURxg33HVuR2R4UeqpGp5EIXpwQ+aSCFcV 8XmfD1sfOFhtRh2AYLKqXmOqYWTnyMEXbWCeSUawfiS9I4x/z0MuvB53ClzJrLiNcwDo 5+5LerjbG5DUDDMb/p6PI8V9x9qGofY0Fz/Bg= 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=05tt1YLyyHpTrOrGtrAX4wdvt1er1wC4ubRppN1cVDM=; b=bL62pn6Xt9JXpbOdJQI0RUY4etCnBKvTGs3kxcvvLk+ggggvjATqLKdRgZ4nl9miK7 U5/KLVr8ZllpXau1AhbE7CGWT7SQi1lrgKoicEXC7ZwAo8GoG+FQ0L/bdee1QkFnfNaF MKpRKNcBrqFRhBMVAfMhXus2+HdZJYSFRiMTq8nKoJ+9m2fFhorI0paN4CJ8oAVXEv88 qA1d0GOa6LnqjzvKYJnnJym/14pQIeTE4NlIId+iONx5IZo0iieH6/arsqstESHBzNyM VhWyyKZgtAHw4veNtTQ+NA/yq06qFzeetHvRz4gUZNMCjQ7bUA43ChxVA99W++/ntSw4 D0Lg== Received: by 10.180.14.8 with SMTP id l8mr155290wic.6.1343332592534; Thu, 26 Jul 2012 12:56:32 -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 fr4sm391403wib.8.2012.07.26.12.56.31 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 12:56:31 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Thu, 26 Jul 2012 20:48:45 +0200 Message-Id: <1343328581-2324-21-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1343328581-2324-1-git-send-email-daniel.vetter@ffwll.ch> References: <1343328581-2324-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQlwJT6QwfBBj5vAydtLzLkfLBr0DH4xjNAEhrLptrdDy6dBTS5KgZK+7VkicSHiPY7vK5dD Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 20/76] 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 file changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2f78dbd..000200f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3266,10 +3266,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) @@ -3284,10 +3282,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; @@ -3411,10 +3407,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) @@ -3428,10 +3422,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;