<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/video/fbdev/nvidia, branch v5.18-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>video: fbdev: nvidiafb: Use strscpy() to prevent buffer overflow</title>
<updated>2022-01-29T21:24:25+00:00</updated>
<author>
<name>Tim Gardner</name>
<email>tim.gardner@canonical.com</email>
</author>
<published>2021-09-27T15:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37a1a2e6eeeb101285cd34e12e48a881524701aa'/>
<id>37a1a2e6eeeb101285cd34e12e48a881524701aa</id>
<content type='text'>
Coverity complains of a possible buffer overflow. However,
given the 'static' scope of nvidia_setup_i2c_bus() it looks
like that can't happen after examiniing the call sites.

CID 19036 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
1. fixed_size_dest: You might overrun the 48-character fixed-size string
  chan-&gt;adapter.name by copying name without checking the length.
2. parameter_as_source: Note: This defect has an elevated risk because the
  source argument is a parameter of the current function.
 89        strcpy(chan-&gt;adapter.name, name);

Fix this warning by using strscpy() which will silence the warning and
prevent any future buffer overflows should the names used to identify the
channel become much longer.

Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tim Gardner &lt;tim.gardner@canonical.com&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverity complains of a possible buffer overflow. However,
given the 'static' scope of nvidia_setup_i2c_bus() it looks
like that can't happen after examiniing the call sites.

CID 19036 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
1. fixed_size_dest: You might overrun the 48-character fixed-size string
  chan-&gt;adapter.name by copying name without checking the length.
2. parameter_as_source: Note: This defect has an elevated risk because the
  source argument is a parameter of the current function.
 89        strcpy(chan-&gt;adapter.name, name);

Fix this warning by using strscpy() which will silence the warning and
prevent any future buffer overflows should the names used to identify the
channel become much longer.

Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tim Gardner &lt;tim.gardner@canonical.com&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: nvidia: Fix set but not used warnings</title>
<updated>2020-11-30T19:21:54+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2020-11-28T22:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=025ae8255d3390e5d22c42f380e60080366272fc'/>
<id>025ae8255d3390e5d22c42f380e60080366272fc</id>
<content type='text'>
Fix warnings by deleting unused code. The register reads are
kept as it is unknown if there are any hidden side-effects.

v2:
  - Update subject (Lee)

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: linux-fbdev@vger.kernel.org
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-21-sam@ravnborg.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix warnings by deleting unused code. The register reads are
kept as it is unknown if there are any hidden side-effects.

v2:
  - Update subject (Lee)

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: linux-fbdev@vger.kernel.org
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201128224114.1033617-21-sam@ravnborg.org
</pre>
</div>
</content>
</entry>
<entry>
<title>fbdev: nvidia: use for_each_child_of_node() macro</title>
<updated>2020-10-16T21:43:41+00:00</updated>
<author>
<name>Qinglang Miao</name>
<email>miaoqinglang@huawei.com</email>
</author>
<published>2020-09-16T06:21:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3da1781ea458f658e6089c1cc471016a72fb81cf'/>
<id>3da1781ea458f658e6089c1cc471016a72fb81cf</id>
<content type='text'>
Use for_each_child_of_node() macro instead of open coding it.

Signed-off-by: Qinglang Miao &lt;miaoqinglang@huawei.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200916062123.190636-1-miaoqinglang@huawei.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use for_each_child_of_node() macro instead of open coding it.

Signed-off-by: Qinglang Miao &lt;miaoqinglang@huawei.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200916062123.190636-1-miaoqinglang@huawei.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge drm/drm-next into drm-misc-next</title>
<updated>2020-09-14T16:11:40+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2020-09-14T16:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=00af6729b52ede86a08173c8d5f2c8cd9fa3390d'/>
<id>00af6729b52ede86a08173c8d5f2c8cd9fa3390d</id>
<content type='text'>
Paul Cercueil needs some patches in -rc5 to apply new patches for ingenic
properly.

Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Paul Cercueil needs some patches in -rc5 to apply new patches for ingenic
properly.

Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fbdev: nvidia: use generic power management</title>
<updated>2020-09-08T11:33:14+00:00</updated>
<author>
<name>Vaibhav Gupta</name>
<email>vaibhavgupta40@gmail.com</email>
</author>
<published>2020-08-19T18:56:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6d111187588cddc4d0fd84007756f396cdb2de85'/>
<id>6d111187588cddc4d0fd84007756f396cdb2de85</id>
<content type='text'>
Drivers should do only device-specific jobs. But in general, drivers using
legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
PM-related tasks themselves which can be done by PCI Core itself. This
brings extra load on the driver and it directly calls PCI helper functions
to handle them.

Switch to the new generic framework by updating function signatures and
define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
unnecessary calls to the PCI Helper functions along with the legacy
.suspend &amp; .resume bindings.

Now,
- nvidiafb_suspend() had a "pm_message_t" type parameter as per legacy
  PCI PM framework that got deprecated in generic.
- Rename the callback as nvidiafb_suspend_late() and preserve the
  parameter.
- Define 3 new callbacks as:
        * nvidiafb_suspend()
        * nvidiafb_freeze()
        * nvidiafb_hibernate()
  which in turn call nvidiafb_suspend_late() by passing appropriate value
  for "pm_message_t" type parameter.
- Bind the callbacks in "struct dev_pm_ops" type variable
  "nvidiafb_pm_ops".

Signed-off-by: Vaibhav Gupta &lt;vaibhavgupta40@gmail.com&gt;
Cc: Bjorn Helgaas &lt;helgaas@kernel.org&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Bjorn Helgaas &lt;bjorn@helgaas.com&gt;
Cc: Vaibhav Gupta &lt;vaibhav.varodek@gmail.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Andres Salomon &lt;dilinger@queued.net&gt;
CC: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-7-vaibhavgupta40@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drivers should do only device-specific jobs. But in general, drivers using
legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
PM-related tasks themselves which can be done by PCI Core itself. This
brings extra load on the driver and it directly calls PCI helper functions
to handle them.

Switch to the new generic framework by updating function signatures and
define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
unnecessary calls to the PCI Helper functions along with the legacy
.suspend &amp; .resume bindings.

Now,
- nvidiafb_suspend() had a "pm_message_t" type parameter as per legacy
  PCI PM framework that got deprecated in generic.
- Rename the callback as nvidiafb_suspend_late() and preserve the
  parameter.
- Define 3 new callbacks as:
        * nvidiafb_suspend()
        * nvidiafb_freeze()
        * nvidiafb_hibernate()
  which in turn call nvidiafb_suspend_late() by passing appropriate value
  for "pm_message_t" type parameter.
- Bind the callbacks in "struct dev_pm_ops" type variable
  "nvidiafb_pm_ops".

Signed-off-by: Vaibhav Gupta &lt;vaibhavgupta40@gmail.com&gt;
Cc: Bjorn Helgaas &lt;helgaas@kernel.org&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Bjorn Helgaas &lt;bjorn@helgaas.com&gt;
Cc: Vaibhav Gupta &lt;vaibhav.varodek@gmail.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Andres Salomon &lt;dilinger@queued.net&gt;
CC: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-7-vaibhavgupta40@gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Use fallthrough pseudo-keyword</title>
<updated>2020-08-23T22:36:59+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-08-23T22:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=df561f6688fef775baa341a0f5d960becd248b11'/>
<id>df561f6688fef775baa341a0f5d960becd248b11</id>
<content type='text'>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: Use IS_BUILTIN</title>
<updated>2020-06-01T13:15:24+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2020-05-04T23:29:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=720815247395480ac0d04948fc9ab6282b3291b9'/>
<id>720815247395480ac0d04948fc9ab6282b3291b9</id>
<content type='text'>
IS_BUILTIN can be use to replace various initializations
like #if CONFIG_&lt;FOO&gt; int val = 1; #else int val = 0; #endif
so do so.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/b1cf967015c5beafa475aaa30d8e21a58caff870.camel@perches.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IS_BUILTIN can be use to replace various initializations
like #if CONFIG_&lt;FOO&gt; int val = 1; #else int val = 0; #endif
so do so.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/b1cf967015c5beafa475aaa30d8e21a58caff870.camel@perches.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: nvidia: clean up indentation issues and comment block</title>
<updated>2020-01-15T16:31:53+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2020-01-13T14:46:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e4eed858357a94438fa5e3c5839c7b597acdb688'/>
<id>e4eed858357a94438fa5e3c5839c7b597acdb688</id>
<content type='text'>
There is a hunk of code that is incorrectly indented, clean up the
indentation and a comment block. Also remove block braces around a
one line statement on an if condition and add missing spaces after
if keywords.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200113144627.219967-1-colin.king@canonical.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a hunk of code that is incorrectly indented, clean up the
indentation and a comment block. Also remove block braces around a
one line statement on an if condition and add missing spaces after
if keywords.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200113144627.219967-1-colin.king@canonical.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: nvidia: modify the static fb_ops directly</title>
<updated>2019-12-05T08:57:27+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2019-12-03T16:38:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9567a03e19d264a4a033963981cd7d1339ccd3c7'/>
<id>9567a03e19d264a4a033963981cd7d1339ccd3c7</id>
<content type='text'>
Avoid modifying the fb_ops via info-&gt;fbops to let us make the pointer
const in the future.

Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/9639e2305fd4d03311bf909b8914277b221ca582.1575390740.git.jani.nikula@intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid modifying the fb_ops via info-&gt;fbops to let us make the pointer
const in the future.

Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/9639e2305fd4d03311bf909b8914277b221ca582.1575390740.git.jani.nikula@intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: nvidia: Remove dead code</title>
<updated>2019-07-23T15:16:48+00:00</updated>
<author>
<name>Souptick Joarder</name>
<email>jrdr.linux@gmail.com</email>
</author>
<published>2019-07-10T18:16:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9b9f35e7c6594b109ee4d70c3fd19a82ff88e8a6'/>
<id>9b9f35e7c6594b109ee4d70c3fd19a82ff88e8a6</id>
<content type='text'>
This is dead code since 3.15. If there is no plan to use it
further, this can be removed forever.

Signed-off-by: Souptick Joarder &lt;jrdr.linux@gmail.com&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: Sabyasachi Gupta &lt;sabyasachi.linux@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1562782586-3994-1-git-send-email-jrdr.linux@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is dead code since 3.15. If there is no plan to use it
further, this can be removed forever.

Signed-off-by: Souptick Joarder &lt;jrdr.linux@gmail.com&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: Sabyasachi Gupta &lt;sabyasachi.linux@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1562782586-3994-1-git-send-email-jrdr.linux@gmail.com
</pre>
</div>
</content>
</entry>
</feed>
