From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org,
Werner Sembach <wse@tuxedocomputers.com>
Subject: Re: [Intel-gfx] [PATCH] drm: Use drm_mode_is_420_only() instead of open coding it
Date: Tue, 04 May 2021 15:35:37 +0300 [thread overview]
Message-ID: <87wnsey8va.fsf@intel.com> (raw)
In-Reply-To: <20210504102742.7005-1-ville.syrjala@linux.intel.com>
On Tue, 04 May 2021, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Replace the open coded drm_mode_is_420_only() with the real thing.
>
> No functional changes.
>
> Cc: Werner Sembach <wse@tuxedocomputers.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_modes.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 33a93fa24eb1..12fcbb7ce179 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -1176,16 +1176,11 @@ enum drm_mode_status
> drm_mode_validate_ycbcr420(const struct drm_display_mode *mode,
> struct drm_connector *connector)
> {
> - u8 vic = drm_match_cea_mode(mode);
> - enum drm_mode_status status = MODE_OK;
> - struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
> -
> - if (test_bit(vic, hdmi->y420_vdb_modes)) {
> - if (!connector->ycbcr_420_allowed)
> - status = MODE_NO_420;
> - }
> + if (!connector->ycbcr_420_allowed &&
> + drm_mode_is_420_only(&connector->display_info, mode))
> + return MODE_NO_420;
>
> - return status;
> + return MODE_OK;
> }
> EXPORT_SYMBOL(drm_mode_validate_ycbcr420);
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org,
Werner Sembach <wse@tuxedocomputers.com>
Subject: Re: [PATCH] drm: Use drm_mode_is_420_only() instead of open coding it
Date: Tue, 04 May 2021 15:35:37 +0300 [thread overview]
Message-ID: <87wnsey8va.fsf@intel.com> (raw)
In-Reply-To: <20210504102742.7005-1-ville.syrjala@linux.intel.com>
On Tue, 04 May 2021, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Replace the open coded drm_mode_is_420_only() with the real thing.
>
> No functional changes.
>
> Cc: Werner Sembach <wse@tuxedocomputers.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_modes.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 33a93fa24eb1..12fcbb7ce179 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -1176,16 +1176,11 @@ enum drm_mode_status
> drm_mode_validate_ycbcr420(const struct drm_display_mode *mode,
> struct drm_connector *connector)
> {
> - u8 vic = drm_match_cea_mode(mode);
> - enum drm_mode_status status = MODE_OK;
> - struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
> -
> - if (test_bit(vic, hdmi->y420_vdb_modes)) {
> - if (!connector->ycbcr_420_allowed)
> - status = MODE_NO_420;
> - }
> + if (!connector->ycbcr_420_allowed &&
> + drm_mode_is_420_only(&connector->display_info, mode))
> + return MODE_NO_420;
>
> - return status;
> + return MODE_OK;
> }
> EXPORT_SYMBOL(drm_mode_validate_ycbcr420);
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-05-04 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 10:27 [Intel-gfx] [PATCH] drm: Use drm_mode_is_420_only() instead of open coding it Ville Syrjala
2021-05-04 10:27 ` Ville Syrjala
2021-05-04 12:35 ` Jani Nikula [this message]
2021-05-04 12:35 ` Jani Nikula
2021-05-04 14:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-05-04 16:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
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=87wnsey8va.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
--cc=wse@tuxedocomputers.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.