From patchwork Fri Sep 6 07:00:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Hogander, Jouni" X-Patchwork-Id: 13793474 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D4A6CCE7AB8 for ; Fri, 6 Sep 2024 07:00:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6683610E805; Fri, 6 Sep 2024 07:00:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="hgUuvC93"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC44010E803 for ; Fri, 6 Sep 2024 07:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725606049; x=1757142049; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HC2uD07/vVb7ktFeSppFK0JB8YonrNF/Cz3BbXhUxpg=; b=hgUuvC93GQh2T9aU3aKPBh+YvFXzcj8JrzeTsbxQWQ9NtMHy2poH+IND FhdjNKw8q4WLGSpvZOZ9VQ6au7D7ps9q0Ks4EUSn0yWTENfaHYh6KbddI uZaJRS4YCN8J+xzRDQDhLxFnRqbhyjRAJoQTg1nKsv+qUl/eCr7oecM63 HNrUUxFS7oF77XRAtcgoWJYBtWKedkTg0Ehw4jxK24ykm3wWgOBb3sr6l GmhcDdGaVxBWl57pw8a9WnlAytDv0KgTRAbVmZYV/rU+O5DlWcfiIwtfY cNudjzf/zCXF/bohEn5wsbFdXSMdfRV/rpkpawcTWHkkzYw1CAiiUgBe5 w==; X-CSE-ConnectionGUID: 7AmgzyLeSSmeaWJbB7KfQQ== X-CSE-MsgGUID: 6KR5E2pySMKW87oY/twT7Q== X-IronPort-AV: E=McAfee;i="6700,10204,11186"; a="28103038" X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="28103038" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00:49 -0700 X-CSE-ConnectionGUID: l6XUU/9DTA6juBo7tWuOvw== X-CSE-MsgGUID: ll+d0/BuROGbNm6sHWEwMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,207,1719903600"; d="scan'208";a="70292505" Received: from dhhellew-desk2.ger.corp.intel.com.ger.corp.intel.com (HELO jhogande-mobl1..) ([10.245.244.116]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 00:00:47 -0700 From: =?utf-8?q?Jouni_H=C3=B6gander?= To: intel-gfx@lists.freedesktop.org Cc: imre.deak@intel.com, animesh.manna@intel.com, =?utf-8?q?Jouni_H=C3=B6gan?= =?utf-8?q?der?= Subject: [PATCH v2 1/4] drm/i915/display: Handle MST connector in intel_attached_dp Date: Fri, 6 Sep 2024 10:00:30 +0300 Message-Id: <20240906070033.289015-2-jouni.hogander@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240906070033.289015-1-jouni.hogander@intel.com> References: <20240906070033.289015-1-jouni.hogander@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Connector->encoder might be null for MST connector. Take this into account in intel_attached_dp. Signed-off-by: Jouni Högander Reviewed-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_display_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 733de5edcfdb3..000ab373c8879 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1913,7 +1913,10 @@ static inline struct intel_dp *enc_to_intel_dp(struct intel_encoder *encoder) static inline struct intel_dp *intel_attached_dp(struct intel_connector *connector) { - return enc_to_intel_dp(intel_attached_encoder(connector)); + if (connector->mst_port) + return connector->mst_port; + else + return enc_to_intel_dp(intel_attached_encoder(connector)); } static inline bool intel_encoder_is_dp(struct intel_encoder *encoder)