<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/drm/drm_atomic.h, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-06-04T12:42:15+00:00</updated>
<entry>
<title>drm/atomic: clarify the rules around drm_atomic_state-&gt;allow_modeset</title>
<updated>2025-06-04T12:42:15+00:00</updated>
<author>
<name>Simona Vetter</name>
<email>simona.vetter@ffwll.ch</email>
</author>
<published>2025-01-08T17:24:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e585f4f44a102f1cfdbace721277cc056e77411e'/>
<id>urn:sha1:e585f4f44a102f1cfdbace721277cc056e77411e</id>
<content type='text'>
[ Upstream commit c5e3306a424b52e38ad2c28c7f3399fcd03e383d ]

msm is automagically upgrading normal commits to full modesets, and
that's a big no-no:

- for one this results in full on-&gt;off-&gt;on transitions on all these
  crtc, at least if you're using the usual helpers. Which seems to be
  the case, and is breaking uapi

- further even if the ctm change itself would not result in flicker,
  this can hide modesets for other reasons. Which again breaks the
  uapi

v2: I forgot the case of adding unrelated crtc state. Add that case
and link to the existing kerneldoc explainers. This has come up in an
irc discussion with Manasi and Ville about intel's bigjoiner mode.
Also cc everyone involved in the msm irc discussion, more people
joined after I sent out v1.

v3: Wording polish from Pekka and Thomas

Acked-by: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Acked-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: David Airlie &lt;airlied@gmail.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Pekka Paalanen &lt;pekka.paalanen@collabora.com&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Simon Ser &lt;contact@emersion.fr&gt;
Cc: Manasi Navare &lt;navaremanasi@google.com&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Cc: Abhinav Kumar &lt;quic_abhinavk@quicinc.com&gt;
Cc: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Simona Vetter &lt;simona.vetter@intel.com&gt;
Signed-off-by: Simona Vetter &lt;simona.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250108172417.160831-1-simona.vetter@ffwll.ch
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: add helper functions to retrieve old and new crtc</title>
<updated>2023-03-13T01:43:49+00:00</updated>
<author>
<name>Vinod Polimera</name>
<email>quic_vpolimer@quicinc.com</email>
</author>
<published>2023-03-02T16:33:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7b9a9e35e45def496b0a5b3f206bb4efa712ea4a'/>
<id>urn:sha1:7b9a9e35e45def496b0a5b3f206bb4efa712ea4a</id>
<content type='text'>
Add new helper functions, drm_atomic_get_old_crtc_for_encoder
and drm_atomic_get_new_crtc_for_encoder to retrieve the
corresponding crtc for the encoder.

Signed-off-by: Sankeerth Billakanti &lt;quic_sbillaka@quicinc.com&gt;
Signed-off-by: Vinod Polimera &lt;quic_vpolimer@quicinc.com&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Patchwork: https://patchwork.freedesktop.org/patch/524718/
Link: https://lore.kernel.org/r/1677774797-31063-2-git-send-email-quic_vpolimer@quicinc.com
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
</content>
</entry>
<entry>
<title>drm/atomic: Constify the old/new state accessors</title>
<updated>2022-11-28T10:46:50+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-11-23T15:25:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2081bd8994362785b07b435bdc0c5b53d46b1205'/>
<id>urn:sha1:2081bd8994362785b07b435bdc0c5b53d46b1205</id>
<content type='text'>
The drm_atomic_get_(old|new)_*_state don't modify the passed
drm_atomic_state, so we can make it const.

Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221123-rpi-kunit-tests-v1-9-051a0bb60a16@cerno.tech
</content>
</entry>
<entry>
<title>drm/atomic: fix warning of unused variable</title>
<updated>2022-06-09T14:09:46+00:00</updated>
<author>
<name>GONG, Ruiqi</name>
<email>gongruiqi1@huawei.com</email>
</author>
<published>2022-06-07T11:08:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4527d47bb63a134c4483a1a478d0ff5874b466c7'/>
<id>urn:sha1:4527d47bb63a134c4483a1a478d0ff5874b466c7</id>
<content type='text'>
Fix the `unused-but-set-variable` warning as how other iteration
wrappers do.

Link: https://lore.kernel.org/all/202206071049.pofHsRih-lkp@intel.com/
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: GONG, Ruiqi &lt;gongruiqi1@huawei.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220607110848.941486-1-gongruiqi1@huawei.com
</content>
</entry>
<entry>
<title>drm/atomic: Add atomic_print_state to private objects</title>
<updated>2022-03-31T08:19:45+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-03-28T12:43:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97a1f01b3f2f734bd3982aa5639b2b54632f8f7d'/>
<id>urn:sha1:97a1f01b3f2f734bd3982aa5639b2b54632f8f7d</id>
<content type='text'>
A number of drivers (amdgpu, komeda, vc4, etc.) leverage the
drm_private_state structure, but we don't have any infrastructure to
provide debugging like we do for the other components state. Let's add
an atomic_print_state hook to be consistent.

Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://lore.kernel.org/r/20220328124304.2309418-3-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm: fix doc warnings in drm_atomic.h</title>
<updated>2021-06-04T16:40:01+00:00</updated>
<author>
<name>Yu Kuai</name>
<email>yukuai3@huawei.com</email>
</author>
<published>2021-06-03T11:30:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c45d9400a08a4c8e84a3a35adc7533d877e42ffe'/>
<id>urn:sha1:c45d9400a08a4c8e84a3a35adc7533d877e42ffe</id>
<content type='text'>
Add description for parameters for
for_each_new_plane_in_state_reverse to fix warnings:

include/drm/drm_atomic.h:908: warning: Function parameter or member '__state' not described in 'for_each_new_plane_in_state_reverse'
include/drm/drm_atomic.h:908: warning: Function parameter or member 'plane' not described in 'for_each_new_plane_in_state_reverse'
include/drm/drm_atomic.h:908: warning: Function parameter or member 'new_plane_state' not described in 'for_each_new_plane_in_state_reverse'
include/drm/drm_atomic.h:908: warning: Function parameter or member '__i' not described in 'for_each_new_plane_in_state_reverse'

Fixes: a6c3c37b661d ("drm/amd/display: fix gcc set but not used warning of variable 'old_plane_state'")
Signed-off-by: Yu Kuai &lt;yukuai3@huawei.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: fix gcc set but not used warning of variable 'old_plane_state'</title>
<updated>2021-06-02T02:55:39+00:00</updated>
<author>
<name>Yu Kuai</name>
<email>yukuai3@huawei.com</email>
</author>
<published>2021-05-29T09:28:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a6c3c37b661dae8f34cb7ed90aa3f88372cb1c75'/>
<id>urn:sha1:a6c3c37b661dae8f34cb7ed90aa3f88372cb1c75</id>
<content type='text'>
define a new macro for_each_new_plane_in_state_reverse to replace
for_each_oldnew_plane_in_state_reverse, so that the unused variable
'old_plane_state' can be removed.

Fix gcc warning:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:10066:26: warning:
 variable ‘old_plane_state’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Yu Kuai &lt;yukuai3@huawei.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm: Introduce a drm_crtc_commit_wait helper</title>
<updated>2021-01-21T11:11:04+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2021-01-11T08:44:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b99c2c95412c0b85accdafe9e32ba1e84d240f55'/>
<id>urn:sha1:b99c2c95412c0b85accdafe9e32ba1e84d240f55</id>
<content type='text'>
There's currently four users of the same logic to wait for a commit to
be flipped: three for the CRTCs, connectors and planes in
drm_atomic_helper_wait_for_dependencies, and one in vc4.

Let's consolidate this a bit to avoid any code duplication.

Suggested-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210111084401.117152-1-maxime@cerno.tech
</content>
</entry>
<entry>
<title>drm: Document use-after-free gotcha with private objects</title>
<updated>2020-12-15T10:33:23+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2020-12-04T15:11:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27125e86b797deea4c42dc35fb0a71fd1d5ae53a'/>
<id>urn:sha1:27125e86b797deea4c42dc35fb0a71fd1d5ae53a</id>
<content type='text'>
The private objects have a gotcha that could result in a use-after-free,
make sure it's properly documented.

Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201204151138.1739736-3-maxime@cerno.tech
</content>
</entry>
<entry>
<title>include/drm/drm_atomic: Make use of 'new_crtc_state'</title>
<updated>2020-11-18T10:51:58+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-11-16T17:41:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94ffd9b86284ab01464b4546b4a927e419b8be34'/>
<id>urn:sha1:94ffd9b86284ab01464b4546b4a927e419b8be34</id>
<content type='text'>
In the macro for_each_oldnew_crtc_in_state() 'crtc_state' is provided
as a container for state-&gt;crtcs[i].new_state, but is not utilised in
some use-cases, so we fake-use it instead.

Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/imx/ipuv3-plane.c: In function ‘ipu_planes_assign_pre’:
 drivers/gpu/drm/imx/ipuv3-plane.c:746:42: warning: variable ‘crtc_state’ set but not used [-Wunused-but-set-variable]

Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Cc: Shawn Guo &lt;shawnguo@kernel.org&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Pengutronix Kernel Team &lt;kernel@pengutronix.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: NXP Linux Team &lt;linux-imx@nxp.com&gt;
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-43-lee.jones@linaro.org
</content>
</entry>
</feed>
