<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/gpu/drm/vc4/vc4_v3d.c, branch master</title>
<subtitle>Linux kernel source tree.</subtitle>
<id>https://git.ilvokhin.com/linux.git/atom/drivers/gpu/drm/vc4/vc4_v3d.c?h=master</id>
<link rel='self' href='https://git.ilvokhin.com/linux.git/atom/drivers/gpu/drm/vc4/vc4_v3d.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/'/>
<updated>2026-07-22T14:29:29Z</updated>
<entry>
<title>drm/vc4: hvs/v3d: Fix null dereference in unbind</title>
<updated>2026-07-22T14:29:29Z</updated>
<author>
<name>Gregor Herburger</name>
<email>gregor.herburger@linutronix.de</email>
</author>
<published>2026-07-21T15:38:19Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=7dc3680b7ffe01add3e9299fde8471d2dd53a8ae'/>
<id>urn:sha1:7dc3680b7ffe01add3e9299fde8471d2dd53a8ae</id>
<content type='text'>
The hvs and v3d drivers use dev_get_drvdata(master) in their unbind
functions. Since the vc4-drm gets removed before its dependent drivers
(vc4_hvs/vc4_v3d) the vc4_hvs_unbind/vc4_v3d_unbind functions try to
get drvdata of its master and fails with a null dereference error.

Use the data pointer passed to the unbind functions directly instead of
dev_get_drvdata(master). This avoids using potentially freed memory.

Fixes: d3f5168a0810 ("drm/vc4: Bind and initialize the V3D engine.")
Fixes: c8b75bca92cb ("drm/vc4: Add KMS support for Raspberry Pi.")
Signed-off-by: Gregor Herburger &lt;gregor.herburger@linutronix.de&gt;
Link: https://patch.msgid.link/20260721-rpi-vc4-fix-v2-1-b813dcd01dc7@linutronix.de
Reviewed-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
</content>
</entry>
<entry>
<title>drm/vc4: Release runtime PM reference after binding V3D</title>
<updated>2026-04-02T10:53:16Z</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2026-03-30T17:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=aaefbdde9abdc43699e110679c0e10972a5e1c59'/>
<id>urn:sha1:aaefbdde9abdc43699e110679c0e10972a5e1c59</id>
<content type='text'>
The vc4_v3d_bind() function acquires a runtime PM reference via
pm_runtime_resume_and_get() to access V3D registers during setup.
However, this reference is never released after a successful bind.
This prevents the device from ever runtime suspending, since the
reference count never reaches zero.

Release the runtime PM reference by adding pm_runtime_put_autosuspend()
after autosuspend is configured, allowing the device to runtime suspend
after the delay.

Fixes: 266cff37d7fc ("drm/vc4: v3d: Rework the runtime_pm setup")
Reviewed-by: Melissa Wen &lt;mwen@igalia.com&gt;
Link: https://patch.msgid.link/20260330-vc4-misc-fixes-v1-1-92defc940a29@igalia.com
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
</content>
</entry>
<entry>
<title>drm: include drm_print.h where needed</title>
<updated>2025-10-31T08:34:52Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2025-10-29T10:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=f6e8dc9edf963dbc99085e54f6ced6da9daa6100'/>
<id>urn:sha1:f6e8dc9edf963dbc99085e54f6ced6da9daa6100</id>
<content type='text'>
There are a gazillion files that depend on drm_print.h being indirectly
included via drm_buddy.h, drm_mm.h, or ttm/ttm_resource.h. In
preparation for removing those includes, explicitly include drm_print.h
where needed.

Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://lore.kernel.org/r/5fe67395907be33eb5199ea6d540e29fddee71c8.1761734313.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>Get rid of 'remove_new' relic from platform driver struct</title>
<updated>2024-12-01T23:12:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-12-01T23:12:43Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=e70140ba0d2b1a30467d4af6bcfe761327b9ec95'/>
<id>urn:sha1:e70140ba0d2b1a30467d4af6bcfe761327b9ec95</id>
<content type='text'>
The continual trickle of small conversion patches is grating on me, and
is really not helping.  Just get rid of the 'remove_new' member
function, which is just an alias for the plain 'remove', and had a
comment to that effect:

  /*
   * .remove_new() is a relic from a prototype conversion of .remove().
   * New drivers are supposed to implement .remove(). Once all drivers are
   * converted to not use .remove_new any more, it will be dropped.
   */

This was just a tree-wide 'sed' script that replaced '.remove_new' with
'.remove', with some care taken to turn a subsequent tab into two tabs
to make things line up.

I did do some minimal manual whitespace adjustment for places that used
spaces to line things up.

Then I just removed the old (sic) .remove_new member function, and this
is the end result.  No more unnecessary conversion noise.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: Make v3d paths unavailable on any generation newer than vc4</title>
<updated>2024-09-09T12:02:53Z</updated>
<author>
<name>Maxime Ripard</name>
<email>mripard@kernel.org</email>
</author>
<published>2024-06-21T15:20:45Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=dbe8ef676f2764f132d2467882e01e313eef495a'/>
<id>urn:sha1:dbe8ef676f2764f132d2467882e01e313eef495a</id>
<content type='text'>
The V3D IP has been separate since BCM2711, so let's make sure we issue
a WARN if we're running not only on BCM2711, but also anything newer.

Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Reviewed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-22-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
</content>
</entry>
<entry>
<title>drm/vc4: Introduce generation number enum</title>
<updated>2024-09-09T12:02:53Z</updated>
<author>
<name>Maxime Ripard</name>
<email>mripard@kernel.org</email>
</author>
<published>2024-06-21T15:20:44Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=24c5ed3ddf27313b248900455b0312bd7a9d3554'/>
<id>urn:sha1:24c5ed3ddf27313b248900455b0312bd7a9d3554</id>
<content type='text'>
With the introduction of the BCM2712 support, we will get yet another
generation of display engine to support.

The binary check of whether it's VC5 or not thus doesn't work anymore,
especially since some parts of the driver will have changed with BCM2711,
and some others with BCM2712.

Let's introduce an enum to store the generation the driver is running
on, which should provide more flexibility.

Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Reviewed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-21-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
</content>
</entry>
<entry>
<title>drm/vc4: v3d: simplify clock retrieval</title>
<updated>2024-08-22T10:57:44Z</updated>
<author>
<name>Stefan Wahren</name>
<email>wahrenst@gmx.net</email>
</author>
<published>2024-08-21T21:40:48Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=f60ef67ff21ede6f3d27d439a136481446dbd8aa'/>
<id>urn:sha1:f60ef67ff21ede6f3d27d439a136481446dbd8aa</id>
<content type='text'>
Common pattern of handling deferred probe can be simplified with
dev_err_probe() and devm_clk_get_optional(). This results in much
less code.

Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240821214052.6800-6-wahrenst@gmx.net
</content>
</entry>
<entry>
<title>drm/vc4: Get the rid of DRM_ERROR()</title>
<updated>2024-08-22T10:57:44Z</updated>
<author>
<name>Stefan Wahren</name>
<email>wahrenst@gmx.net</email>
</author>
<published>2024-08-21T21:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=59ac702a932028f572e34cd27fce235def2fc488'/>
<id>urn:sha1:59ac702a932028f572e34cd27fce235def2fc488</id>
<content type='text'>
DRM_ERROR() has been deprecated in favor of pr_err(). However, we
should prefer to use drm_err() whenever possible so we get device-
specific output with the error message. In error case of kcalloc,
we can simply drop DRM_ERROR(), because kcalloc already logs errors.

Suggested-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Reviewed-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240821214052.6800-4-wahrenst@gmx.net
</content>
</entry>
<entry>
<title>drm/vc4: Convert to platform remove callback returning void</title>
<updated>2023-06-08T16:04:13Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-05-07T16:26:15Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=1ed54a19f3b3c78b27621b9f80badd8087339c47'/>
<id>urn:sha1:1ed54a19f3b3c78b27621b9f80badd8087339c47</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert the vc4 drm drivers from always returning zero in the
remove callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230507162616.1368908-53-u.kleine-koenig@pengutronix.de
</content>
</entry>
<entry>
<title>drm/vc4: use new debugfs device-centered functions</title>
<updated>2022-12-22T17:59:16Z</updated>
<author>
<name>Maíra Canal</name>
<email>mcanal@igalia.com</email>
</author>
<published>2022-12-19T12:06:18Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=f2ede40e46e8cc64fcdac36c6942b42b21ef74ec'/>
<id>urn:sha1:f2ede40e46e8cc64fcdac36c6942b42b21ef74ec</id>
<content type='text'>
Currently, vc4 has its own debugfs infrastructure that adds the debugfs
files on drm_dev_register(). With the introduction of the new debugfs,
functions, replace the vc4 debugfs structure with the DRM debugfs
device-centered function, drm_debugfs_add_file().

Moreover, remove the explicit error handling of debugfs related functions,
considering that the only failure mode is -ENOMEM and also that error
handling is not recommended for debugfs functions, as pointed out in [1].

[1] https://lore.kernel.org/all/YWAmZdRwnAt6wh9B@kroah.com/

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-5-mcanal@igalia.com
</content>
</entry>
</feed>
