All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gil Dekel <gildekel@google.com>
To: Melissa Wen <mwen@igalia.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	 intel-xe@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	 Uma Shankar <uma.shankar@intel.com>,
	 Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
	Sean Paul <sean@poorly.run>,
	airlied@gmail.com,  simona@ffwll.ch, mripard@kernel.org,
	tzimmermann@suse.de,  maarten.lankhorst@linux.intel.com,
	alexander.deucher@amd.com,  alex.hung@amd.com,
	aurabindo.pillai@amd.com, christian.koenig@amd.com,
	 harry.wentland@amd.com, sunpeng.li@amd.com, contact@emersion.fr,
	 daniels@collabora.com, sebastian.wick@redhat.com,
	siqueira@igalia.com,  Xaver Hugl <xaver.hugl@gmail.com>,
	Pekka Paalanen <pekka.paalanen@collabora.com>,
	 Matthew Schwartz <matthew.schwartz@linux.dev>,
	kernel-dev@igalia.com,  Rob Clark <robin.clark@oss.qualcomm.com>,
	Dmitry Baryshkov <lumag@kernel.org>,
	 Marijn Suijten <marijn.suijten@somainline.org>,
	linux-arm-msm@vger.kernel.org,  freedreno@lists.freedesktop.org,
	louis.chauvet@bootlin.com,
	 John Harrison <John.Harrison@igalia.com>
Subject: Re: [PATCH v5 03/15] drm/atomic: only add states of active or transient active colorops
Date: Fri,  4 Dec 2026 18:42:31 -0500	[thread overview]
Message-ID: <20261204234231.2131404-1-gildekel@google.com> (raw)
In-Reply-To: <20261111160814.21326-4-mwen@igalia.com>

Hi Melissa,

Checked this against i915/xe (including intel_load_detect's
drm_atomic_add_affected_planes() call) and it looks good there. A few
small comments inline.

> Only consider affected colorop states those that are part of an active
> color pipeline or a pipeline that is about to be activated or
> deactivated in the same atomic commit, i.e., colorop is in the chain of
> old/new plane color pipeline property. To cover color_pipeline
> deactivation, remove the condition for plane_state->color_pipeline.
>
> Signed-off-by: Melissa Wen <mwen@igalia.com>

Should this carry a Fixes tag for the earlier commit adding affected
colorops with affected planes [1]?

> +/*
> + * This function walks old and new plane state color pipelines and adds all
> + * colorops in use by @plane to the atomic configuration @state. This is useful
> + * when an atomic commit needs to check all currently enabled or about to be
> + * enabled colorop on @plane, e.g. when changing the mode. This also avoids
> + * including colorop states that are not part of the atomic state.

"avoids including colorop states that are not part of the atomic state"
reads a bit unclear. Maybe "avoids pulling in colorops from inactive
pipelines"?

> +	/* Same color pipeline as new; no point walking old. */
> +	if (new_plane_state->color_pipeline == old_plane_state->color_pipeline)
> +		return 0;
> +
> +	drm_for_each_colorop_in_pipeline(colorop,
> +					 old_plane_state->color_pipeline) {
> +		colorop_state = drm_atomic_get_colorop_state(state, colorop);
> +		if (IS_ERR(colorop_state))
> +			return PTR_ERR(colorop_state);
> +	}

Small question: on deactivation (P1 -> 0) during a modeset, is there
still a consumer that needs the old pipeline's colorop states pulled
here once drivers fall back to committed state?

> +#define drm_for_each_colorop_in_pipeline(colorop, pipeline) \
> +	for ((colorop) = (pipeline); (colorop); (colorop) = (colorop)->next)

Worth adding brief kerneldoc here since drivers (i915, vkms, amdgpu)
will reuse this macro.

[1] https://lore.kernel.org/dri-devel/20260310113238.3495981-3-chaitanya.kumar.borah@intel.com/

Assisted-by: Gemini
Assisted-by: Claude:claude-fable-5.2

Thanks,
Gil

  parent reply	other threads:[~2026-12-04 23:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 16:05 [PATCH v5 00/15] drm/atomic: only add states of active or transient active colorops Melissa Wen
2026-11-11 16:05 ` [PATCH v5 01/15] drm/amd/display: Update colorop pipeline tests for new fixed matrix op Melissa Wen
2026-11-11 16:05 ` [PATCH v5 02/15] drm/amd/display: add missing FIXED_MATRIX colorop to AMD KUnit tests Melissa Wen
2026-11-11 16:05 ` [PATCH v5 03/15] drm/atomic: only add states of active or transient active colorops Melissa Wen
2026-11-11 17:12   ` sashiko-bot
2026-12-04 23:42   ` Gil Dekel [this message]
2026-11-11 16:05 ` [PATCH v5 04/15] drm/amd/display: add plane to commit on KUnit cursor mode tests Melissa Wen
2026-11-11 16:05 ` [PATCH v5 05/15] drm/amd/display: only check colorops of an active color pipeline Melissa Wen
2026-11-11 16:05 ` [PATCH v5 06/15] drm/atomic: reject colorop update from inactive " Melissa Wen
2026-12-04 23:42   ` Gil Dekel
2026-11-11 16:05 ` [PATCH v5 07/15] drm/atomic: duplicate state of all colorops Melissa Wen
2026-11-11 17:38   ` sashiko-bot
2026-12-04 23:42   ` Gil Dekel
2026-11-11 16:05 ` [PATCH v5 08/15] drm/atomic: check if an active colorop has a blob if its type requires one Melissa Wen
2026-12-04 23:42   ` Gil Dekel
2026-11-11 16:05 ` [PATCH v5 09/15] drm/amd/display: truly bypass plane colorop 3x4 matrix and hdr mult Melissa Wen
2026-11-11 16:05 ` [PATCH v5 10/15] drm/amd/display: make shaper bypass mode cleaner Melissa Wen
2026-11-11 16:05 ` [PATCH v5 11/15] drm/amd/display: make blnd bypass mode clearer Melissa Wen
2026-11-11 16:05 ` [PATCH v5 12/15] drm/amd/display: don't ignore failure on blend colorop setup Melissa Wen
2026-11-11 16:05 ` [PATCH v5 13/15] drm/amd/display: allow individual colorop changes Melissa Wen
2026-12-04 23:42   ` Gil Dekel
2026-11-11 16:05 ` [PATCH v5 14/15] drm/atomic: make drm_atomic_add_affected_colorops() static Melissa Wen
2026-12-04 23:42   ` Gil Dekel
2026-11-11 16:05 ` [PATCH v5 15/15] drm/amd/display: distinguish colorop setup error from no colorop support Melissa Wen
2026-11-11 16:18 ` ✗ CI.checkpatch: warning for drm/atomic: only add states of active or transient active colorops Patchwork
2026-11-11 16:20 ` ✓ CI.KUnit: success " Patchwork
2026-11-11 16:54 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-11 17:57 ` ✓ i915.CI.BAT: " Patchwork
2026-11-12  1:57 ` ✓ Xe.CI.FULL: " Patchwork
2026-11-12 11:52 ` ✓ i915.CI.Full: " Patchwork
2026-12-04 10:36 ` [PATCH v5 00/15] " Melissa Wen
2026-12-05  2:59 ` Gil Dekel

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=20261204234231.2131404-1-gildekel@google.com \
    --to=gildekel@google.com \
    --cc=John.Harrison@igalia.com \
    --cc=airlied@gmail.com \
    --cc=alex.hung@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=christian.koenig@amd.com \
    --cc=contact@emersion.fr \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kernel-dev@igalia.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=matthew.schwartz@linux.dev \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=pekka.paalanen@collabora.com \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=sebastian.wick@redhat.com \
    --cc=simona@ffwll.ch \
    --cc=siqueira@igalia.com \
    --cc=sunpeng.li@amd.com \
    --cc=tzimmermann@suse.de \
    --cc=uma.shankar@intel.com \
    --cc=xaver.hugl@gmail.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.