From patchwork Tue Mar 19 09:24:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13596471 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 71108C54E5D for ; Tue, 19 Mar 2024 09:24:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C67BF10E84F; Tue, 19 Mar 2024 09:24:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="XedcbL8m"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id D9DE110E9D4 for ; Tue, 19 Mar 2024 09:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710840286; x=1742376286; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HXyiMMTeSojl+C2vg1LYW7kwzoeeV8JIKqcUUrGkj7U=; b=XedcbL8mYUzHOSSHFsAyHyREfPgsQv8VH5MGQ4ZQEdDWh275Q7rnwfXw pmoS5NoEE+Bqkb2apEvnmwN/RTaFewDS6kfB+Bk9OwMOaC+j9XBf/WnxN GL1VVSwEZ63lIrhPIygm/V/RyItRfrgIDwQYwz0MTPXLMhbIGvSXjH4H1 jujTtUxqlEyA0gVeIR1E4zkyl3qeUt+1Y2J58QqGADbd1MpQMEGak2SOr P9kvjM726koQirujQR5h4EtjMjRO6arznjdbciwmNMhCK3nGJa7pJfZnv NlWETTcKiK5yJqhYOWFBnFaz+05yHUhU0sgNxu+KGbLOX3MDht2ylSzif Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="5530414" X-IronPort-AV: E=Sophos;i="6.07,136,1708416000"; d="scan'208";a="5530414" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2024 02:24:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="827782094" X-IronPort-AV: E=Sophos;i="6.07,136,1708416000"; d="scan'208";a="827782094" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by orsmga001.jf.intel.com with SMTP; 19 Mar 2024 02:24:44 -0700 Received: by stinkbox (sSMTP sendmail emulation); Tue, 19 Mar 2024 11:24:43 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: stable@vger.kernel.org Subject: [PATCH 1/2] drm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode() Date: Tue, 19 Mar 2024 11:24:42 +0200 Message-ID: <20240319092443.15769-1-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 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" From: Ville Syrjälä If we have no VBT, or the VBT didn't declare the encoder in question, we won't have the 'devdata' for the encoder. Instead of oopsing just bail early. We won't be able to tell whether the port is DP++ or not, but so be it. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10464 Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_bios.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index c7841b3eede8..c13a98431a7b 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -3458,6 +3458,9 @@ bool intel_bios_encoder_supports_dp_dual_mode(const struct intel_bios_encoder_da { const struct child_device_config *child = &devdata->child; + if (!devdata) + return false; + if (!intel_bios_encoder_supports_dp(devdata) || !intel_bios_encoder_supports_hdmi(devdata)) return false;