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 13/15] drm/amd/display: allow individual colorop changes
Date: Fri,  4 Dec 2026 18:42:38 -0500	[thread overview]
Message-ID: <20261204234238.2132948-1-gildekel@google.com> (raw)
In-Reply-To: <20261111160814.21326-14-mwen@igalia.com>

Hi Melissa,

Caveat: I am not involved with AMD and have not compiled or tested this.
I read through it because we hit the same committed-state fallback
pattern on i915, so take these as inspection-only observations that
might be worth double-checking.

> +	colorop_state = drm_atomic_get_new_colorop_state(state, colorop);
>  	if (!colorop_state)
> -		return -EINVAL;
> +		colorop_state = colorop->state;
>  
>  	return __set_colorop_in_tf_1d_curve(dc_plane_state, colorop_state);

Every other refactored helper in this patch validates colorop->type and
returns -EINVAL on mismatch, except __set_dm_plane_colorop_degamma(),
which dropped its previous BIT(curve_1d_type) &
amdgpu_dm_supported_degam_tfs check without adding an explicit
`colorop->type != DRM_COLOROP_1D_CURVE` check.

Also, since this pattern appears nine times across 05/15 and 13/15 (and
i915 and vkms need the exact same lookup), would it make sense to pull a
shared lock-asserting drm_atomic_get_new_or_current_colorop_state()
helper into this series?

> +	drm_dbg(dev, "3x4 matrix colorop with ID: %d\n", colorop->base.id);
> +	blob = colorop_state->data;
> +	if (blob->length == sizeof(struct drm_color_ctm_3x4)) {

This relies on 08/15 rejecting NULL blobs in drm_atomic_check_only(). A
defensive `if (!blob) return -EINVAL;` might be worth adding in case a
direct KUnit caller invokes this without going through core atomic
check.

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

Thanks,
Gil

  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
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 [this message]
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=20261204234238.2132948-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.