From patchwork Wed Oct 17 11:09:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10645341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 28AB117D4 for ; Wed, 17 Oct 2018 11:37:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 094DF22A6F for ; Wed, 17 Oct 2018 11:37:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1AC02AE6F; Wed, 17 Oct 2018 11:37:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C27E822A6F for ; Wed, 17 Oct 2018 11:37:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 80CDD6E362; Wed, 17 Oct 2018 11:37:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id D2DB289FF9; Wed, 17 Oct 2018 11:09:50 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id z204-v6so1717031wmc.5; Wed, 17 Oct 2018 04:09:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dOBsTOEgjLnAQSA95z4rt7Mqn7LuzSE4Si3B076DY48=; b=j43bnWGcPGckkfgzHZL8hCCA+V+GOe+zUVsHPhsNd2M0SWdIQpueooJn4RacKUngZw iGpLzlXMHcFu7eOZYc6Q8PFzLzj98bp2CS6La0+tVVlt96vAVNyZRyiMG8mCdSFocFde OVeYjbONVfofCxE/JJJE8e0rjQrCM68qAZ0loj4qm4DWuhgRjwE47RdQ2M6BXyhQF8vp rrTBFNTyb0dXqLCVQMmt1ZduZzHFCBkvLXk6WGjG7IYAxi0fdVVzT0d+1dD9xd+eCv0r BwZoG2Q8vPZZQusVufBNAL90xShkx6OONbj7av6toFcmQ6Es+3IVBUkhdxtPPk2z0KpW HDQw== X-Gm-Message-State: ABuFfogyXr4Q/hCQtkxKlD9JpXxpX+K/guskue6lXjFAA17eLbZevny0 IwR65X/D6AxzL3n8UdL1C8SB4MqRM8o= X-Google-Smtp-Source: ACcGV61AANcuRa/yf9oVpROUOrN0zT0s5A/DoRj26ylIh+fE/DwOBsm6YXXFbyRi4QXIYidOXNCVnw== X-Received: by 2002:a1c:ee0c:: with SMTP id m12-v6mr2485309wmh.112.1539774589439; Wed, 17 Oct 2018 04:09:49 -0700 (PDT) Received: from shalem.localdomain.com (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id b71-v6sm1727008wma.13.2018.10.17.04.09.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Oct 2018 04:09:48 -0700 (PDT) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= , Daniel Vetter Subject: [PATCH v2 1/2] drm/i915/intel_dsi: Move initialization of encoder variables up a bit Date: Wed, 17 Oct 2018 13:09:42 +0200 Message-Id: <20181017110943.30770-2-hdegoede@redhat.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181017110943.30770-1-hdegoede@redhat.com> References: <20181017110943.30770-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 17 Oct 2018 11:37:00 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Move the initialization of encoder variables a bit higher inside the intel_dsi_init() function. So that can call intel_encoder_current_mode() from intel_dsi_vbt_init(). This is a preparation patch for reading back the GOP configured pclk from intel_dsi_vbt_init(). Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/vlv_dsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/vlv_dsi.c b/drivers/gpu/drm/i915/vlv_dsi.c index bafeb2a19b90..55951b4a036c 100644 --- a/drivers/gpu/drm/i915/vlv_dsi.c +++ b/drivers/gpu/drm/i915/vlv_dsi.c @@ -1773,6 +1773,9 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) intel_connector->get_hw_state = intel_connector_get_hw_state; intel_encoder->port = port; + intel_encoder->type = INTEL_OUTPUT_DSI; + intel_encoder->power_domain = POWER_DOMAIN_PORT_DSI; + intel_encoder->cloneable = 0; /* * On BYT/CHV, pipe A maps to MIPI DSI port A, pipe B maps to MIPI DSI @@ -1824,9 +1827,6 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv) } } - intel_encoder->type = INTEL_OUTPUT_DSI; - intel_encoder->power_domain = POWER_DOMAIN_PORT_DSI; - intel_encoder->cloneable = 0; drm_connector_init(dev, connector, &intel_dsi_connector_funcs, DRM_MODE_CONNECTOR_DSI);