AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Fangzhi Zuo <Jerry.Zuo@amd.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org, harry.wentland@amd.com
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Fangzhi Zuo <Jerry.Zuo@amd.com>, Dave Airlie <airlied@gmail.com>,
	Nicholas.Kazlauskas@amd.com, wayne.lin@amd.com
Subject: binary constants (was: Re: [PATCH v3] drm/dp: Add Additional DP2 Headers)
Date: Thu, 03 Feb 2022 13:58:00 +0200	[thread overview]
Message-ID: <87ee4krwl3.fsf@intel.com> (raw)
In-Reply-To: <20210927192324.5428-1-Jerry.Zuo@amd.com>

On Mon, 27 Sep 2021, Fangzhi Zuo <Jerry.Zuo@amd.com> wrote:
> +/* DSC Extended Capability Branch Total DSC Resources */
> +#define DP_DSC_SUPPORT_AND_DSC_DECODER_COUNT		0x2260	/* 2.0 */
> +# define DP_DSC_DECODER_COUNT_MASK			(0b111 << 5)
> +# define DP_DSC_DECODER_COUNT_SHIFT			5
> +#define DP_DSC_MAX_SLICE_COUNT_AND_AGGREGATION_0	0x2270	/* 2.0 */
> +# define DP_DSC_DECODER_0_MAXIMUM_SLICE_COUNT_MASK	(1 << 0)
> +# define DP_DSC_DECODER_0_AGGREGATION_SUPPORT_MASK	(0b111 << 1)
> +# define DP_DSC_DECODER_0_AGGREGATION_SUPPORT_SHIFT	1

The patch was merged a while back, but only now I noticed the use of
binary constants, which in C is a GCC and Clang extension [1][2]. There
are some instances in the kernel, but not a whole lot.

Do we want to avoid or embrace them going forward? Or meh?


BR,
Jani.


[1] https://gcc.gnu.org/onlinedocs/gcc/Binary-constants.html
[2] https://clang.llvm.org/docs/LanguageExtensions.html#c-14-binary-literals

-- 
Jani Nikula, Intel Open Source Graphics Center

  parent reply	other threads:[~2022-02-03 13:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 19:23 [PATCH v3] drm/dp: Add Additional DP2 Headers Fangzhi Zuo
2021-09-28 15:19 ` Harry Wentland
2021-09-30 21:21   ` Rodrigo Siqueira
2021-10-08  8:36     ` Tvrtko Ursulin
2021-10-08 21:03       ` Harry Wentland
2022-02-03 11:58 ` Jani Nikula [this message]
2022-02-03 12:57   ` binary constants (was: Re: [PATCH v3] drm/dp: Add Additional DP2 Headers) Daniel Vetter

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=87ee4krwl3.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=Jerry.Zuo@amd.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=airlied@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=wayne.lin@amd.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