From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1B51C433F5 for ; Mon, 18 Oct 2021 09:42:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8AA1B61027 for ; Mon, 18 Oct 2021 09:42:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8AA1B61027 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 88EEF6E82C; Mon, 18 Oct 2021 09:42:01 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id E8FBD6E82C for ; Mon, 18 Oct 2021 09:41:59 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10140"; a="228092138" X-IronPort-AV: E=Sophos;i="5.85,381,1624345200"; d="scan'208";a="228092138" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2021 02:41:58 -0700 X-IronPort-AV: E=Sophos;i="5.85,381,1624345200"; d="scan'208";a="493516707" Received: from ideak-desk.fi.intel.com ([10.237.68.141]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2021 02:41:56 -0700 From: Imre Deak To: intel-gfx@lists.freedesktop.org Cc: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= , Jani Nikula , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Mon, 18 Oct 2021 12:41:48 +0300 Message-Id: <20211018094154.1407705-1-imre.deak@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Intel-gfx] [PATCH 0/6] drm/i915/dp: Fix link parameter use in lack of a valid DPCD 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" This patchset fixes a few issues, related to invalid accesses from the intel_dp->common_rates[] array and in general the link rate, lane count parameters being invalid until a valid DPCD is read from the sink. One issue in intel_dp_sync_state() was caught by the CONFIG_UBSAN feature. The first 3 patches are also needed for stable kernels. Cc: José Roberto de Souza Cc: Jani Nikula Cc: Ville Syrjälä Imre Deak (6): drm/i915/dp: Skip the HW readout of DPCD on disabled encoders drm/i915/dp: Ensure sink rate values are always valid drm/i915/dp: Ensure max link params are always valid drm/i915/dp: Ensure sink/link max lane count values are always valid drm/i915/dp: Sanitize sink rate DPCD register values drm/i915/dp: Sanitize link common rate array lookups .../drm/i915/display/intel_display_types.h | 2 + drivers/gpu/drm/i915/display/intel_dp.c | 127 ++++++++++++++---- 2 files changed, 101 insertions(+), 28 deletions(-) -- 2.27.0