From patchwork Wed Oct 25 12:13:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankit Nautiyal X-Patchwork-Id: 13436060 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 DF442C0032E for ; Wed, 25 Oct 2023 12:19:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5607110E5B2; Wed, 25 Oct 2023 12:19:45 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id D347D10E5B2 for ; Wed, 25 Oct 2023 12:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698236383; x=1729772383; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HlHRc7IYf3v8BrRXNqaX1C91t96i8UaxvEZrGwdspXM=; b=G2JHVEDYhWa4FkRIe5zLeI43SD57C7QdEjBxKcF67T/7a5pvLbeG/TNR NYWfCeIw43MATjQjcrD5tVmm2Il4WdJqW2Hhdm1ricarUERM/0SLhRqLH XcyoHfbCSOY3JpaM4pw5n56NEIVzYtTN0GWvzvAb42NlOZVJkP/XiCaHw oHJvxr7ONmx1s2X/e+qbYzRqTgl/vp+Pg3WLJBuWscdU0/ZOoQ7A/jgjG KTSPD8celOxqwd2XxuSJxBCOX5WDRxUBH7Pvkh7CbDUtCkex0TvLBrD6t 3kScH3k/FU3U6xzFULtzuAS6iXilVjCLbjPtQCIaxixbztPdlaK4jp+65 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="451520507" X-IronPort-AV: E=Sophos;i="6.03,250,1694761200"; d="scan'208";a="451520507" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 05:19:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="882435983" X-IronPort-AV: E=Sophos;i="6.03,250,1694761200"; d="scan'208";a="882435983" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2023 05:19:21 -0700 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org Date: Wed, 25 Oct 2023 17:43:15 +0530 Message-Id: <20231025121318.2732051-2-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231025121318.2732051-1-ankit.k.nautiyal@intel.com> References: <20231025121318.2732051-1-ankit.k.nautiyal@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/4] drm/i915/dp: Simplify checks for helper intel_dp_dsc_max_src_input_bpc 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: , Cc: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Return 0 if platform doesn't support DSC, and return 12 for Display ver 12+. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 1891c0cc187d..d9e1d15a386e 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -1569,13 +1569,14 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp, static u8 intel_dp_dsc_max_src_input_bpc(struct drm_i915_private *i915) { + if (!HAS_DSC(i915)) + return 0; + /* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */ - if (DISPLAY_VER(i915) >= 12) - return 12; if (DISPLAY_VER(i915) == 11) return 10; - return 0; + return 12; } int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector,