From patchwork Tue Jun 19 20:18:25 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: 10475393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3505B6029B for ; Tue, 19 Jun 2018 20:18:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2664928403 for ; Tue, 19 Jun 2018 20:18:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AFC528420; Tue, 19 Jun 2018 20:18:45 +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=ham 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 D262028403 for ; Tue, 19 Jun 2018 20:18:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CF1689885; Tue, 19 Jun 2018 20:18:43 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 314D16E5C5; Tue, 19 Jun 2018 20:18:35 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id h10-v6so911033wrq.8; Tue, 19 Jun 2018 13:18:35 -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; bh=rnWhHTgzBBTU+qZ6tsVfcd9NWqPxe9dHabSDuigQQME=; b=KhdAtzbUhCCTVXFEdX+cCFq8nNOs7pUZvFKdlgBqJGTuX9T7HALEYZWpVstOZ03ztx QcqYd7LYo17Eh2zsv0uyLt+eg6DXd5UFp/vST9hKftniODkB3Mc5sV1S1XoMJ6ZKMgWT 1OtQogQcIt14745BMLreC7Hf9YdoYGyud45RSmaAV397DLoA+B4Pppq8N220J7X3ZWjT ulGcl3eOkzC3amcNZh1LWLd8yWVhAjupNdd5zUL2IuvB/TUIt1ij0sev628kMkRn1H7j DEsaPUlDxNNpnVLN9Co0ryNlG7lAO8HgVaH4LWVNzn6o/luaKvKsERcm0wSYUWICOxSa Eq3A== X-Gm-Message-State: APt69E1i7N5jqCV4aiWRqZhG2/h+/0nkyurS2n6RGv48dBNTfEpqJTSF NuCOw90J1zKnFihdnEl7DeE= X-Google-Smtp-Source: ADUXVKLaqAIZlUWHPQ4ktuQ9FROXF08qna15w9v8WScyPWSiMMTXNZtpH0az5FC50iY6k1FhEInuBA== X-Received: by 2002:adf:9663:: with SMTP id c32-v6mr16214110wra.89.1529439513905; Tue, 19 Jun 2018 13:18:33 -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 m65-v6sm1104243wmd.1.2018.06.19.13.18.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Jun 2018 13:18:33 -0700 (PDT) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Daniel Vetter Date: Tue, 19 Jun 2018 22:18:25 +0200 Message-Id: <20180619201827.4257-3-hdegoede@redhat.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180619201827.4257-1-hdegoede@redhat.com> References: <20180619201827.4257-1-hdegoede@redhat.com> Subject: [Intel-gfx] [PATCH 2/4] drm/i915/intel_dsi: Move initialization of encoder variables up a bit X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Move the initialization of encoder variables a bit higher inside the intel_dsi_init() function. So that the encoder can safely be passed to intel_connector_get_hw_state() inside 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/intel_dsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index 3b7acb5a70b3..103fe460f78c 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c @@ -1769,6 +1769,9 @@ void intel_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 @@ -1820,9 +1823,6 @@ void intel_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);