<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/gpu/drm/exynos/exynos_drm_g2d.c, branch linux-4.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-02-20T00:16:18Z</updated>
<entry>
<title>drm/exynos: g2d: Delete an error message for a failed memory allocation in two functions</title>
<updated>2018-02-20T00:16:18Z</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2018-02-08T17:42:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6f0a60298bbbea43ab5e3955913ab19c153076f3'/>
<id>urn:sha1:6f0a60298bbbea43ab5e3955913ab19c153076f3</id>
<content type='text'>
Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>drm/exynos: g2d: use monotonic timestamps</title>
<updated>2018-02-20T00:16:18Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-01-17T17:01:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a588a8bb7b25a3fb4f7fed00feb7aec541fc2632'/>
<id>urn:sha1:a588a8bb7b25a3fb4f7fed00feb7aec541fc2632</id>
<content type='text'>
The exynos DRM driver uses real-time 'struct timeval' values
for exporting its timestamps to user space. This has multiple
problems:

1. signed seconds overflow in y2038
2. the 'struct timeval' definition is deprecated in the kernel
3. time may jump or go backwards after a 'settimeofday()' syscall
4. other DRM timestamps are in CLOCK_MONOTONIC domain, so they
   can't be compared
5. exporting microseconds requires a division by 1000, which may
   be slow on some architectures.

The code existed in two places before, but the IPP portion was
removed in 8ded59413ccc ("drm/exynos: ipp: Remove Exynos DRM
IPP subsystem"), so we no longer need to worry about it.

Ideally timestamps should just use 64-bit nanoseconds instead, but
of course we can't change that now. Instead, this tries to address
the first four points above by using monotonic 'timespec' values.

According to Tobias Jakobi, user space doesn't care about the
timestamp at the moment, so we can change the format. Even if
there is something looking at them, it will work just fine with
monotonic times as long as the application only looks at the
relative values between two events.

Link: https://patchwork.kernel.org/patch/10038593/
Cc: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>drm/exynos: g2d: change platform driver name to 'exynos-drm-g2d'</title>
<updated>2017-02-07T04:52:49Z</updated>
<author>
<name>Tobias Jakobi</name>
<email>tjakobi@math.uni-bielefeld.de</email>
</author>
<published>2017-01-20T16:02:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d796ddc9ea0c88f7a1cc1e8df10553f8bbc6ba6b'/>
<id>urn:sha1:d796ddc9ea0c88f7a1cc1e8df10553f8bbc6ba6b</id>
<content type='text'>
The current name is 's5p-g2d', which is identical with the driver
name of the old V4L2 driver in media/platform.
This is probably due to the DRM driver being based on the V4L2
driver when it was initially created. Still the clashing of driver
names is confusing, so rename it to something in line with the
other DRM subdrivers.

Signed-off-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>drm/exynos: g2d: prevent integer overflow in</title>
<updated>2017-01-30T23:50:35Z</updated>
<author>
<name>Joonyoung Shim</name>
<email>jy0922.shim@samsung.com</email>
</author>
<published>2017-01-23T09:13:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e41456bfc811f12b5dcda6f2d6849bdff68f6c0a'/>
<id>urn:sha1:e41456bfc811f12b5dcda6f2d6849bdff68f6c0a</id>
<content type='text'>
The size computations done in the ioctl function use an integer.
If userspace submits a request with req-&gt;cmd_nr or req-&gt;cmd_buf_nr
set to INT_MAX, the integer computations overflow later, leading
to potential (kernel) memory corruption.

Prevent this issue by enforcing a limit on the number of submitted
commands, so that we have enough headroom later for the size
computations.

Note that this change has no impact on the currently available
users in userspace, like e.g. libdrm/exynos.

While at it, also make a comment about the size computation more
detailed.

Signed-off-by: Joonyoung Shim &lt;jy0922.shim@samsung.com&gt;
Signed-off-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>mm: replace get_vaddr_frames() write/force parameters with gup_flags</title>
<updated>2016-10-19T15:11:24Z</updated>
<author>
<name>Lorenzo Stoakes</name>
<email>lstoakes@gmail.com</email>
</author>
<published>2016-10-13T00:20:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7f23b3504a0df63b724180262c5f3f117f21bcae'/>
<id>urn:sha1:7f23b3504a0df63b724180262c5f3f117f21bcae</id>
<content type='text'>
This removes the 'write' and 'force' from get_vaddr_frames() and
replaces them with 'gup_flags' to make the use of FOLL_FORCE explicit in
callers as use of this flag can result in surprising behaviour (and
hence bugs) within the mm subsystem.

Signed-off-by: Lorenzo Stoakes &lt;lstoakes@gmail.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drm/exynos: g2d: simplify g2d_free_runqueue_node()</title>
<updated>2016-09-30T15:39:42Z</updated>
<author>
<name>Tobias Jakobi</name>
<email>tjakobi@math.uni-bielefeld.de</email>
</author>
<published>2016-09-27T15:59:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c0462796464219fed0fbc1e8b2b93eb6751769f5'/>
<id>urn:sha1:c0462796464219fed0fbc1e8b2b93eb6751769f5</id>
<content type='text'>
The function is never called with zero 'runqueue_node'.

Signed-off-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>drm/exynos: g2d: use autosuspend mode for PM runtime</title>
<updated>2016-09-30T15:39:41Z</updated>
<author>
<name>Tobias Jakobi</name>
<email>tjakobi@math.uni-bielefeld.de</email>
</author>
<published>2016-09-27T15:59:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7c3fc2b5ccd6694b48c2226704e25fad7acc6976'/>
<id>urn:sha1:7c3fc2b5ccd6694b48c2226704e25fad7acc6976</id>
<content type='text'>
The runqueue worker currently issues a get() when a new
node is processed, and a put() once a node is completed.

The corresponding suspend and resume calls currently only
do clock gating, but with the upcoming introduction of
IOMMU runpm also the corresponding IOMMU domain gets
enabled (for get()) and disabled (for put()). This
introduces performance regressions with we mitigate here.

Switch PM runtime to autosuspend, such that clock gating
and IOMMU control only happens when the engine is idle for
a 'long' time.

Signed-off-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>drm/exynos: g2d: wait for engine to finish</title>
<updated>2016-09-30T15:39:40Z</updated>
<author>
<name>Tobias Jakobi</name>
<email>tjakobi@math.uni-bielefeld.de</email>
</author>
<published>2016-09-27T15:50:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=134a0fe98471b2e15a2b1bc22f4bddbb98bd6e18'/>
<id>urn:sha1:134a0fe98471b2e15a2b1bc22f4bddbb98bd6e18</id>
<content type='text'>
While the engine works on a runqueue node it does memory access to
the buffers associated with that node.
Make sure that the engine is idle when g2d_close() and/or
g2d_remove() are called, i.e. buffer associated with the process (for
g2d_close()), or all buffers (for g2d_remove()) can be safely be
unmapped.

We have to take into account that the engine might be in an undefined
state, i.e. it hangs and doesn't become idle. In this case, we issue
a hardware reset to return the hardware and the driver context into a
proper state.

Signed-off-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>drm/exynos: g2d: remove runqueue nodes in g2d_{close,remove}()</title>
<updated>2016-09-30T15:39:39Z</updated>
<author>
<name>Tobias Jakobi</name>
<email>tjakobi@math.uni-bielefeld.de</email>
</author>
<published>2016-09-27T15:50:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5332737432ad5989830dae75df0d3e9cce56e893'/>
<id>urn:sha1:5332737432ad5989830dae75df0d3e9cce56e893</id>
<content type='text'>
The driver might be closed (and/or removed) while there are still
nodes queued for processing.
Make sure to remove these nodes, which means all of them in
the case of g2d_remove() and only those belonging to the
corresponding process in g2d_close().

Signed-off-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>drm/exynos: g2d: move PM management to runqueue worker</title>
<updated>2016-09-30T15:39:39Z</updated>
<author>
<name>Tobias Jakobi</name>
<email>tjakobi@math.uni-bielefeld.de</email>
</author>
<published>2016-09-27T15:50:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=22d6704dd4bf2c80b3850b8f7ff05a67f626fa53'/>
<id>urn:sha1:22d6704dd4bf2c80b3850b8f7ff05a67f626fa53</id>
<content type='text'>
Do all pm_runtime_{get,put}() calls in the runqueue worker.
Also keep track of the engine's idle/busy state.

Signed-off-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Acked-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
</feed>
