From: Daniel Vetter <daniel@ffwll.ch>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 3/3] drm/tegra: Use fourcc_mod_is_vendor() helper
Date: Thu, 10 Jun 2021 19:37:45 +0200 [thread overview]
Message-ID: <YMJN6W3aWpwWkDIz@phenom.ffwll.local> (raw)
In-Reply-To: <20210610111236.3814211-3-thierry.reding@gmail.com>
On Thu, Jun 10, 2021 at 01:12:36PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Rather than open-coding the vendor extraction operation, use the newly
> introduced helper macro.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/tegra/fb.c | 2 +-
> drivers/gpu/drm/tegra/plane.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
> index cae8b8cbe9dd..c04dda8353fd 100644
> --- a/drivers/gpu/drm/tegra/fb.c
> +++ b/drivers/gpu/drm/tegra/fb.c
> @@ -44,7 +44,7 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer,
> {
> uint64_t modifier = framebuffer->modifier;
>
> - if ((modifier >> 56) == DRM_FORMAT_MOD_VENDOR_NVIDIA) {
> + if (fourcc_mod_is_vendor(modifier, NVIDIA)) {
> if ((modifier & DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) == 0)
> tiling->sector_layout = TEGRA_BO_SECTOR_LAYOUT_TEGRA;
> else
> diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c
> index 2e65b4075ce6..f7496425fa83 100644
> --- a/drivers/gpu/drm/tegra/plane.c
> +++ b/drivers/gpu/drm/tegra/plane.c
> @@ -109,7 +109,7 @@ static bool tegra_plane_format_mod_supported(struct drm_plane *plane,
> return true;
>
> /* check for the sector layout bit */
> - if ((modifier >> 56) == DRM_FORMAT_MOD_VENDOR_NVIDIA) {
> + if (fourcc_mod_is_vendor(modifier, NVIDIA)) {
> if (modifier & DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) {
> if (!tegra_plane_supports_sector_layout(plane))
> return false;
> --
> 2.31.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2021-06-10 17:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 11:12 [PATCH 1/3] drm/fourcc: Add macros to determine the modifier vendor Thierry Reding
2021-06-10 11:12 ` [PATCH 2/3] drm/arm: malidp: Use fourcc_mod_is_vendor() helper Thierry Reding
2021-06-10 11:12 ` [PATCH 3/3] drm/tegra: " Thierry Reding
2021-06-10 17:37 ` Daniel Vetter [this message]
2021-08-16 10:37 ` [PATCH 1/3] drm/fourcc: Add macros to determine the modifier vendor Thierry Reding
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=YMJN6W3aWpwWkDIz@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=thierry.reding@gmail.com \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).