<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/gpu/drm/nouveau/nvkm/subdev/bios, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/gpu/drm/nouveau/nvkm/subdev/bios?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/gpu/drm/nouveau/nvkm/subdev/bios?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-07-15T19:12:22Z</updated>
<entry>
<title>drm/nouveau/bios: set info only when the return is not 0</title>
<updated>2022-07-15T19:12:22Z</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2022-07-02T15:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bd8408e69a47f8e9f5d95c5d919413fafecc1e73'/>
<id>urn:sha1:bd8408e69a47f8e9f5d95c5d919413fafecc1e73</id>
<content type='text'>
clang static analysis reports
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pmu.c:68:17: warning: The right operand of '*' is a garbage value [core.UndefinedBinaryOperatorResult]
        switch (!!data * *ver) {
                       ^ ~~~~
A switch statement with only a default should be reduced to an if.

If nvbios_pmuEp() returns 0, via the data variable, the output info parameter
is not used.  So set info only when data is not 0.

The struct nvbios_pmuE only has the type and data elements.  Since both of these
are explicitly set, memset is not needed.  So remove it.

Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220702153904.1696595-1-trix@redhat.com
</content>
</entry>
<entry>
<title>drm/nouveau/bios: Rename prom_init() and friends functions</title>
<updated>2022-06-08T20:50:40Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2022-03-19T10:27:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6aed665f9d8368ae1e962f44339150884bb47f5b'/>
<id>urn:sha1:6aed665f9d8368ae1e962f44339150884bb47f5b</id>
<content type='text'>
While working at fixing powerpc headers, I ended up with the
following error.

	drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c:48:1: error: conflicting types for 'prom_init'; have 'void *(struct nvkm_bios *, const char *)'
	make[5]: *** [scripts/Makefile.build:288: drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.o] Error 1

powerpc and a few other architectures have a prom_init() global function.
One day or another it will conflict with the one in shadowrom.c

Those being static, they can easily be renamed. Do it.

While at it, also rename the ops structure as 'nvbios_prom' instead of
'nvbios_rom' in order to make it clear that it refers to the
NV_PROM device.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/7e0612b61511ec8030e3b2dcbfaa7751781c8b91.1647684507.git.christophe.leroy@csgroup.eu
</content>
</entry>
<entry>
<title>drm/nouveau: fix another off-by-one in nvbios_addr</title>
<updated>2022-06-02T22:40:03Z</updated>
<author>
<name>Timur Tabi</name>
<email>ttabi@nvidia.com</email>
</author>
<published>2022-05-11T16:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c441d28945fb113220d48d6c86ebc0b090a2b677'/>
<id>urn:sha1:c441d28945fb113220d48d6c86ebc0b090a2b677</id>
<content type='text'>
This check determines whether a given address is part of
image 0 or image 1.  Image 1 starts at offset image0_size,
so that address should be included.

Fixes: 4d4e9907ff572 ("drm/nouveau/bios: guard against out-of-bounds accesses to image")
Cc: &lt;stable@vger.kernel.org&gt; # v4.8+
Signed-off-by: Timur Tabi &lt;ttabi@nvidia.com&gt;
Reviewed-by: Karol Herbst &lt;kherbst@redhat.com&gt;
Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220511163716.3520591-1-ttabi@nvidia.com
</content>
</entry>
<entry>
<title>drm/nouveau: fix off by one in BIOS boundary checking</title>
<updated>2022-01-31T21:47:53Z</updated>
<author>
<name>Nick Lopez</name>
<email>github@glowingmonkey.org</email>
</author>
<published>2022-01-22T08:19:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1b777d4d9e383d2744fc9b3a09af6ec1893c8b1a'/>
<id>urn:sha1:1b777d4d9e383d2744fc9b3a09af6ec1893c8b1a</id>
<content type='text'>
Bounds checking when parsing init scripts embedded in the BIOS reject
access to the last byte. This causes driver initialization to fail on
Apple eMac's with GeForce 2 MX GPUs, leaving the system with no working
console.

This is probably only seen on OpenFirmware machines like PowerPC Macs
because the BIOS image provided by OF is only the used parts of the ROM,
not a power-of-two blocks read from PCI directly so PCs always have
empty bytes at the end that are never accessed.

Signed-off-by: Nick Lopez &lt;github@glowingmonkey.org&gt;
Fixes: 4d4e9907ff572 ("drm/nouveau/bios: guard against out-of-bounds accesses to image")
Cc: &lt;stable@vger.kernel.org&gt; # v4.10+
Reviewed-by: Ilia Mirkin &lt;imirkin@alum.mit.edu&gt;
Reviewed-by: Karol Herbst &lt;kherbst@redhat.com&gt;
Signed-off-by: Karol Herbst &lt;kherbst@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220122081906.2633061-1-github@glowingmonkey.org
</content>
</entry>
<entry>
<title>drm/nouveau/bios/init: A typo fix</title>
<updated>2021-11-12T22:46:04Z</updated>
<author>
<name>Bhaskar Chowdhury</name>
<email>unixbhaskar@gmail.com</email>
</author>
<published>2021-03-24T06:34:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c5dac1f62153d08a2404bcd6292d72f8290c2c1d'/>
<id>urn:sha1:c5dac1f62153d08a2404bcd6292d72f8290c2c1d</id>
<content type='text'>
s/conditon/condition/

Signed-off-by: Bhaskar Chowdhury &lt;unixbhaskar@gmail.com&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Reviewed-by: Karol Herbst &lt;kherbst@redhat.com&gt;
Signed-off-by: Karol Herbst &lt;kherbst@redhat.com&gt;
Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/10
</content>
</entry>
<entry>
<title>drm/nouveau/bios: switch to instanced constructor</title>
<updated>2021-02-11T01:49:52Z</updated>
<author>
<name>Ben Skeggs</name>
<email>bskeggs@redhat.com</email>
</author>
<published>2020-12-04T00:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e07f50d3558a83b5c92a7b768447a092a282472c'/>
<id>urn:sha1:e07f50d3558a83b5c92a7b768447a092a282472c</id>
<content type='text'>
Signed-off-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/nouveau/bios/ga10[024]: initial support</title>
<updated>2021-01-15T00:25:19Z</updated>
<author>
<name>Ben Skeggs</name>
<email>bskeggs@redhat.com</email>
</author>
<published>2021-01-13T07:12:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a34632482f1ea768429a9d4c79a10d12f5093405'/>
<id>urn:sha1:a34632482f1ea768429a9d4c79a10d12f5093405</id>
<content type='text'>
Forcing PRAMIN-shadowing off for GA100, as it requires display, and we don't
know if/where the fuse register for detecting its presence is.

Signed-off-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/nouveau/bios: fix issue shadowing expansion ROMs</title>
<updated>2021-01-15T00:25:14Z</updated>
<author>
<name>Ben Skeggs</name>
<email>bskeggs@redhat.com</email>
</author>
<published>2021-01-13T07:12:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=402a89660e9dc880710b12773076a336c9dab3d7'/>
<id>urn:sha1:402a89660e9dc880710b12773076a336c9dab3d7</id>
<content type='text'>
This issue has generally been covered up by the presence of additional
expansion ROMs after the ones we're interested in, with header fetches
of subsequent images loading enough of the ROM to hide the issue.

Noticed on GA102, which lacks a type 0x70 image compared to TU102,.

[  906.364197] nouveau 0000:09:00.0: bios: 00000000: type 00, 65024 bytes
[  906.381205] nouveau 0000:09:00.0: bios: 0000fe00: type 03, 91648 bytes
[  906.405213] nouveau 0000:09:00.0: bios: 00026400: type e0, 22016 bytes
[  906.410984] nouveau 0000:09:00.0: bios: 0002ba00: type e0, 366080 bytes

vs

[   22.961901] nouveau 0000:09:00.0: bios: 00000000: type 00, 60416 bytes
[   22.984174] nouveau 0000:09:00.0: bios: 0000ec00: type 03, 71168 bytes
[   23.010446] nouveau 0000:09:00.0: bios: 00020200: type e0, 48128 bytes
[   23.028220] nouveau 0000:09:00.0: bios: 0002be00: type e0, 140800 bytes
[   23.080196] nouveau 0000:09:00.0: bios: 0004e400: type 70, 7168 bytes

Signed-off-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: remove unneeded break</title>
<updated>2020-11-08T17:59:00Z</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2020-10-19T16:31:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=819af2a6765a39767717ea349a3d274ba723abf4'/>
<id>urn:sha1:819af2a6765a39767717ea349a3d274ba723abf4</id>
<content type='text'>
A break is not needed if it is preceded by a return or break

Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20201019163115.25814-1-trix@redhat.com
</content>
</entry>
<entry>
<title>drm/nouveau: Use fallthrough pseudo-keyword</title>
<updated>2020-07-24T08:50:50Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-07-07T17:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f6e7393edefada6abf7d0b6cd3f81f09d2f22fbf'/>
<id>urn:sha1:f6e7393edefada6abf7d0b6cd3f81f09d2f22fbf</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/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
</content>
</entry>
</feed>
