From patchwork Tue Jul 3 09:28:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1150321 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 92AAEDFF72 for ; Tue, 3 Jul 2012 10:51:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E77C9F6F7 for ; Tue, 3 Jul 2012 03:51:41 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 585C89F0F2 for ; Tue, 3 Jul 2012 03:34:54 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id b13so1638092wer.36 for ; Tue, 03 Jul 2012 03:34:54 -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=Kw4ETvrTfN6tdjQFrKdO1gChD70mm/2rnT1l013Samw=; b=YTF2RGKrNpi8Y9FS83FmjSlQj/h7s2cVI28Dok2hWe0oulnuNQ7tdMflIcQ7VHCcOi 9u2zyPlca5KZP3KUMqiX6CijsLh8iNB/0UqGvKfW5/v+EDJFB0L23Imp2xFXuxqKN4yA 5YxGDk5bUhkUqptfvcejnN5uFmaomEPJ5DxcA= 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=Kw4ETvrTfN6tdjQFrKdO1gChD70mm/2rnT1l013Samw=; b=GPgM5PRenV8eJTG8GbOUk/z4FlxvV+5FVAq9QqTh88fUaNEOSA/a2WPFnE8a2sRr5t nJE04R8uvubgNx0PEGpBdEa0/B5XRPLZ+mLs+8qzHOMS/elrwgKulyDqGqdnoqz6VMyz tPLM+8ucWK6eBtyGdq594P5ExmteSmPRK/+NrEuSWsliUzfJHpEPn/0FjstZ8c/mOuik NllGb47DSLy4QoLAAxLNEYVpiS4jXRWjeGrBfIITsxdbU03AbkvTl0OSICsr///wTknr qf6yQSiXIWRmRAbbvFBdqH2rNmCr/DXXpV4+TbpCrnpMZz0KOmH+jLsLf17lEcrfVzxA 2kkw== Received: by 10.180.81.10 with SMTP id v10mr30729269wix.17.1341311693969; Tue, 03 Jul 2012 03:34:53 -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 e9sm14845138wiw.10.2012.07.03.03.34.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jul 2012 03:34:53 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Tue, 3 Jul 2012 11:28:14 +0200 Message-Id: <1341307715-3886-23-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1341307715-3886-1-git-send-email-daniel.vetter@ffwll.ch> References: <1341307715-3886-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnN1x+RFe6/saQ109kAUhTr087TW/uC7lkLJYJhG6HJShsU2q8SDe3bqmj9zEzVgqZ/lcVe Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 22/43] 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 222bb41..d30306a 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3205,10 +3205,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) @@ -3223,10 +3221,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; @@ -3369,10 +3365,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) @@ -3386,10 +3380,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;