All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Maxime Ripard" <mripard@kernel.org>
Cc: linux-sunxi@lists.linux.dev
Subject: Re: [PATCH v5 07/19] drm/colorop: Create drm_atomic_helper_colorop_create_state()
Date: Tue, 19 May 2026 09:34:11 +0000	[thread overview]
Message-ID: <20260519093412.5C5B2C2BCB3@smtp.kernel.org> (raw)
In-Reply-To: <20260519-drm-mode-config-init-v5-7-388b03321e38@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The `drm_atomic_helper_colorop_create_state` helper function lacks an `EXPORT_SYMBOL()` declaration and the `atomic_create_state` hook was not added to `struct drm_colorop_funcs`.
--

commit 96308971f93a9789ee23443eab7d504d21283abe
Author: Maxime Ripard <mripard@kernel.org>

drm/colorop: Create drm_atomic_helper_colorop_create_state()

Commit 47b5ac7daa46 ("drm/atomic: Add new atomic_create_state callback
to drm_private_obj") introduced a new pattern for allocating drm object
states. This commit creates a new hook that allocates and initializes a
pristine state without side effects for colorops.

> diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
> index 4c4d0a953e357..c0eecde8c1762 100644
> --- a/drivers/gpu/drm/drm_colorop.c
> +++ b/drivers/gpu/drm/drm_colorop.c
> @@ -523,6 +523,29 @@ static void __drm_colorop_state_init(struct drm_colorop_state *colorop_state,
>  	}
>  }
>  
> +/**
> + * drm_atomic_helper_colorop_create_state - Allocates and initializes colorop atomic state
> + * @colorop: drm colorop
> + *
> + * Initializes a pristine @drm_colorop_state.
> + *
> + * RETURNS:
> + * Pointer to new colorop state, or ERR_PTR on failure.
> + */
> +struct drm_colorop_state *
> +drm_atomic_helper_colorop_create_state(struct drm_colorop *colorop)
> +{
> +	struct drm_colorop_state *state;
> +
> +	state = kzalloc_obj(*state);
> +	if (!state)
> +		return ERR_PTR(-ENOMEM);
> +
> +	__drm_colorop_state_init(state, colorop);
> +
> +	return state;
> +}
> +

Is this missing an EXPORT_SYMBOL() declaration?

Modular drivers like amdgpu or vkms wouldn't be able to link and use this
new helper without it.

[ ... ]

> diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
> index c873199c60da9..b4b9e4f558ab1 100644
> --- a/include/drm/drm_colorop.h
> +++ b/include/drm/drm_colorop.h
> @@ -425,6 +425,8 @@ int drm_plane_colorop_3dlut_init(struct drm_device *dev, struct drm_colorop *col
>  				 enum drm_colorop_lut3d_interpolation_type interpolation,
>  				 uint32_t flags);
>  
> +struct drm_colorop_state *
> +drm_atomic_helper_colorop_create_state(struct drm_colorop *colorop);

Does struct drm_colorop_funcs also need to be updated to include an
atomic_create_state() function pointer?

Without adding the hook, it seems drivers cannot assign the new helper and
the DRM core would have no way to invoke it.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260519-drm-mode-config-init-v5-0-388b03321e38@kernel.org?part=7

  reply	other threads:[~2026-05-19  9:34 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19  9:01 [PATCH v5 00/19] drm/atomic: Rework initial state allocation Maxime Ripard
2026-05-19  9:01 ` [PATCH v5 01/19] drm/atomic: Document atomic commit lifetime Maxime Ripard
2026-05-26  8:59   ` Thomas Zimmermann
2026-05-19  9:01 ` [PATCH v5 02/19] drm/colorop: Fix typos in the doc Maxime Ripard
2026-05-19  9:01 ` [PATCH v5 03/19] drm/atomic: Drop drm_private_obj.state assignment from create_state Maxime Ripard
2026-05-19 11:35   ` sashiko-bot
2026-05-26  9:03   ` Thomas Zimmermann
2026-05-19  9:01 ` [PATCH v5 04/19] drm/atomic: Expand atomic_create_state expectations for drm_private_obj Maxime Ripard
2026-05-26  9:03   ` Thomas Zimmermann
2026-05-19  9:01 ` [PATCH v5 05/19] drm/mode-config: Document drm_private_obj exclusion from drm_mode_config_reset() Maxime Ripard
2026-05-26  9:05   ` Thomas Zimmermann
2026-05-19  9:01 ` [PATCH v5 06/19] drm/colorop: Rename __drm_colorop_state_reset() Maxime Ripard
2026-05-19  9:01 ` [PATCH v5 07/19] drm/colorop: Create drm_atomic_helper_colorop_create_state() Maxime Ripard
2026-05-19  9:34   ` sashiko-bot [this message]
2026-05-19  9:01 ` [PATCH v5 08/19] drm/atomic-state-helper: Fix __drm_atomic_helper_plane_reset() doc typo Maxime Ripard
2026-05-19  9:01 ` [PATCH v5 09/19] drm/atomic-state-helper: Rename __drm_atomic_helper_plane_state_reset() Maxime Ripard
2026-05-19  9:01 ` [PATCH v5 10/19] drm/plane: Add new atomic_create_state callback Maxime Ripard
2026-05-26  9:08   ` Thomas Zimmermann
2026-05-19  9:01 ` [PATCH v5 11/19] drm/atomic-state-helper: Rename __drm_atomic_helper_crtc_state_reset() Maxime Ripard
2026-05-19  9:01 ` [PATCH v5 12/19] drm/crtc: Add new atomic_create_state callback Maxime Ripard
2026-05-26  9:22   ` Thomas Zimmermann
2026-05-19  9:01 ` [PATCH v5 13/19] drm/atomic-state-helper: Rename __drm_atomic_helper_connector_state_reset() Maxime Ripard
2026-05-19  9:01 ` [PATCH v5 14/19] drm/hdmi: Rename __drm_atomic_helper_connector_hdmi_reset() Maxime Ripard
2026-05-19  9:13   ` sashiko-bot
2026-05-19  9:01 ` [PATCH v5 15/19] drm/connector: Add new atomic_create_state callback Maxime Ripard
2026-05-26  9:28   ` Thomas Zimmermann
2026-05-19  9:01 ` [PATCH v5 16/19] drm/mode-config: Create drm_mode_config_create_initial_state() Maxime Ripard
2026-05-26  9:33   ` Thomas Zimmermann
2026-05-19  9:01 ` [PATCH v5 17/19] drm/drv: Switch skeleton to drm_mode_config_create_initial_state() Maxime Ripard
2026-05-26  9:34   ` Thomas Zimmermann
2026-05-19  9:02 ` [PATCH v5 18/19] drm/tidss: Convert to atomic_create_state Maxime Ripard
2026-05-19  9:02 ` [PATCH v5 19/19] drm/bridge_connector: " Maxime Ripard
2026-05-19  9:09 ` ✗ CI.checkpatch: warning for drm/atomic: Rework initial state allocation (rev4) Patchwork
2026-05-19  9:10 ` ✓ CI.KUnit: success " Patchwork
2026-05-19  9:49 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-19 13:12 ` ✗ i915.CI.BAT: failure " Patchwork
2026-05-19 19:24 ` ✗ Xe.CI.FULL: " Patchwork
2026-05-26  9:36 ` [PATCH v5 00/19] drm/atomic: Rework initial state allocation Thomas Zimmermann

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=20260519093412.5C5B2C2BCB3@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mripard@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.