<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/exynos, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-04-03T13:11:26Z</updated>
<entry>
<title>drm/exynos: do not return negative values from .get_modes()</title>
<updated>2024-04-03T13:11:26Z</updated>
<author>
<name>Jani Nikula</name>
</author>
<published>2024-03-08T16:03:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d930ab0399c350f9da9c64030daca368c78e2f51'/>
<id>urn:sha1:d930ab0399c350f9da9c64030daca368c78e2f51</id>
<content type='text'>
[ Upstream commit 13d5b040363c7ec0ac29c2de9cf661a24a8aa531 ]

The .get_modes() hooks aren't supposed to return negative error
codes. Return 0 for no modes, whatever the reason.

Cc: Inki Dae &lt;inki.dae@samsung.com&gt;
Cc: Seung-Woo Kim &lt;sw0312.kim@samsung.com&gt;
Cc: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/d8665f620d9c252aa7d5a4811ff6b16e773903a2.1709913674.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/exynos: Call drm_atomic_helper_shutdown() at shutdown/unbind time</title>
<updated>2024-02-05T20:16:59Z</updated>
<author>
<name>Douglas Anderson</name>
</author>
<published>2023-09-21T19:26:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c53dd64daa697e58b885e2810c111b5a76809893'/>
<id>urn:sha1:c53dd64daa697e58b885e2810c111b5a76809893</id>
<content type='text'>
[ Upstream commit 16ac5b21b31b439f03cdf44c153c5f5af94fb3eb ]

Based on grepping through the source code this driver appears to be
missing a call to drm_atomic_helper_shutdown() at system shutdown time
and at driver unbind time. Among other things, this means that if a
panel is in use that it won't be cleanly powered off at system
shutdown time.

The fact that we should call drm_atomic_helper_shutdown() in the case
of OS shutdown/restart and at driver remove (or unbind) time comes
straight out of the kernel doc "driver instance overview" in
drm_drv.c.

A few notes about this fix:
- When adding drm_atomic_helper_shutdown() to the unbind path, I added
  it after drm_kms_helper_poll_fini() since that's when other drivers
  seemed to have it.
- Technically with a previous patch, ("drm/atomic-helper:
  drm_atomic_helper_shutdown(NULL) should be a noop"), we don't
  actually need to check to see if our "drm" pointer is NULL before
  calling drm_atomic_helper_shutdown(). We'll leave the "if" test in,
  though, so that this patch can land without any dependencies. It
  could potentially be removed later.
- This patch also makes sure to set the drvdata to NULL in the case of
  bind errors to make sure that shutdown can't access freed data.

Suggested-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Reviewed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/exynos: gsc: minor fix for loop iteration in gsc_runtime_resume</title>
<updated>2024-02-01T00:21:19Z</updated>
<author>
<name>Fedor Pchelkin</name>
</author>
<published>2023-12-20T09:53:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81499dc7be07888d976c38a184a85437772829d2'/>
<id>urn:sha1:81499dc7be07888d976c38a184a85437772829d2</id>
<content type='text'>
[ Upstream commit 4050957c7c2c14aa795dbf423b4180d5ac04e113 ]

Do not forget to call clk_disable_unprepare() on the first element of
ctx-&gt;clocks array.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 8b7d3ec83aba ("drm/exynos: gsc: Convert driver to IPP v2 core API")
Signed-off-by: Fedor Pchelkin &lt;pchelkin@ispras.ru&gt;
Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/exynos: fix accidental on-stack copy of exynos_drm_plane</title>
<updated>2024-02-01T00:21:18Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2023-12-14T12:32:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd25db729ae8431c04ad5bc14f1b3186aa168981'/>
<id>urn:sha1:dd25db729ae8431c04ad5bc14f1b3186aa168981</id>
<content type='text'>
[ Upstream commit 960b537e91725bcb17dd1b19e48950e62d134078 ]

gcc rightfully complains about excessive stack usage in the fimd_win_set_pixfmt()
function:

drivers/gpu/drm/exynos/exynos_drm_fimd.c: In function 'fimd_win_set_pixfmt':
drivers/gpu/drm/exynos/exynos_drm_fimd.c:750:1: error: the frame size of 1032 bytes is larger than 1024 byte
drivers/gpu/drm/exynos/exynos5433_drm_decon.c: In function 'decon_win_set_pixfmt':
drivers/gpu/drm/exynos/exynos5433_drm_decon.c:381:1: error: the frame size of 1032 bytes is larger than 1024 bytes

There is really no reason to copy the large exynos_drm_plane
structure to the stack before using one of its members, so just
use a pointer instead.

Fixes: 6f8ee5c21722 ("drm/exynos: fimd: Make plane alpha configurable")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/exynos: fix a wrong error checking</title>
<updated>2023-12-07T02:51:43Z</updated>
<author>
<name>Inki Dae</name>
</author>
<published>2023-11-01T09:36:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d1b7809684c688005706125b804e1f9792d2b1b'/>
<id>urn:sha1:8d1b7809684c688005706125b804e1f9792d2b1b</id>
<content type='text'>
Fix a wrong error checking in exynos_drm_dma.c module.

In the exynos_drm_register_dma function, both arm_iommu_create_mapping()
and iommu_get_domain_for_dev() functions are expected to return NULL as
an error.

However, the error checking is performed using the statement
if(IS_ERR(mapping)), which doesn't provide a suitable error value.
So check if 'mapping' is NULL, and if it is, return -ENODEV.

This issue[1] was reported by Dan.

Changelog v1:
- fix build warning.

[1] https://lore.kernel.org/all/33e52277-1349-472b-a55b-ab5c3462bfcf@moroto.mountain/

Reported-by : Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>drm/exynos: fix a potential error pointer dereference</title>
<updated>2023-12-07T02:51:42Z</updated>
<author>
<name>Xiang Yang</name>
</author>
<published>2023-08-12T06:27:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73bf1c9ae6c054c53b8e84452c5e46f86dd28246'/>
<id>urn:sha1:73bf1c9ae6c054c53b8e84452c5e46f86dd28246</id>
<content type='text'>
Smatch reports the warning below:
drivers/gpu/drm/exynos/exynos_hdmi.c:1864 hdmi_bind()
error: 'crtc' dereferencing possible ERR_PTR()

The return value of exynos_drm_crtc_get_by_type maybe ERR_PTR(-ENODEV),
which can not be used directly. Fix this by checking the return value
before using it.

Signed-off-by: Xiang Yang &lt;xiangyang3@huawei.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>Merge drm/drm-next into drm-misc-next</title>
<updated>2023-10-11T07:50:59Z</updated>
<author>
<name>Thomas Zimmermann</name>
</author>
<published>2023-10-11T07:50:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57390019b68b83f96eb98f490367b9df1f2d77cb'/>
<id>urn:sha1:57390019b68b83f96eb98f490367b9df1f2d77cb</id>
<content type='text'>
Updating drm-misc-next to the state of Linux v6.6-rc2.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
</content>
</entry>
<entry>
<title>drm: exynos: dsi: Convert to platform remove callback returning void</title>
<updated>2023-10-06T06:58:44Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-09-19T10:39:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1698c73f4aaef2fd406da1c0a92e1c8f7b7780c'/>
<id>urn:sha1:c1698c73f4aaef2fd406da1c0a92e1c8f7b7780c</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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

samsung_dsim_remove() returned 0 unconditionally. Make it return void
instead to convert the two related platform drivers to use
.remove_new().

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Inki Dae &lt;inki.dae@samsung.com&gt;
Acked-by: Inki Dae &lt;inki.dae@samsung.com&gt;
Link: https://lore.kernel.org/r/20230919103939.1367659-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230919103939.1367659-1-u.kleine-koenig@pengutronix.de
</content>
</entry>
<entry>
<title>drm/exynos: remove redundant of_match_ptr</title>
<updated>2023-08-08T00:35:19Z</updated>
<author>
<name>Zhu Wang</name>
</author>
<published>2023-07-31T12:33:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b83c85b64078ff49b4d3d0b2cd2c2bf6f1b6a85'/>
<id>urn:sha1:6b83c85b64078ff49b4d3d0b2cd2c2bf6f1b6a85</id>
<content type='text'>
The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr here.

Even for drivers that do not depend on CONFIG_OF, it's almost always
better to leave out the of_match_ptr(), since the only thing it can
possibly do is to save a few bytes of .text if a driver can be used both
with and without it. Hence we remove of_match_ptr.

Signed-off-by: Zhu Wang &lt;wangzhu9@huawei.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
<entry>
<title>drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()</title>
<updated>2023-08-08T00:35:11Z</updated>
<author>
<name>Tuo Li</name>
</author>
<published>2023-06-30T02:19:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e63972a2de14482d0eae1a03a73e379f1c3f44c'/>
<id>urn:sha1:2e63972a2de14482d0eae1a03a73e379f1c3f44c</id>
<content type='text'>
The variable crtc-&gt;state-&gt;event is often protected by the lock
crtc-&gt;dev-&gt;event_lock when is accessed. However, it is accessed as a
condition of an if statement in exynos_drm_crtc_atomic_disable() without
holding the lock:

  if (crtc-&gt;state-&gt;event &amp;&amp; !crtc-&gt;state-&gt;active)

However, if crtc-&gt;state-&gt;event is changed to NULL by another thread right
after the conditions of the if statement is checked to be true, a
null-pointer dereference can occur in drm_crtc_send_vblank_event():

  e-&gt;pipe = pipe;

To fix this possible null-pointer dereference caused by data race, the
spin lock coverage is extended to protect the if statement as well as the
function call to drm_crtc_send_vblank_event().

Reported-by: BassCheck &lt;bass@buaa.edu.cn&gt;
Link: https://sites.google.com/view/basscheck/home
Signed-off-by: Tuo Li &lt;islituo@gmail.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Added relevant link.
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
</content>
</entry>
</feed>
