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 B93C1C54EBE for ; Fri, 13 Jan 2023 05:53:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B830910E992; Fri, 13 Jan 2023 05:53:33 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9CA0310E992 for ; Fri, 13 Jan 2023 05:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673589211; x=1705125211; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RgUtPlJKvNBvYaob7xBuC6CA42eQAvLr42wKf+jHlzw=; b=TP1vtc26P2QN80m7ILiGrVQM/FGzegegxQqZ3pgljnqrobFmbLzt6/PJ AqAgcdJQ9WtPwO9m05Wk3i3Yti7pJgLMyFxvpRBk9quUM6CVHixOEhCX3 +yZQXu4HqGqmAAOVPU11ZwwWI9fJSOWkSuXkRxbCdiHBAxTjkTIAhMANh 26pWUaaBwgW+nm25mIlfv231FiqCnCc0Ee6/BpSJAvzhwuNTmH4cXkRVq r7Jjo+w0iONObUGJuPPr2IR826yqJABZXc2rfKpCrXB+MsU8k9XWDbxer eG5i+74RtUl9F/VvO1o9FSx2Smv5wBOhNd2GwZpeNkjoSeaFErPO6mzYn g==; X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="304302651" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="304302651" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 21:53:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="831972045" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="831972045" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.32]) by orsmga005.jf.intel.com with ESMTP; 12 Jan 2023 21:53:29 -0800 From: Suraj Kandpal To: intel-gfx@lists.freedesktop.org Date: Fri, 13 Jan 2023 11:22:12 +0530 Message-Id: <20230113055217.1974569-2-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230113055217.1974569-1-suraj.kandpal@intel.com> References: <20230113055217.1974569-1-suraj.kandpal@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Intel-gfx] [PATCH v7 1/6] drm/dp_helper: Add helper to check if the sink supports given format with DSC 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: Ankit Nautiyal Add helper function to check if the DP sink supports DSC with the given output format. Signed-off-by: Ankit Nautiyal --- include/drm/display/drm_dp_helper.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h index ab55453f2d2c..d529d0254b68 100644 --- a/include/drm/display/drm_dp_helper.h +++ b/include/drm/display/drm_dp_helper.h @@ -194,6 +194,13 @@ drm_dp_dsc_sink_max_slice_width(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE]) DP_DSC_SLICE_WIDTH_MULTIPLIER; } +/* Check if sink supports DSC with given output format */ +static inline bool +drm_dp_dsc_sink_supports_format(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE], u8 output_format) +{ + return dsc_dpcd[DP_DSC_DEC_COLOR_FORMAT_CAP - DP_DSC_SUPPORT] & output_format; +} + /* Forward Error Correction Support on DP 1.4 */ static inline bool drm_dp_sink_supports_fec(const u8 fec_capable) -- 2.25.1