dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: gfx-internal-devel@eclists.intel.com
Cc: Manasi Navare <manasi.d.navare@intel.com>,
	dri-devel@lists.freedesktop.org,
	Anusha Srivatsa <anusha.srivatsa@intel.com>
Subject: [PATCH v2 4/5] drm/dp: Macro for DSC eDP Output BPP
Date: Thu,  4 Jan 2018 00:23:19 -0800	[thread overview]
Message-ID: <1515054200-11435-4-git-send-email-manasi.d.navare@intel.com> (raw)
In-Reply-To: <1515054200-11435-1-git-send-email-manasi.d.navare@intel.com>

This returns the maximum output BPP supported by the
eDP panel by reading the MAX_SUPPORTED_BPP DSC DPCD register.

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 include/drm/drm_dp_helper.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 06e41b2..4e8f357 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -980,6 +980,16 @@ drm_dp_is_branch(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
 	return dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT;
 }
 
+/* DP/eDP DSC support */
+static inline u16
+drm_edp_dsc_get_output_bpp(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+{
+	return dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+		(dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+		 DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK <<
+		 DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);
+}
+
 /*
  * DisplayPort AUX channel
  */
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-01-04  8:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04  8:23 [PATCH v2 1/5] drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT Manasi Navare
2018-01-04  8:23 ` Manasi Navare [this message]
2018-01-11 22:13   ` [PATCH v2 4/5] drm/dp: Macro for DSC eDP Output BPP Srivatsa, Anusha
2018-01-09  0:24 ` [PATCH v2 1/5] drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT Anusha Srivatsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1515054200-11435-4-git-send-email-manasi.d.navare@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=anusha.srivatsa@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gfx-internal-devel@eclists.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox