<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_framebuffer.c, 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-07-17T16:35:14+00:00</updated>
<entry>
<title>drm/framebuffer: Acquire internal references on GEM handles</title>
<updated>2025-07-17T16:35:14+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-07-07T13:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e2e9b3d708473040a08ab884f7dc2369752bb69'/>
<id>urn:sha1:2e2e9b3d708473040a08ab884f7dc2369752bb69</id>
<content type='text'>
commit f6bfc9afc7510cb5e6fbe0a17c507917b0120280 upstream.

Acquire GEM handles in drm_framebuffer_init() and release them in
the corresponding drm_framebuffer_cleanup(). Ties the handle's
lifetime to the framebuffer. Not all GEM buffer objects have GEM
handles. If not set, no refcounting takes place. This is the case
for some fbdev emulation. This is not a problem as these GEM objects
do not use dma-bufs and drivers will not release them while fbdev
emulation is running. Framebuffer flags keep a bit per color plane
of which the framebuffer holds a GEM handle reference.

As all drivers use drm_framebuffer_init(), they will now all hold
dma-buf references as fixed in commit 5307dce878d4 ("drm/gem: Acquire
references on GEM handles for framebuffers").

In the GEM framebuffer helpers, restore the original ref counting
on buffer objects. As the helpers for handle refcounting are now
no longer called from outside the DRM core, unexport the symbols.

v3:
- don't mix internal flags with mode flags (Christian)
v2:
- track framebuffer handle refs by flag
- drop gma500 cleanup (Christian)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Fixes: 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers")
Reported-by: Bert Karwatzki &lt;spasswolf@web.de&gt;
Closes: https://lore.kernel.org/dri-devel/20250703115915.3096-1-spasswolf@web.de/
Tested-by: Bert Karwatzki &lt;spasswolf@web.de&gt;
Tested-by: Mario Limonciello &lt;superm1@kernel.org&gt;
Tested-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Anusha Srivatsa &lt;asrivats@redhat.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: "Christian König" &lt;christian.koenig@amd.com&gt;
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://lore.kernel.org/r/20250707131224.249496-1-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/framebuffer: Fix use of uninitialized variable</title>
<updated>2024-02-05T20:14:26+00:00</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ideasonboard.com</email>
</author>
<published>2023-11-03T13:14:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b3fbff86a623a0ec053d5a4ab432956cb025c1f'/>
<id>urn:sha1:9b3fbff86a623a0ec053d5a4ab432956cb025c1f</id>
<content type='text'>
[ Upstream commit f9af8f0c1dc567a5a6a6318ff324c45d80d4a60f ]

smatch reports:

drivers/gpu/drm/drm_framebuffer.c:654 drm_mode_getfb2_ioctl() error: uninitialized symbol 'ret'.

'ret' is possibly not set when there are no errors, causing the error
above. I can't say if that ever happens in real-life, but in any case I
think it is good to initialize 'ret' to 0.

Reviewed-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231103-uninit-fixes-v2-2-c22b2444f5f5@ideasonboard.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: use new debugfs device-centered functions on DRM core files</title>
<updated>2022-12-22T17:58:21+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2022-12-19T12:06:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6fd80729f14e3f70d4c07ea91ac44ed5ab8dfe60'/>
<id>urn:sha1:6fd80729f14e3f70d4c07ea91ac44ed5ab8dfe60</id>
<content type='text'>
Replace the use of drm_debugfs_create_files() with the new
drm_debugfs_add_files() function in all DRM core files, centering the
debugfs files management on the drm_device instead of drm_minor.

Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-3-mcanal@igalia.com
</content>
</entry>
<entry>
<title>drm/framebuffer: convert to drm_dbg_kms()</title>
<updated>2022-09-28T08:43:30+00:00</updated>
<author>
<name>Simon Ser</name>
<email>contact@emersion.fr</email>
</author>
<published>2022-09-05T10:36:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=019d157e5b0355b4da957f262b3eeb3b7a948f8b'/>
<id>urn:sha1:019d157e5b0355b4da957f262b3eeb3b7a948f8b</id>
<content type='text'>
Replace DRM_DEBUG_KMS() with drm_dbg_kms() which allows specifying
the DRM device to provide more context.

Signed-off-by: Simon Ser &lt;contact@emersion.fr&gt;
Reviewed-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220905103559.118561-1-contact@emersion.fr
</content>
</entry>
<entry>
<title>drm:remove rebundant word "in" in comments</title>
<updated>2022-07-19T07:03:24+00:00</updated>
<author>
<name>shaomin Deng</name>
<email>dengshaomin@cdjrlc.com</email>
</author>
<published>2022-07-18T15:04:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3475b50873e4a68302822d91ab5cb031c1a92d50'/>
<id>urn:sha1:3475b50873e4a68302822d91ab5cb031c1a92d50</id>
<content type='text'>
there is a repeated word "in", so remove it.

Signed-off-by: shaomin Deng &lt;dengshaomin@cdjrlc.com&gt;
Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220718150418.7321-1-dengshaomin@cdjrlc.com
</content>
</entry>
<entry>
<title>drm/framebuffer: Use actual bpp for DRM_IOCTL_MODE_GETFB</title>
<updated>2022-07-09T13:01:20+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2022-07-08T18:20:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4c59b0805e9bf873fd3f5dca4fc53d8c220e39b4'/>
<id>urn:sha1:4c59b0805e9bf873fd3f5dca4fc53d8c220e39b4</id>
<content type='text'>
When userspace queries the properties of a frame buffer, the number of
bits per pixel is derived from the deprecated drm_format_info.cpp[]
field, which does not take into account block sizes.

Fix this by using the actual number of bits per pixel instead.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/b612780feef200b7f914a674db28ed227e7cdc64.1657294931.git.geert@linux-m68k.org
</content>
</entry>
<entry>
<title>drm: introduce fb_modifiers_not_supported flag in mode_config</title>
<updated>2022-01-31T20:45:23+00:00</updated>
<author>
<name>Tomohito Esaki</name>
<email>etom@igel.co.jp</email>
</author>
<published>2022-01-28T06:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2af104290da5e4858e8caefa068827d7392c6a09'/>
<id>urn:sha1:2af104290da5e4858e8caefa068827d7392c6a09</id>
<content type='text'>
If only linear modifier is advertised, since there are many drivers that
only linear supported, the DRM core should handle this rather than
open-coding in every driver. However, there are legacy drivers such as
radeon that do not support modifiers but infer the actual layout of the
underlying buffer. Therefore, a new flag fb_modifiers_not_supported is
introduced for these legacy drivers, and allow_fb_modifiers is replaced
with this new flag.

v3:
 - change the order as follows:
   1. add fb_modifiers_not_supported flag
   2. add default modifiers
   3. remove allow_fb_modifiers flag
 - add a conditional disable in amdgpu_dm_plane_init()

v4:
 - modify kernel docs

v5:
 - modify kernel docs

Signed-off-by: Tomohito Esaki &lt;etom@igel.co.jp&gt;
Acked-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220128060836.11216-2-etom@igel.co.jp
</content>
</entry>
<entry>
<title>Revert "drm: cleanup: drm_modeset_lock_all() --&gt; DRM_MODESET_LOCK_ALL_BEGIN()"</title>
<updated>2021-10-04T13:34:57+00:00</updated>
<author>
<name>Sean Paul</name>
<email>seanpaul@chromium.org</email>
</author>
<published>2021-10-02T15:45:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=76fd2c379e654aaa6ab3435a5c6bdd7dc4c1d28c'/>
<id>urn:sha1:76fd2c379e654aaa6ab3435a5c6bdd7dc4c1d28c</id>
<content type='text'>
This reverts commit 7c5f2eecc21f44fba1b1f13ce09c2533db9d781a.

This patchset breaks on intel platforms and was previously NACK'd by
Ville.

Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Cc: Fernando Ramos &lt;greenfoo@u92.eu&gt;
Acked-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20211002154542.15800-13-sean@poorly.run
</content>
</entry>
<entry>
<title>drm: cleanup: drm_modeset_lock_all() --&gt; DRM_MODESET_LOCK_ALL_BEGIN()</title>
<updated>2021-10-01T16:59:53+00:00</updated>
<author>
<name>Fernando Ramos</name>
<email>greenfoo@u92.eu</email>
</author>
<published>2021-09-24T06:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c5f2eecc21f44fba1b1f13ce09c2533db9d781a'/>
<id>urn:sha1:7c5f2eecc21f44fba1b1f13ce09c2533db9d781a</id>
<content type='text'>
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos &lt;greenfoo@u92.eu&gt;
Reviewed-by: Sean Paul &lt;sean@poorly.run&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210924064324.229457-5-greenfoo@u92.eu
</content>
</entry>
<entry>
<title>drm: Fix typo in comments</title>
<updated>2021-08-02T08:19:43+00:00</updated>
<author>
<name>Cai Huoqing</name>
<email>caihuoqing@baidu.com</email>
</author>
<published>2021-07-30T13:27:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0ae865ef92f1920bd2ca3fc7b6b5a9555b4641cc'/>
<id>urn:sha1:0ae865ef92f1920bd2ca3fc7b6b5a9555b4641cc</id>
<content type='text'>
fix typo for drm

v1-&gt;v2:
respin with the change "iff ==&gt; implies that"

Signed-off-by: Cai Huoqing &lt;caihuoqing@baidu.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210730132729.376-1-caihuoqing@baidu.com
</content>
</entry>
</feed>
