[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d31ed29f-742d-4a23-9049-12169cf83846@bootlin.com>
Date: Fri, 19 Sep 2025 14:51:18 +0200
From: Louis Chauvet <louis.chauvet@...tlin.com>
To: Nícolas F. R. A. Prado <nfraprado@...labora.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Chun-Kuang Hu <chunkuang.hu@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Haneen Mohammed <hamohammed.sa@...il.com>,
Melissa Wen <melissa.srw@...il.com>
Cc: Alex Hung <alex.hung@....com>, wayland-devel@...ts.freedesktop.org,
harry.wentland@....com, leo.liu@....com, ville.syrjala@...ux.intel.com,
pekka.paalanen@...labora.com, contact@...rsion.fr, mwen@...lia.com,
jadahl@...hat.com, sebastian.wick@...hat.com, shashank.sharma@....com,
agoins@...dia.com, joshua@...ggi.es, mdaenzer@...hat.com, aleixpol@....org,
xaver.hugl@...il.com, victoria@...tem76.com, uma.shankar@...el.com,
quic_naseer@...cinc.com, quic_cbraga@...cinc.com, quic_abhinavk@...cinc.com,
marcan@...can.st, Liviu.Dudau@....com, sashamcintosh@...gle.com,
chaitanya.kumar.borah@...el.com, mcanal@...lia.com, kernel@...labora.com,
daniels@...labora.com, leandro.ribeiro@...labora.com,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
Simona Vetter <simona.vetter@...ll.ch>
Subject: Re: [PATCH RFC v2 12/20] drm/crtc: Track post-blend color pipeline
client cap in drm_crtc_state
Le 18/09/2025 à 02:43, Nícolas F. R. A. Prado a écrit :
> Some drivers, like VKMS, only have access to the drm_crtc_state but not
> the drm_atomic_state during composition of the output framebuffer. Store
> the state of the post-blend color pipeline client cap in the
> drm_crtc_state so those drivers can decide whether to look at the color
> pipeline or the legacy properties for the color management settings to
> apply.
Reviewed-by: Louis Chauvet <louis.chauvet@...tlin.com>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
> ---
> drivers/gpu/drm/drm_atomic.c | 1 +
> include/drm/drm_crtc.h | 8 ++++++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 6982c978dc530b838353ace60f748660c3b4524d..bbfa35c800240722785a6db440eb3d47ef9c8ed6 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -386,6 +386,7 @@ drm_atomic_get_crtc_state(struct drm_atomic_state *state,
> state->crtcs[index].new_state = crtc_state;
> state->crtcs[index].ptr = crtc;
> crtc_state->state = state;
> + crtc_state->color_pipeline_enabled = state->post_blend_color_pipeline;
>
> drm_dbg_atomic(state->dev, "Added [CRTC:%d:%s] %p state to %p\n",
> crtc->base.id, crtc->name, crtc_state, state);
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index df03637ca25abd45e96b5944229297f776fd046d..cb9eda6335e0d6728d99d67cc6916ad2d0e1d94e 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -282,6 +282,14 @@ struct drm_crtc_state {
> */
> struct drm_colorop *color_pipeline;
>
> + /**
> + * @color_pipeline_enabled:
> + *
> + * Whether color management should be done based on the &color_pipeline
> + * or the legacy color properties (&ctm, &gamma_lut and °amma_lut).
> + */
> + bool color_pipeline_enabled;
> +
> /**
> * @target_vblank:
> *
>
--
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists