From patchwork Wed Jul 11 14:28:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1183651 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 C7A9E3FC8E for ; Wed, 11 Jul 2012 15:52:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 90449A0E8B for ; Wed, 11 Jul 2012 08:52:53 -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 A3AFAA0E4F for ; Wed, 11 Jul 2012 08:35:38 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id r3so960506wey.36 for ; Wed, 11 Jul 2012 08:35:38 -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=D/IEgTIonPI9/IsTRF1pTAE163XL1NMYt6iBM19p9Lc=; b=fdSLOtRZHI4lC69MkD5AcnSxT2wfm65/BpjOerkmgmP+X4syzxcSPP/5EFaB/lu3Ab iV625XgUJwZx5kkr1Gf99OxqA02KfEzWip8340uK5eafcnDvF/tiU1lxTd05uxm+KaaX adY8PVacZXpy9PbAWNBMxWywltRxRu+qii31s= 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=D/IEgTIonPI9/IsTRF1pTAE163XL1NMYt6iBM19p9Lc=; b=cYWmzmoA0J8kd65OtT95D5Mrqj+nKOF+qiPlTr5CfxZ9PZGKhxthQy1dPwKge5IYur bNmRCKedn/vS7Pkq5gXOonscQkfJez2W3K3ryFTkUMv+gRr1Y8X95X1BHULCeTvlbgNN HxTi+syWNzBew6cSfwIO0DsdPq20WmbyjeVxSrobiafv0ReITRsNW/minFBefUmBKZxb eaDkTjUtymB+UqzVHlK8jIBLUU2Uvjpq3kEjwrahp6oeemERk0GAnpafPp/krNq4bmZi 9MiD9afeEknbyMdVoMAT3CuNGlP77S8Ch9SsR8cUl7ZJevbUS2Luw38x/v5aa2tfLMVT 8Xng== Received: by 10.180.105.135 with SMTP id gm7mr48138400wib.10.1342020938446; Wed, 11 Jul 2012 08:35:38 -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.37 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jul 2012 08:35:37 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 11 Jul 2012 16:28:06 +0200 Message-Id: <1342016944-23395-24-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: ALoCoQlLHQfhcibd1Z1d67mEPKtczr76/DmUvvCPbVHKc6XxtRoKRxbggP0GkheNsk90rtw8GnCa Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 23/81] drm/i915: clean up encoder_prepare/commit 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 no longer need them. And now that all encoders are converted, we can finally move the cpt modeset check to the right place - at the end of the crtc_enable function. Signed-Off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 23 +++-------------------- drivers/gpu/drm/i915/intel_drv.h | 2 -- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cf2546c..5317f35 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3238,6 +3238,9 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) encoders: for_each_encoder_on_crtc(dev, crtc, encoder) encoder->enable(encoder); + + if (HAS_PCH_CPT(dev)) + intel_cpt_verify_modeset(dev, intel_crtc->pipe); } static void ironlake_crtc_disable(struct drm_crtc *crtc) @@ -3512,26 +3515,6 @@ static void intel_crtc_disable(struct drm_crtc *crtc) } } -void intel_encoder_prepare(struct drm_encoder *encoder) -{ - struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; - /* lvds has its own version of prepare see intel_lvds_prepare */ - encoder_funcs->dpms(encoder, DRM_MODE_DPMS_OFF); -} - -void intel_encoder_commit(struct drm_encoder *encoder) -{ - struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; - struct drm_device *dev = encoder->dev; - struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); - - /* lvds has its own version of commit see intel_lvds_commit */ - encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON); - - if (HAS_PCH_CPT(dev)) - intel_cpt_verify_modeset(dev, intel_crtc->pipe); -} - void intel_encoder_noop(struct drm_encoder *encoder) { } diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index d6f3d25..85c7da0 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -380,8 +380,6 @@ extern enum drm_connector_status intel_panel_detect(struct drm_device *dev); extern void intel_crtc_load_lut(struct drm_crtc *crtc); extern void intel_crtc_update_dpms(struct drm_crtc *crtc); -extern void intel_encoder_prepare(struct drm_encoder *encoder); -extern void intel_encoder_commit(struct drm_encoder *encoder); extern void intel_encoder_noop(struct drm_encoder *encoder); extern void intel_encoder_disable(struct drm_encoder *encoder); extern void intel_encoder_destroy(struct drm_encoder *encoder);