dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Harry Wentland <harry.wentland@amd.com>
Cc: dri-devel@lists.freedesktop.org, wayland-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH v3 08/23] drm/colorop: Add TYPE property
Date: Fri, 8 Dec 2023 13:37:53 +0200	[thread overview]
Message-ID: <20231208133753.0f196faa@eldfell> (raw)
In-Reply-To: <20231108163647.106853-9-harry.wentland@amd.com>

[-- Attachment #1: Type: text/plain, Size: 2977 bytes --]

On Wed, 8 Nov 2023 11:36:27 -0500
Harry Wentland <harry.wentland@amd.com> wrote:

> Add a read-only TYPE property. The TYPE specifies the colorop
> type, such as enumerated curve, 1D LUT, CTM, 3D LUT, PWL LUT,
> etc.
> 
> v3:
>  - Make TYPE a range property
>  - Move enum drm_colorop_type to uapi header
>  - Fix drm_get_colorop_type_name description
> 
> For now we're only introducing an enumerated 1D LUT type to
> illustrate the concept.
> 
> Signed-off-by: Harry Wentland <harry.wentland@amd.com>
> ---
>  drivers/gpu/drm/drm_atomic.c      |  4 +--
>  drivers/gpu/drm/drm_atomic_uapi.c |  8 +++++-
>  drivers/gpu/drm/drm_colorop.c     | 43 ++++++++++++++++++++++++++++++-
>  include/drm/drm_colorop.h         | 17 +++++++++++-
>  include/uapi/drm/drm_mode.h       |  4 +++
>  5 files changed, 71 insertions(+), 5 deletions(-)
> 

...

>  static int drm_atomic_set_writeback_fb_for_connector(
> diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
> index a295ab96aee1..902b13e300fd 100644
> --- a/drivers/gpu/drm/drm_colorop.c
> +++ b/drivers/gpu/drm/drm_colorop.c
> @@ -32,12 +32,17 @@
>  
>  /* TODO big colorop doc, including properties, etc. */
>  
> +static const struct drm_prop_enum_list drm_colorop_type_enum_list[] = {
> +	{ DRM_COLOROP_1D_CURVE, "1D Curve" },
> +};
> +
>  /* Init Helpers */
>  
>  int drm_colorop_init(struct drm_device *dev, struct drm_colorop *colorop,
> -		     struct drm_plane *plane)
> +		     struct drm_plane *plane, enum drm_colorop_type type)
>  {
>  	struct drm_mode_config *config = &dev->mode_config;
> +	struct drm_property *prop;
>  	int ret = 0;
>  
>  	ret = drm_mode_object_add(dev, &colorop->base, DRM_MODE_OBJECT_COLOROP);
> @@ -46,12 +51,28 @@ int drm_colorop_init(struct drm_device *dev, struct drm_colorop *colorop,
>  
>  	colorop->base.properties = &colorop->properties;
>  	colorop->dev = dev;
> +	colorop->type = type;
>  	colorop->plane = plane;
>  
>  	list_add_tail(&colorop->head, &config->colorop_list);
>  	colorop->index = config->num_colorop++;
>  
>  	/* add properties */
> +
> +	/* type */
> +	prop = drm_property_create_range(dev,
> +					DRM_MODE_PROP_IMMUTABLE,
> +					"TYPE", type, type);

Why was this made a range property?

My review comment for the doc patch is wrong, the doc should mention
enum drm_colorop_type.

> +
> +	if (!prop)
> +		return -ENOMEM;
> +
> +	colorop->type_property = prop;
> +
> +	drm_object_attach_property(&colorop->base,
> +				   colorop->type_property,
> +				   colorop->type);
> +
>  	return ret;
>  }

...

> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 4e3251ff894a..0ebf0f480dc8 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -858,6 +858,10 @@ struct drm_color_lut {
>  	__u16 reserved;
>  };
>  
> +enum drm_colorop_type {
> +	DRM_COLOROP_1D_CURVE
> +};


Thanks,
pq

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-12-08 11:38 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 16:36 [RFC PATCH v3 00/23] Color Pipeline API w/ VKMS Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 01/23] drm: Don't treat 0 as -1 in drm_fixp2int_ceil Harry Wentland
2023-12-06 12:05   ` Melissa Wen
2023-12-08 11:12     ` Melissa Wen
2023-11-08 16:36 ` [RFC PATCH v3 02/23] drm: Add helper for conversion from signed-magnitude Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 03/23] drm/vkms: Create separate Kconfig file for VKMS Harry Wentland
2023-12-06 12:14   ` Melissa Wen
2023-11-08 16:36 ` [RFC PATCH v3 04/23] drm/vkms: Add kunit tests for VKMS LUT handling Harry Wentland
2023-11-09 22:05   ` Arthur Grillo
2023-11-10 20:24     ` Arthur Grillo
2023-12-07 14:30   ` Pekka Paalanen
2023-12-19 19:36     ` Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 05/23] drm/vkms: Avoid reading beyond LUT array Harry Wentland
2023-11-10 12:42   ` Arthur Grillo
2023-12-06 12:18     ` Melissa Wen
2023-12-06 13:15       ` Melissa Wen
2023-11-08 16:36 ` [RFC PATCH v3 06/23] drm/doc/rfc: Describe why prescriptive color pipeline is needed Harry Wentland
2023-12-08 11:20   ` Pekka Paalanen
2023-12-08 11:40   ` Pekka Paalanen
2023-11-08 16:36 ` [RFC PATCH v3 07/23] drm/colorop: Introduce new drm_colorop mode object Harry Wentland
2023-12-08 11:27   ` Pekka Paalanen
2023-11-08 16:36 ` [RFC PATCH v3 08/23] drm/colorop: Add TYPE property Harry Wentland
2023-12-08 11:37   ` Pekka Paalanen [this message]
2023-11-08 16:36 ` [RFC PATCH v3 09/23] drm/color: Add 1D Curve subtype Harry Wentland
2023-12-08 11:44   ` Pekka Paalanen
2023-11-08 16:36 ` [RFC PATCH v3 10/23] drm/colorop: Add BYPASS property Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 11/23] drm/colorop: Add NEXT property Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 12/23] drm/colorop: Add atomic state print for drm_colorop Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 13/23] drm/plane: Add COLOR PIPELINE property Harry Wentland
2023-12-08 11:53   ` Pekka Paalanen
2023-11-08 16:36 ` [RFC PATCH v3 14/23] drm/colorop: Add NEXT to colorop state print Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 15/23] drm/vkms: Add enumerated 1D curve colorop Harry Wentland
2023-12-08 12:15   ` Pekka Paalanen
2023-11-08 16:36 ` [RFC PATCH v3 16/23] drm/vkms: Add kunit tests for linear and sRGB LUTs Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 17/23] drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE Harry Wentland
2023-12-08 12:33   ` Pekka Paalanen
2023-11-08 16:36 ` [RFC PATCH v3 18/23] drm/colorop: Add 3x4 CTM type Harry Wentland
2023-12-08 12:39   ` Pekka Paalanen
2023-11-08 16:36 ` [RFC PATCH v3 19/23] drm/vkms: Pull apply_colorop out of pre_blend_color_transform Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 20/23] drm/vkms: Use s32 for internal color pipeline precision Harry Wentland
2023-12-08 13:01   ` Pekka Paalanen
2023-11-08 16:36 ` [RFC PATCH v3 21/23] drm/vkms: add 3x4 matrix in color pipeline Harry Wentland
2023-12-08 13:11   ` Pekka Paalanen
2024-01-04 16:12     ` Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 22/23] drm/tests: Add a few tests around drm_fixed.h Harry Wentland
2023-11-08 16:36 ` [RFC PATCH v3 23/23] drm/vkms: Add tests for CTM handling Harry Wentland
2023-12-08 13:32   ` Pekka Paalanen
2024-01-04 16:09     ` Harry Wentland
2024-02-19 11:02 ` [RFC PATCH v3 00/23] Color Pipeline API w/ VKMS Shankar, Uma

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=20231208133753.0f196faa@eldfell \
    --to=ppaalanen@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=wayland-devel@lists.freedesktop.org \
    /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