From patchwork Tue Aug 28 22:06:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1382871 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 4B3583FDF5 for ; Tue, 28 Aug 2012 22:21:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C6CF9E902 for ; Tue, 28 Aug 2012 15:21:36 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 167199E9AF for ; Tue, 28 Aug 2012 15:07:58 -0700 (PDT) Received: by mail-yx0-f177.google.com with SMTP id q9so1203648yen.36 for ; Tue, 28 Aug 2012 15:07:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=F3c0Dz2mRbffQuNpuFRoPsswZ69P9u7YUsgyD8I9HCw=; b=hZAxwcKYA6jFNZIY7GSAMl3kZ8HCUyE/POUCmFYq+dmHy441DvhjKl652Xx81X/Lbt gmbr5IzFb0b5fuwCBKzs2CAZ/mPwU/+5JWX2y6lXKaBFqQ+j1GdfgBb3CeiDLZDLv4sC AwqpzmzrM73TpPFJfdexI8uQKPF2vve3hMt7EKniz3hyJMaJJUAJe8eod90OMrhxp1iD 6l/X8j7Ud8pvM5x061wYEOWifz+6cXBo7ZQnMDg2v2EKk+0ilcICEXUW0YxeMUQJH7qq 1oq600w6PMaUOb5iLX6TWOQd9mhxZNFra3LOKSAYtkopD5ydqz/MjmhaF4GoD4giF8wh VbKg== Received: by 10.236.180.42 with SMTP id i30mr15308410yhm.89.1346191678003; Tue, 28 Aug 2012 15:07:58 -0700 (PDT) Received: from vicky.domain.invalid (189.114.178.236.dynamic.adsl.gvt.net.br. [189.114.178.236]) by mx.google.com with ESMTPS id z3sm4434172anj.20.2012.08.28.15.07.56 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Aug 2012 15:07:57 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 28 Aug 2012 19:06:50 -0300 Message-Id: <1346191621-12996-20-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1346191621-12996-1-git-send-email-przanoni@gmail.com> References: <1346191621-12996-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [RFC 19/30] drm/i915: add Haswell DP encoder_helper function definitions 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 From: Paulo Zanoni Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_dp.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 1feeac5..531d49c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -2478,6 +2478,15 @@ static void intel_dp_encoder_destroy(struct drm_encoder *encoder) kfree(intel_dp); } +static const struct drm_encoder_helper_funcs intel_dp_helper_funcs_hsw = { + .dpms = intel_dp_dpms, + .mode_fixup = intel_dp_mode_fixup, + .prepare = intel_dp_prepare, + .mode_set = intel_ddi_mode_set, + .commit = intel_ddi_commit, + .disable = intel_ddi_disable, +}; + static const struct drm_encoder_helper_funcs intel_dp_helper_funcs = { .dpms = intel_dp_dpms, .mode_fixup = intel_dp_mode_fixup, @@ -2613,7 +2622,13 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port) drm_encoder_init(dev, &intel_encoder->base, &intel_dp_enc_funcs, DRM_MODE_ENCODER_TMDS); - drm_encoder_helper_add(&intel_encoder->base, &intel_dp_helper_funcs); + + if (IS_HASWELL(dev)) + drm_encoder_helper_add(&intel_encoder->base, + &intel_dp_helper_funcs_hsw); + else + drm_encoder_helper_add(&intel_encoder->base, + &intel_dp_helper_funcs); intel_connector_attach_encoder(intel_connector, intel_encoder); drm_sysfs_connector_add(connector);