From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v2 3/6] drm/edid: detect SCDC support in HF-VSDB Date: Tue, 7 Feb 2017 17:36:53 +0100 Message-ID: <20170207163653.GB28321@ulmo.ba.sec> References: <1486389566-28613-1-git-send-email-shashank.sharma@intel.com> <1486389566-28613-4-git-send-email-shashank.sharma@intel.com> <1250570e-e2aa-0501-6ab5-ebd525cae3c4@synopsys.com> <5409e00c-0a35-58bc-b289-85cafe8dc550@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0853508912==" Return-path: In-Reply-To: <5409e00c-0a35-58bc-b289-85cafe8dc550@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: "Sharma, Shashank" Cc: Jose Abreu , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, daniel.vetter@intel.com List-Id: intel-gfx@lists.freedesktop.org --===============0853508912== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LpQ9ahxlCli8rRTG" Content-Disposition: inline --LpQ9ahxlCli8rRTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 07, 2017 at 09:43:15PM +0530, Sharma, Shashank wrote: > Regards >=20 > Shashank >=20 >=20 > On 2/7/2017 4:31 PM, Jose Abreu wrote: > > Hi Shashank, > >=20 > >=20 > >=20 > > On 06-02-2017 13:59, Shashank Sharma wrote: > > > This patch does following: > > > - Adds a new structure (drm_hdmi_info) in drm_display_info. > > > This structure will be used to save and indicate if sink > > > supports advanced HDMI 2.0 features > > > - Adds another structure drm_scdc within drm_hdmi_info, to > > > reflect scdc support and capabilities in connected HDMI 2.0 sink. > > > - Checks the HF-VSDB block for presence of SCDC, and marks it > > > in scdc structure > > > - If SCDC is present, checks if sink is capable of generating > > > SCDC read request, and marks it in scdc structure. > > >=20 > > > V2: Addressed review comments > > > Thierry: > > > - Fix typos in commit message and make abbreviation consistent > > > across the commit message. > > > - Change structure object name from hdmi_info -> hdmi > > > - Fix typos and abbreviations in description of structure drm_hdmi_in= fo > > > end the description with a full stop. > > > - Create a structure drm_scdc, and keep all information related to SC= DC > > > register set (supported, read request supported) etc in it. > > >=20 > > > Ville: > > > - Change rr -> read_request > > > - Call drm_detect_scrambling function drm_parse_hf_vsdb so that all > > > of HF-VSDB parsing can be kept in same function, in incremental > > > patches. > > >=20 > > > Reviewed-by: Thierry Reding > > > Signed-off-by: Shashank Sharma > > > --- > > > drivers/gpu/drm/drm_edid.c | 14 ++++++++++++++ > > > include/drm/drm_connector.h | 33 +++++++++++++++++++++++++++++++++ > > > 2 files changed, 47 insertions(+) > > >=20 > > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > > > index 96d3e47..a487b80 100644 > > > --- a/drivers/gpu/drm/drm_edid.c > > > +++ b/drivers/gpu/drm/drm_edid.c > > > @@ -3802,6 +3802,18 @@ enum hdmi_quantization_range > > > } > > > EXPORT_SYMBOL(drm_default_rgb_quant_range); > > > +static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connecto= r, > > > + const u8 *hf_vsdb) > > > +{ > > > + struct drm_hdmi_info *hdmi =3D &connector->display_info.hdmi; > > > + > > > + if (hf_vsdb[6] & 0x80) { > > BIT(7) ? > Yes, SCDC_present bit is bit 7, byte 6 in HF-VSDB. Am I missing something= ? > >=20 > > > + hdmi->scdc.supported =3D true; > > > + if (hf_vsdb[6] & 0x40) > > BIT(6) ? > Yes, RR_Capable bit is bit 6, byte 6 in HF-VSDB. I think what Jose was trying to say is that you should be using BIT(7) instead of 0x80 and BIT(6) instead of 0x40. That said, I think either is fine, but perhaps another idea would be to define macros for these. I know that most (all?) of the EDID parsing code uses literals, so this is consistent with existing code. Also usually code will be like: if (hf_vsdb[X] & 0xYZ) foo_supported =3D true; So the meaning of the bit is easy to read from the context. I think literals are fine in this case. Thierry --LpQ9ahxlCli8rRTG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAliZ96UACgkQ3SOs138+ s6FpGg/+On7cOAS7nh4A6YpXr6Npjd4N0o1weBGhbxU8a/qDeLuOwV1KRgju1vmD dF87fiiLJtytICLWFSSZ5JPFPfdE/TcvWfnDlCJGTP04a2zpvpifYo7uPXiWrA8u CPWMGS5DtqbU4rX0ZDJQdfHNOZlg/4lbFkjjPKY4UxYUHRG7PUKEA+jA5jbzVBuv 62i1Gom/4jI/eegoDZsygAUb4mABWAUwasGm/8Kuyh7n1LF3ioSdif3GdpLS/r83 QR94z/UYT9DjKn9sMl7u4HgTzmV3qan0LSOzaPGQiTs4H/NytXTx9YWKYh8yhK8p kXNgjo2ql6wdjwImTZdO9GNU+vZUeMPf30R9Ly9JNipStkqZ1/sxDTFz2n6JNlYl HiCh64nFTIu3omGBgAafH4nBEnzEKNyHnWyMO9+vsUkz8DnKrnRxNrtzNSW8RF2h pCiuuY6eWHiQ/6hz93V+SDmyO9TsENV2bz4V8n41oHzAcNNbZf5uodAvanWDv5ek 5+xoFbCL3nWM5pv6bcnkS0/umAWzEw4lAUM9XCMszeb8ucyaeDNJKcKea071wxRA PG8twpjUrXMgcYh0KoJn7QYwq+WRu3AFiwPJuJp6jgQG/04PF6K4yCno+KkOnED9 95WDCYdoYeebVp6F8HLsLrENa6Yx9uDCrDoQu+imH7eRcgYko5U= =SNje -----END PGP SIGNATURE----- --LpQ9ahxlCli8rRTG-- --===============0853508912== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0853508912==--