<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/v3d, branch v5.9.16</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.9.16</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.9.16'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-11-10T11:39:04+00:00</updated>
<entry>
<title>drm/v3d: Fix double free in v3d_submit_cl_ioctl()</title>
<updated>2020-11-10T11:39:04+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-10-26T09:49:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9070c2bc4896e2a3a3b45181e72b412f780e13c0'/>
<id>urn:sha1:9070c2bc4896e2a3a3b45181e72b412f780e13c0</id>
<content type='text'>
[ Upstream commit 897dbea6b716c0f2c5bcd4ba1eb4d809caba290c ]

Originally this error path used to leak "bin" but then we accidentally
applied two separate commits to fix it and ended up with a double free.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201026094905.GA1634423@mwanda
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/v3d: remove _unlocked suffix in drm_gem_object_put_unlocked</title>
<updated>2020-05-19T21:31:35+00:00</updated>
<author>
<name>Emil Velikov</name>
<email>emil.velikov@collabora.com</email>
</author>
<published>2020-05-15T09:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b86189e4d59c98ce4e2eaf6d102317dd435774d'/>
<id>urn:sha1:2b86189e4d59c98ce4e2eaf6d102317dd435774d</id>
<content type='text'>
Spelling out _unlocked for each and every driver is a annoying.
Especially if we consider how many drivers, do not know (or need to)
about the horror stories involving struct_mutex.

Just drop the suffix. It makes the API cleaner.

Done via the following script:

__from=drm_gem_object_put_unlocked
__to=drm_gem_object_put
for __file in $(git grep --name-only $__from); do
  sed -i  "s/$__from/$__to/g" $__file;
done

Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-33-emil.l.velikov@gmail.com
</content>
</entry>
<entry>
<title>drm/v3d: Delete v3d_dev-&gt;pdev</title>
<updated>2020-04-28T13:15:59+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-04-15T07:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0df3ac7657c92756a26c164133380edbce672f7a'/>
<id>urn:sha1:0df3ac7657c92756a26c164133380edbce672f7a</id>
<content type='text'>
We already have it in v3d_dev-&gt;drm.dev with zero additional pointer
chasing. Personally I don't like duplicated pointers like this
because:
- reviewers need to check whether the pointer is for the same or
different objects if there's multiple
- compilers have an easier time too

To avoid having to pull in some big headers I implemented the casting
function as a macro instead of a static inline. Typechecking thanks to
container_of still assured.

But also a bit a bikeshed, so feel free to ignore.

v2: More parens for v3d_to_pdev macro (checkpatch)

Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-11-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/v3d: Delete v3d_dev-&gt;dev</title>
<updated>2020-04-28T13:15:52+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-04-15T07:39:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc662528e29ae751e0d43c18c9e4cd71a20ef0d4'/>
<id>urn:sha1:bc662528e29ae751e0d43c18c9e4cd71a20ef0d4</id>
<content type='text'>
We already have it in v3d_dev-&gt;drm.dev with zero additional pointer
chasing. Personally I don't like duplicated pointers like this
because:
- reviewers need to check whether the pointer is for the same or
  different objects if there's multiple
- compilers have an easier time too

But also a bit a bikeshed, so feel free to ignore.

Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-10-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/v3d: Use devm_drm_dev_alloc</title>
<updated>2020-04-28T13:15:46+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-04-15T07:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=235b7e7d7eee3797a354ef5e923d58a477d1cb82'/>
<id>urn:sha1:235b7e7d7eee3797a354ef5e923d58a477d1cb82</id>
<content type='text'>
Also allows us to simplify the unroll code since the drm_dev_put
disappears.

Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-9-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/v3d: Don't set drm_device-&gt;dev_private</title>
<updated>2020-04-28T13:15:41+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-04-15T07:39:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=af25c16bd1c6e7e73d67271c0fe6e0d5078759f1'/>
<id>urn:sha1:af25c16bd1c6e7e73d67271c0fe6e0d5078759f1</id>
<content type='text'>
And switch the helper over to container_of, which is a bunch faster
than chasing a pointer. Plus allows gcc to see through this maze.

Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-8-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm/v3d: Use drmm_add_final_kfree</title>
<updated>2020-03-26T14:18:11+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2020-03-23T14:49:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea3aa6203c6b5540c80527d6beae68063a0080c1'/>
<id>urn:sha1:ea3aa6203c6b5540c80527d6beae68063a0080c1</id>
<content type='text'>
With this we can drop the final kfree from the release function.

I also noticed that the unwind code is wrong, after drm_dev_init the
drm_device owns the v3d allocation, so the kfree(v3d) is a double-free.
Reorder the setup to fix this issue.

After a bit more prep in drivers and drm core v3d should be able to
switch over to devm_drm_dev_init, which should clean this up further.

Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-11-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: convert .debugfs_init() hook to return void.</title>
<updated>2020-03-18T16:53:28+00:00</updated>
<author>
<name>Wambui Karuga</name>
<email>wambui.karugax@gmail.com</email>
</author>
<published>2020-03-10T13:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ce84471e3c72e23020b046714358b45a7ffe9ab'/>
<id>urn:sha1:7ce84471e3c72e23020b046714358b45a7ffe9ab</id>
<content type='text'>
As a result of commit 987d65d01356 (drm: debugfs: make
drm_debugfs_create_files() never fail) and changes to various debugfs
functions in drm/core and across various drivers, there is no need for
the drm_driver.debugfs_init() hook to have a return value. Therefore,
declare it as void.

This also includes refactoring all users of the .debugfs_init() hook to
return void across the subsystem.

v2: include changes to the hook and drivers that use it in one patch to
prevent driver breakage and enable individual successful compilation of
this change.

References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga &lt;wambui.karugax@gmail.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-18-wambui.karugax@gmail.com
</content>
</entry>
<entry>
<title>drm/v3d: make v3d_debugfs_init() return 0</title>
<updated>2020-03-18T15:22:12+00:00</updated>
<author>
<name>Wambui Karuga</name>
<email>wambui.karugax@gmail.com</email>
</author>
<published>2020-03-10T13:31:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19660e8903e6813846ae176e2df570689da3843b'/>
<id>urn:sha1:19660e8903e6813846ae176e2df570689da3843b</id>
<content type='text'>
Since commit 987d65d01356 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files() never
fails and should return void. Therefore, remove its use as the
return value of v3d_debugfs_init() and have the function return 0
directly instead.

v2: remove conversion of v3d_debugfs_init() to void to avoid build
breakage and enable individual compilation.

References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga &lt;wambui.karugax@gmail.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-4-wambui.karugax@gmail.com
</content>
</entry>
<entry>
<title>drm/v3d: Replace wait_for macros to remove use of msleep</title>
<updated>2020-03-05T06:15:34+00:00</updated>
<author>
<name>James Hughes</name>
<email>james.hughes@raspberrypi.com</email>
</author>
<published>2020-02-17T15:31:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9daee6141cc9c75b09659b02b1cb9eeb2f5e16cc'/>
<id>urn:sha1:9daee6141cc9c75b09659b02b1cb9eeb2f5e16cc</id>
<content type='text'>
The wait_for macro's for Broadcom V3D driver used msleep, which is
inappropriate due to its inaccuracy at low values (minimum wait time
is about 30ms on the Raspberry Pi).  This sleep was triggering in
v3d_clean_caches(), causing us to only be able to dispatch ~33 compute
jobs per second.

This patch replaces the macro with the one from the Intel i915 version
which uses usleep_range to provide more accurate waits.

v2: Split from the vc4 patch so that we can confidently apply to
    stable (by anholt)

Signed-off-by: James Hughes &lt;james.hughes@raspberrypi.com&gt;
Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200217153145.13780-1-james.hughes@raspberrypi.com
Link: https://github.com/raspberrypi/linux/issues/3460
Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
</content>
</entry>
</feed>
