<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nvgpu.git/drivers/gpu/nvgpu/common/sync, branch gpu-paging</title>
<subtitle>Tegra GPU Driver. Originally from nv-tegra.nvidia.com/linux-nvgpu.git.</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvgpu.git/'/>
<entry>
<title>gpu: nvgpu: fix possible buffer overflow issue</title>
<updated>2021-03-12T15:54:52+00:00</updated>
<author>
<name>Nitin Kumbhar</name>
<email>nkumbhar@nvidia.com</email>
</author>
<published>2019-09-25T08:57:57+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvgpu.git/commit/?id=7882f15ff63199a517852760f5686ecd0b886123'/>
<id>7882f15ff63199a517852760f5686ecd0b886123</id>
<content type='text'>
As sprintf() is used to populate pool_name[20], it can overflow
for larger u32 values (u32 max decimal number chars are 10) i.e.
20 &lt; strlen("semaphore_pool-") i.e. 15 + 10.

Fix this overflow by removing pool_name as it's not used.

Bug 2626446
Bug 3273414

Change-Id: I4e0a222a2cd34dcd09e69294bc46e2242abb04bb
Signed-off-by: Nitin Kumbhar &lt;nkumbhar@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/2205356
(cherry picked from commit baa86cf134ee6753beabfa974a10faffc5775ee8)
Signed-off-by: ByungKuk Seo &lt;bseo@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2496976
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Harsh Sinha &lt;hsinha@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As sprintf() is used to populate pool_name[20], it can overflow
for larger u32 values (u32 max decimal number chars are 10) i.e.
20 &lt; strlen("semaphore_pool-") i.e. 15 + 10.

Fix this overflow by removing pool_name as it's not used.

Bug 2626446
Bug 3273414

Change-Id: I4e0a222a2cd34dcd09e69294bc46e2242abb04bb
Signed-off-by: Nitin Kumbhar &lt;nkumbhar@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/2205356
(cherry picked from commit baa86cf134ee6753beabfa974a10faffc5775ee8)
Signed-off-by: ByungKuk Seo &lt;bseo@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2496976
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: svc-mobile-coverity &lt;svc-mobile-coverity@nvidia.com&gt;
Reviewed-by: Harsh Sinha &lt;hsinha@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</pre>
</div>
</content>
</entry>
<entry>
<title>gpu: nvgpu: delete priv cmd buf size warnings</title>
<updated>2020-09-23T02:08:37+00:00</updated>
<author>
<name>Konsta Hölttä</name>
<email>kholtta@nvidia.com</email>
</author>
<published>2020-07-29T05:48:03+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvgpu.git/commit/?id=cd134bb198d7138a3c2fcb17d11f2eedf934e2c4'/>
<id>cd134bb198d7138a3c2fcb17d11f2eedf934e2c4</id>
<content type='text'>
Running out of priv cmd buffer allocation capacity is typically a
recoverable "error" caused by extra pressure wrt. allocation sizes based
on number of inflight jobs chosen by userspace. These conditions return
-EAGAIN and further retries will succeed as long as the channel advances
with submitted jobs. Remove the unnecessary debug spew.

Bug 200641803
Bug 200651329

Change-Id: I4dfc38cfc3eb10d57ac11c1b7164c3d84f9034d3
Signed-off-by: Konsta Hölttä &lt;kholtta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2388799
(cherry picked from commit 29ad324f8226ed3326f5de9117b9115a15cdd032)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2410069
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: automaticguardword &lt;automaticguardword@nvidia.com&gt;
Reviewed-by: Deepak Nibade &lt;dnibade@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Running out of priv cmd buffer allocation capacity is typically a
recoverable "error" caused by extra pressure wrt. allocation sizes based
on number of inflight jobs chosen by userspace. These conditions return
-EAGAIN and further retries will succeed as long as the channel advances
with submitted jobs. Remove the unnecessary debug spew.

Bug 200641803
Bug 200651329

Change-Id: I4dfc38cfc3eb10d57ac11c1b7164c3d84f9034d3
Signed-off-by: Konsta Hölttä &lt;kholtta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2388799
(cherry picked from commit 29ad324f8226ed3326f5de9117b9115a15cdd032)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2410069
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Reviewed-by: automaticguardword &lt;automaticguardword@nvidia.com&gt;
Reviewed-by: Deepak Nibade &lt;dnibade@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
</pre>
</div>
</content>
</entry>
<entry>
<title>gpu: nvgpu: Standardize HAS_SYNCPOINTs check</title>
<updated>2018-09-27T22:04:38+00:00</updated>
<author>
<name>Alex Waterman</name>
<email>alexw@nvidia.com</email>
</author>
<published>2018-08-21T17:35:06+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvgpu.git/commit/?id=8789cafcfb0d1e16ad0b2c61b047d275f2d684b4'/>
<id>8789cafcfb0d1e16ad0b2c61b047d275f2d684b4</id>
<content type='text'>
Nvgpu uses many ways to check if sync points are enabled. The four
ways used to be:

  platform-&gt;has_syncpoints
  g-&gt;has_syncpoints
  nvgpu_is_enabled(g, NVPGU_HAS_SYNCPOINTS)
  gk20a_platform_has_syncpoints()

This patch standardizes all usage to now be nvgpu_has_syncpoints()
which is based on gk20a_platform_has_syncpoints() - just renamed to
be general to nvgpu.

All usage of the other forms have now been consolidated. However,
under the hood nvgpu_has_syncpoints() does check the is_enabled
flag. This flag is now set where g-&gt;has_syncpoints used to be set
based on the platform data.

The basic dependency chain is this:

  nvgpu_has_syncpoints -&gt; NVGPU_HAS_SYNCPOINTS -&gt;
    platform-&gt;has_syncpoints

However, note: there are several places where syncpoints can be
disabled if some other driver initialization fails (for ex. host1x).
Also note that nvgpu_has_syncpoints() also considers a disable
variable set by debugfs.

Bug 2327574

Change-Id: Ia2375a80f5f2e27285e6175568dd13e6bb25fd33
Signed-off-by: Alex Waterman &lt;alexw@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1803975
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nvgpu uses many ways to check if sync points are enabled. The four
ways used to be:

  platform-&gt;has_syncpoints
  g-&gt;has_syncpoints
  nvgpu_is_enabled(g, NVPGU_HAS_SYNCPOINTS)
  gk20a_platform_has_syncpoints()

This patch standardizes all usage to now be nvgpu_has_syncpoints()
which is based on gk20a_platform_has_syncpoints() - just renamed to
be general to nvgpu.

All usage of the other forms have now been consolidated. However,
under the hood nvgpu_has_syncpoints() does check the is_enabled
flag. This flag is now set where g-&gt;has_syncpoints used to be set
based on the platform data.

The basic dependency chain is this:

  nvgpu_has_syncpoints -&gt; NVGPU_HAS_SYNCPOINTS -&gt;
    platform-&gt;has_syncpoints

However, note: there are several places where syncpoints can be
disabled if some other driver initialization fails (for ex. host1x).
Also note that nvgpu_has_syncpoints() also considers a disable
variable set by debugfs.

Bug 2327574

Change-Id: Ia2375a80f5f2e27285e6175568dd13e6bb25fd33
Signed-off-by: Alex Waterman &lt;alexw@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1803975
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpu: nvgpu: move header location of gk20a.h</title>
<updated>2018-09-25T07:20:25+00:00</updated>
<author>
<name>Debarshi Dutta</name>
<email>ddutta@nvidia.com</email>
</author>
<published>2018-09-19T06:16:27+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvgpu.git/commit/?id=421e64aad73c419495253c62b131677cf25c4924'/>
<id>421e64aad73c419495253c62b131677cf25c4924</id>
<content type='text'>
Update header path of gk20a.h in files present in common/
to &lt;nvgpu/gk20a.h&gt;

Jira NVGPU-597

Change-Id: I3431dae93ada9bd561454c89a0b99c5292ab4a8d
Signed-off-by: Debarshi Dutta &lt;ddutta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1832024
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update header path of gk20a.h in files present in common/
to &lt;nvgpu/gk20a.h&gt;

Jira NVGPU-597

Change-Id: I3431dae93ada9bd561454c89a0b99c5292ab4a8d
Signed-off-by: Debarshi Dutta &lt;ddutta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1832024
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpu: nvgpu: minor fixes in channel_sync.c</title>
<updated>2018-09-20T10:27:55+00:00</updated>
<author>
<name>ddutta</name>
<email>ddutta@nvidia.com</email>
</author>
<published>2018-09-18T07:14:44+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvgpu.git/commit/?id=feefb7046a88311d88a37ad2cc934ec7b9a9c28f'/>
<id>feefb7046a88311d88a37ad2cc934ec7b9a9c28f</id>
<content type='text'>
This patch comes as a follow up to commit
2517d59be282426eec7a97745b76d745ff36c388 containing minor fixes
i.e. changing type of 'pos' to u32 instead of int and renaming
syncpt_get_id to channel_sync_syncpt_get_id

Jira NVGPU-1086

Change-Id: I8bd9271c20d88ff5f68ccfc48a0b533844bbcaaa
Signed-off-by: Debarshi Dutta &lt;ddutta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1829832
Reviewed-by: svc-misra-checker &lt;svc-misra-checker@nvidia.com&gt;
Reviewed-by: Konsta Holtta &lt;kholtta@nvidia.com&gt;
Reviewed-by: Alex Waterman &lt;alexw@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu &lt;vsubbu@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch comes as a follow up to commit
2517d59be282426eec7a97745b76d745ff36c388 containing minor fixes
i.e. changing type of 'pos' to u32 instead of int and renaming
syncpt_get_id to channel_sync_syncpt_get_id

Jira NVGPU-1086

Change-Id: I8bd9271c20d88ff5f68ccfc48a0b533844bbcaaa
Signed-off-by: Debarshi Dutta &lt;ddutta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1829832
Reviewed-by: svc-misra-checker &lt;svc-misra-checker@nvidia.com&gt;
Reviewed-by: Konsta Holtta &lt;kholtta@nvidia.com&gt;
Reviewed-by: Alex Waterman &lt;alexw@nvidia.com&gt;
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu &lt;vsubbu@nvidia.com&gt;
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gpu: nvgpu: move channel_sync_gk20a.* to common directory</title>
<updated>2018-09-18T06:39:24+00:00</updated>
<author>
<name>Debarshi Dutta</name>
<email>ddutta@nvidia.com</email>
</author>
<published>2018-09-04T12:09:36+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/nvgpu.git/commit/?id=2517d59be282426eec7a97745b76d745ff36c388'/>
<id>2517d59be282426eec7a97745b76d745ff36c388</id>
<content type='text'>
1) Move channel_sync_gk20a.* from gk20a/ to common/ directory as they
donot program any hardware registers. Also as an add-on rename
channel_sync_gk20a.* to channel_sync.* and update the headers
in required files.
2) Rename the struct gk20a_channel_sync to struct nvgpu_channel_sync. Also,
corresponding syncpt and semaphore versions of the struct alongwith
related methods are renamed by removing "gk20a" from their names and
adding "nvgpu".
3) Add misra-c cleanups

Jira NVGPU-1086

Change-Id: I4e0e21803ca3858dd7a5fc4d2454dba1f1bfcecd
Signed-off-by: Debarshi Dutta &lt;ddutta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1812594
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1) Move channel_sync_gk20a.* from gk20a/ to common/ directory as they
donot program any hardware registers. Also as an add-on rename
channel_sync_gk20a.* to channel_sync.* and update the headers
in required files.
2) Rename the struct gk20a_channel_sync to struct nvgpu_channel_sync. Also,
corresponding syncpt and semaphore versions of the struct alongwith
related methods are renamed by removing "gk20a" from their names and
adding "nvgpu".
3) Add misra-c cleanups

Jira NVGPU-1086

Change-Id: I4e0e21803ca3858dd7a5fc4d2454dba1f1bfcecd
Signed-off-by: Debarshi Dutta &lt;ddutta@nvidia.com&gt;
Reviewed-on: https://git-master.nvidia.com/r/1812594
Reviewed-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
Tested-by: mobile promotions &lt;svcmobile_promotions@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
