From: Daniel Vetter <daniel@ffwll.ch>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, Jyri Sarha <jsarha@ti.com>,
Russell King - ARM Linux <linux@armlinux.org.uk>,
Hans Verkuil <hverkuil@xs4all.nl>,
dri-devel@lists.freedesktop.org,
Harry Wentland <harry.wentland@amd.com>,
Ilia Mirkin <imirkin@alum.mit.edu>
Subject: Re: [PATCH v2 3/8] drm/atomic: Include color encoding/range in plane state dump
Date: Tue, 20 Feb 2018 12:25:25 +0100 [thread overview]
Message-ID: <20180220112525.GL22199@phenom.ffwll.local> (raw)
In-Reply-To: <20180219202846.10628-1-ville.syrjala@linux.intel.com>
On Mon, Feb 19, 2018 at 10:28:46PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Include color_enconding and color_range in the plane state dump.
>
> v2: Add kerneldoc (danvet)
>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Daniel Stone <daniel@fooishbar.org>
> Cc: Russell King - ARM Linux <linux@armlinux.org.uk>
> Cc: Ilia Mirkin <imirkin@alum.mit.edu>
> Cc: Hans Verkuil <hverkuil@xs4all.nl>
> Cc: Uma Shankar <uma.shankar@intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: Jyri Sarha <jsarha@ti.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/drm_atomic.c | 4 ++++
> drivers/gpu/drm/drm_color_mgmt.c | 30 ++++++++++++++++++++++++++++++
> drivers/gpu/drm/drm_crtc_internal.h | 2 ++
> 3 files changed, 36 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 452a0b0bafbc..9552052ed31a 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -952,6 +952,10 @@ static void drm_atomic_plane_print_state(struct drm_printer *p,
> drm_printf(p, "\tcrtc-pos=" DRM_RECT_FMT "\n", DRM_RECT_ARG(&dest));
> drm_printf(p, "\tsrc-pos=" DRM_RECT_FP_FMT "\n", DRM_RECT_FP_ARG(&src));
> drm_printf(p, "\trotation=%x\n", state->rotation);
> + drm_printf(p, "\tcolor-encoding=%s\n",
> + drm_get_color_encoding_name(state->color_encoding));
> + drm_printf(p, "\tcolor-range=%s\n",
> + drm_get_color_range_name(state->color_range));
>
> if (plane->funcs->atomic_print_state)
> plane->funcs->atomic_print_state(p, state);
> diff --git a/drivers/gpu/drm/drm_color_mgmt.c b/drivers/gpu/drm/drm_color_mgmt.c
> index 7b0f1c2d9190..a11a838741c2 100644
> --- a/drivers/gpu/drm/drm_color_mgmt.c
> +++ b/drivers/gpu/drm/drm_color_mgmt.c
> @@ -367,6 +367,36 @@ static const char * const color_range_name[] = {
> };
>
> /**
> + * drm_get_color_encoding_name - return a string for color encoding
> + * @encoding: color encoding to compute name of
> + *
> + * In contrast to the other drm_get_*_name functions this one here returns a
> + * const pointer and hence is threadsafe.
> + */
> +const char *drm_get_color_encoding_name(enum drm_color_encoding encoding)
> +{
> + if (WARN_ON(encoding >= ARRAY_SIZE(color_encoding_name)))
> + return "unknown";
> +
> + return color_encoding_name[encoding];
> +}
> +
> +/**
> + * drm_get_color_range_name - return a string for color range
> + * @range: color range to compute name of
> + *
> + * In contrast to the other drm_get_*_name functions this one here returns a
> + * const pointer and hence is threadsafe.
> + */
> +const char *drm_get_color_range_name(enum drm_color_range range)
> +{
> + if (WARN_ON(range >= ARRAY_SIZE(color_range_name)))
> + return "unknown";
> +
> + return color_range_name[range];
> +}
> +
> +/**
> * drm_plane_create_color_properties - color encoding related plane properties
> * @plane: plane object
> * @supported_encodings: bitfield indicating supported color encodings
> diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h
> index af00f42ba269..8ca2ffef6231 100644
> --- a/drivers/gpu/drm/drm_crtc_internal.h
> +++ b/drivers/gpu/drm/drm_crtc_internal.h
> @@ -71,6 +71,8 @@ int drm_mode_destroy_dumb_ioctl(struct drm_device *dev,
> void *data, struct drm_file *file_priv);
>
> /* drm_color_mgmt.c */
> +const char *drm_get_color_encoding_name(enum drm_color_encoding encoding);
> +const char *drm_get_color_range_name(enum drm_color_range range);
>
> /* IOCTLs */
> int drm_mode_gamma_get_ioctl(struct drm_device *dev,
> --
> 2.13.6
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-02-20 11:25 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 19:23 [PATCH 0/8] drm: Add COLOR_ENCODING and COLOR_RANGE plane properties Ville Syrjala
2018-02-14 19:23 ` [PATCH 1/8] drm: Add optional COLOR_ENCODING and COLOR_RANGE properties to drm_plane Ville Syrjala
2018-02-19 15:04 ` Daniel Vetter
2018-02-19 20:19 ` Ville Syrjälä
2018-02-19 20:38 ` Jyri Sarha
2018-02-19 22:38 ` Daniel Vetter
2018-02-19 20:28 ` [PATCH v2 " Ville Syrjala
2018-02-20 11:24 ` Daniel Vetter
2018-11-30 13:08 ` [v2, " Christoph Manszewski
2018-11-30 13:25 ` Ville Syrjälä
2018-11-30 14:20 ` Andrzej Hajda
2018-11-30 14:29 ` Ville Syrjälä
2018-11-30 14:48 ` Hans Verkuil
2018-11-30 15:16 ` Ville Syrjälä
2018-11-30 15:34 ` Hans Verkuil
2018-11-30 16:22 ` Brian Starkey
2018-12-03 11:23 ` Andrzej Hajda
2018-12-03 11:52 ` Hans Verkuil
2018-12-03 12:51 ` Andrzej Hajda
2018-11-30 14:40 ` Hans Verkuil
2018-02-14 19:23 ` [PATCH 2/8] drm: Add BT.2020 constant luminance enum value for the COLOR_ENCODING property Ville Syrjala
2018-03-02 12:40 ` Ville Syrjälä
2018-02-14 19:23 ` [PATCH 3/8] drm/atomic: Include color encoding/range in plane state dump Ville Syrjala
2018-02-19 15:08 ` Daniel Vetter
2018-02-19 20:28 ` [PATCH v2 " Ville Syrjala
2018-02-20 11:25 ` Daniel Vetter [this message]
2018-02-20 15:57 ` Harry Wentland
2018-02-14 19:23 ` [PATCH 4/8] drm/i915: Correctly handle limited range YCbCr data on VLV/CHV Ville Syrjala
2018-02-14 19:23 ` Ville Syrjala
2018-02-14 19:23 ` [PATCH 5/8] drm/i915: Fix plane YCbCr->RGB conversion for GLK Ville Syrjala
2018-02-28 20:43 ` Imre Deak
2018-02-14 19:23 ` [PATCH 6/8] drm/i915: Add support for the YCbCr COLOR_ENCODING property Ville Syrjala
2018-02-14 19:23 ` [PATCH 7/8] drm/i915: Change the COLOR_ENCODING prop default value to BT.709 Ville Syrjala
2018-02-14 19:23 ` [PATCH 8/8] drm/i915: Add support for the YCbCr COLOR_RANGE property Ville Syrjala
2018-02-14 20:53 ` ✗ Fi.CI.CHECKPATCH: warning for drm: Add COLOR_ENCODING and COLOR_RANGE plane properties Patchwork
2018-02-14 20:56 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-02-14 21:09 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-15 5:34 ` ✓ Fi.CI.IGT: " Patchwork
2018-02-19 15:00 ` [PATCH 0/8] " Daniel Vetter
2018-02-19 15:09 ` Daniel Vetter
2018-02-19 15:52 ` Ville Syrjälä
2018-02-19 20:41 ` ✗ Fi.CI.CHECKPATCH: warning for drm: Add COLOR_ENCODING and COLOR_RANGE plane properties (rev3) Patchwork
2018-02-19 20:43 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-02-19 20:59 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-20 0:20 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-02-20 11:26 ` [PATCH 0/8] drm: Add COLOR_ENCODING and COLOR_RANGE plane properties Daniel Vetter
2018-02-20 13:42 ` Ville Syrjälä
2018-03-02 13:06 ` Ville Syrjälä
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=20180220112525.GL22199@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=hverkuil@xs4all.nl \
--cc=imirkin@alum.mit.edu \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=linux@armlinux.org.uk \
--cc=ville.syrjala@linux.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 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.