From patchwork Sun Jul 21 19:36:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 2830940 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4E924C0319 for ; Sun, 21 Jul 2013 20:54:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5C89D2013C for ; Sun, 21 Jul 2013 20:53:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6CAD42013B for ; Sun, 21 Jul 2013 20:53:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D9FCE644B for ; Sun, 21 Jul 2013 13:53:58 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id D1244E6436 for ; Sun, 21 Jul 2013 13:52:33 -0700 (PDT) Received: by mail-ee0-f49.google.com with SMTP id b57so3371296eek.8 for ; Sun, 21 Jul 2013 13:52:33 -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=ITqQpv6r1cqvZfeII3XrDYt4tCq5xyzFTxVxbEe1hkA=; b=VEwkITUaGIl2Fl7i1KXvT5IfLKzxrAIdgD84WBiH8gRvDJYscc6v/mYvHdPahQdeMS nJXZNjKjbqyrBt2UDnSG05+dyRhrWgp9NL8FcumWK7XtUgFpP1o0VNFqp+EJfX+EQdrC i/GXx3xlijQEbC1FfiZ1KLHeQSwHGsOZm9uXA= 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=ITqQpv6r1cqvZfeII3XrDYt4tCq5xyzFTxVxbEe1hkA=; b=DaCFQBIlUVu0EP/B9aqB+Z8bzdacREG+/AvatrZBV1tqEYUNKHYseugABqOFwoLx2b qBEc16Ick3yksDrFy8N1/P7suT/hEro8bGSW5C66m1V7xfdplWwBN4f8byaH9thkfTPS krKoGAOhg9DGvU5xykBCr2oVBOV6J+Ch4v/4igxAPuOfKm2glCEqq7zvrFXtvwZyGBwf NzxsqrUICy8ouMi0ayLj6ggEO8L5irBAiquULwLoVlnznIcNAv9R2jjMUfst4uc8wSKx DiOOKhocrWwMmC35Yf+1s99HjXpQ7iGH5/Khsyj0jCDtEroZfSLimDe8Ogsbo5RvMH/o Ba7Q== X-Received: by 10.15.98.203 with SMTP id bj51mr24908270eeb.22.1374439953143; Sun, 21 Jul 2013 13:52:33 -0700 (PDT) Received: from wespe.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPSA id cg12sm45642301eeb.7.2013.07.21.13.52.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 21 Jul 2013 13:52:32 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Sun, 21 Jul 2013 21:36:58 +0200 Message-Id: <1374435429-5543-3-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1374435429-5543-1-git-send-email-daniel.vetter@ffwll.ch> References: <1374435429-5543-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnnfd0gQADAlcbrrcaReqSrHMOlgXylRD2CdQFbbzQFagaDy5ZxBDdiiQlKxjKJRQhRBz0s Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 02/13] drm/i915/dvo: switch ->mode_fixup to ->compute_config 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 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is the last encoder ->mode_fixup callback we have left, so convert it. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_dvo.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index d820884..1297ea3 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c @@ -241,11 +241,11 @@ static int intel_dvo_mode_valid(struct drm_connector *connector, return intel_dvo->dev.dev_ops->mode_valid(&intel_dvo->dev, mode); } -static bool intel_dvo_mode_fixup(struct drm_encoder *encoder, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) +static bool intel_dvo_compute_config(struct intel_encoder *encoder, + struct intel_crtc_config *pipe_config) { - struct intel_dvo *intel_dvo = enc_to_dvo(to_intel_encoder(encoder)); + struct intel_dvo *intel_dvo = enc_to_dvo(encoder); + struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; /* If we have timings from the BIOS for the panel, put them in * to the adjusted mode. The CRTC will be set up for this mode, @@ -267,7 +267,9 @@ static bool intel_dvo_mode_fixup(struct drm_encoder *encoder, } if (intel_dvo->dev.dev_ops->mode_fixup) - return intel_dvo->dev.dev_ops->mode_fixup(&intel_dvo->dev, mode, adjusted_mode); + return intel_dvo->dev.dev_ops->mode_fixup(&intel_dvo->dev, + &pipe_config->requested_mode, + adjusted_mode); return true; } @@ -370,7 +372,6 @@ static void intel_dvo_destroy(struct drm_connector *connector) } static const struct drm_encoder_helper_funcs intel_dvo_helper_funcs = { - .mode_fixup = intel_dvo_mode_fixup, .mode_set = intel_dvo_mode_set, }; @@ -468,6 +469,7 @@ void intel_dvo_init(struct drm_device *dev) intel_encoder->enable = intel_enable_dvo; intel_encoder->get_hw_state = intel_dvo_get_hw_state; intel_encoder->get_config = intel_dvo_get_config; + intel_encoder->compute_config = intel_dvo_compute_config; intel_connector->get_hw_state = intel_dvo_connector_get_hw_state; /* Now, try to find a controller */