<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/video/fbdev/savage, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-04-25T10:04:18+00:00</updated>
<entry>
<title>fbdev: savage: Handle err return when savagefb_check_var failed</title>
<updated>2024-04-25T10:04:18+00:00</updated>
<author>
<name>Cai Xinchen</name>
<email>caixinchen1@huawei.com</email>
</author>
<published>2024-04-16T06:51:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ad959b6703e2c4c5d7af03b4cfd5ff608036339'/>
<id>urn:sha1:6ad959b6703e2c4c5d7af03b4cfd5ff608036339</id>
<content type='text'>
The commit 04e5eac8f3ab("fbdev: savage: Error out if pixclock equals zero")
checks the value of pixclock to avoid divide-by-zero error. However
the function savagefb_probe doesn't handle the error return of
savagefb_check_var. When pixclock is 0, it will cause divide-by-zero error.

Fixes: 04e5eac8f3ab ("fbdev: savage: Error out if pixclock equals zero")
Signed-off-by: Cai Xinchen &lt;caixinchen1@huawei.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>fbdev: savage: Error out if pixclock equals zero</title>
<updated>2024-01-21T08:00:14+00:00</updated>
<author>
<name>Fullway Wang</name>
<email>fullwaywang@outlook.com</email>
</author>
<published>2024-01-18T03:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=04e5eac8f3ab2ff52fa191c187a46d4fdbc1e288'/>
<id>urn:sha1:04e5eac8f3ab2ff52fa191c187a46d4fdbc1e288</id>
<content type='text'>
The userspace program could pass any values to the driver through
ioctl() interface. If the driver doesn't check the value of pixclock,
it may cause divide-by-zero error.

Although pixclock is checked in savagefb_decode_var(), but it is not
checked properly in savagefb_probe(). Fix this by checking whether
pixclock is zero in the function savagefb_check_var() before
info-&gt;var.pixclock is used as the divisor.

This is similar to CVE-2022-3061 in i740fb which was fixed by
commit 15cf0b8.

Signed-off-by: Fullway Wang &lt;fullwaywang@outlook.com&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>fbdev/savagefb: Initialize fb_ops to fbdev I/O-memory helpers</title>
<updated>2023-10-19T10:56:35+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-09-27T07:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cee250bce6264ee3e48b0e22585d6bdbbb0dceb9'/>
<id>urn:sha1:cee250bce6264ee3e48b0e22585d6bdbbb0dceb9</id>
<content type='text'>
Initialize the instance of struct fb_ops with fbdev initializer
macros for framebuffers in I/O address space. Set the read/write,
draw and mmap callbacks to the correct implementation and avoid
implicit defaults. Also select the necessary I/O helpers in Kconfig.

Fbdev drivers sometimes rely on the callbacks being NULL for a
default implementation to be invoked; hence requiring the I/O
helpers to be built in any case. Setting all callbacks in all
drivers explicitly will allow to make the I/O helpers optional.
This benefits systems that do not use these functions.

No functional changes.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230927074722.6197-35-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>fbdev: Remove FBINFO_DEFAULT from framebuffer_alloc()'ed structs</title>
<updated>2023-07-24T14:50:38+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-07-15T18:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3e148d730b7255dfcfb080c8633146e44b83b0c'/>
<id>urn:sha1:b3e148d730b7255dfcfb080c8633146e44b83b0c</id>
<content type='text'>
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags
has been allocated to zero by framebuffer_alloc(). So do not set it.

Flags should signal differences from the default values. After cleaning
up all occurrences of FBINFO_DEFAULT, the token will be removed.

v4:
	* clarify commit message (Geert, Dan)
v2:
	* fix commit message (Miguel)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Helge Deller &lt;deller@gmx.de&gt;
Cc: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Ferenc Bakonyi &lt;fero@drama.obuda.kando.hu&gt;
Cc: "K. Y. Srinivasan" &lt;kys@microsoft.com&gt;
Cc: Haiyang Zhang &lt;haiyangz@microsoft.com&gt;
Cc: Wei Liu &lt;wei.liu@kernel.org&gt;
Cc: Dexuan Cui &lt;decui@microsoft.com&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: Maik Broemme &lt;mbroemme@libmpq.org&gt;
Cc: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Cc: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Cc: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Cc: Kristoffer Ericson &lt;kristoffer.ericson@gmail.com&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: Steve Glendinning &lt;steve.glendinning@shawell.net&gt;
Cc: Bernie Thompson &lt;bernie@plugable.com&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-6-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>fbdev: Add support for the nomodeset kernel parameter</title>
<updated>2022-11-16T12:26:25+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-11-11T13:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0ba2fa8cbd29278a180ac90bd66b2c0bbdeacc89'/>
<id>urn:sha1:0ba2fa8cbd29278a180ac90bd66b2c0bbdeacc89</id>
<content type='text'>
Support the kernel's nomodeset parameter for all PCI-based fbdev
drivers that use aperture helpers to remove other, hardware-agnostic
graphics drivers.

The parameter is a simple way of using the firmware-provided scanout
buffer if the hardware's native driver is broken. The same effect
could be achieved with per-driver options, but the importance of the
graphics output for many users makes a single, unified approach
worthwhile.

With nomodeset specified, the fbdev driver module will not load. This
unifies behavior with similar DRM drivers. In DRM helpers, modules
first check the nomodeset parameter before registering the PCI
driver. As fbdev has no such module helpers, we have to modify each
driver individually.

The name 'nomodeset' is slightly misleading, but has been chosen for
historical reasons. Several drivers implemented it before it became a
general option for DRM. So keeping the existing name was preferred over
introducing a new one.

v2:
	* print a warning if a driver does not init (Helge)
	* wrap video_firmware_drivers_only() in helper

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221111133024.9897-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>fbdev: Remove conflicting devices on PCI bus</title>
<updated>2022-07-19T11:19:11+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-07-18T07:23:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=145eed48de278007f646b908fd70ac59d24ed81a'/>
<id>urn:sha1:145eed48de278007f646b908fd70ac59d24ed81a</id>
<content type='text'>
Remove firmware devices on the PCI bus, by calling
aperture_remove_conflicting_pci_devices() in the probe function of
each related fbdev driver. iSo far, most of these drivers did not
remove conflicting VESA or EFI devices, or outride failed for
resource conflicts (i.e., matroxfb.) This must have been broken
for quite some time.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220718072322.8927-7-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>video: fbdev: savagefb: make a variable local</title>
<updated>2022-01-30T18:37:03+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-12-08T07:27:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f8a1cae923670b1cabb9a8f416271344159bd50'/>
<id>urn:sha1:0f8a1cae923670b1cabb9a8f416271344159bd50</id>
<content type='text'>
The "edid" struct member is only used during probe() and it's freed
right away.  There is no point in storing a freed pointer for the
whole life of the driver.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
</content>
</entry>
<entry>
<title>fbdev: savagefb: use generic power management</title>
<updated>2020-09-08T11:33:15+00:00</updated>
<author>
<name>Vaibhav Gupta</name>
<email>vaibhavgupta40@gmail.com</email>
</author>
<published>2020-08-19T18:56:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a4ba7df57e56496349ed84f00310468ae97aea7b'/>
<id>urn:sha1:a4ba7df57e56496349ed84f00310468ae97aea7b</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,
- savagefb_suspend() had a "pm_message_t" type parameter as per legacy
  PCI PM framework that got deprecated in generic.
- Rename the callback as savagefb_suspend_late() and preserve the
  parameter.
- Define 3 new callbacks as:
        * savagefb_suspend()
        * savagefb_freeze()
        * savagefb_hibernate()
  which in turn call savagefb_suspend_late() by passing appropriate value
  for "pm_message_t" type parameter.
- Bind the callbacks in "struct dev_pm_ops" type variable
  "savagefb_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-8-vaibhavgupta40@gmail.com
</content>
</entry>
<entry>
<title>fbdev: Use fallthrough pseudo-keyword</title>
<updated>2020-08-03T19:38:37+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-07-07T21:05:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad04fae0de07580359b7ab3e19a678a775fdf07f'/>
<id>urn:sha1:ad04fae0de07580359b7ab3e19a678a775fdf07f</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: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200707210539.GA12530@embeddedor
</content>
</entry>
<entry>
<title>video: fbdev: savage: fix memory leak on error handling path in probe</title>
<updated>2020-07-10T14:17:23+00:00</updated>
<author>
<name>Evgeny Novikov</name>
<email>novikov@ispras.ru</email>
</author>
<published>2020-06-19T16:21:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e8d35898a78e34fc854ed9680bc3f9caedab08cd'/>
<id>urn:sha1:e8d35898a78e34fc854ed9680bc3f9caedab08cd</id>
<content type='text'>
savagefb_probe() calls savage_init_fb_info() that can successfully
allocate memory for info-&gt;pixmap.addr but then fail when
fb_alloc_cmap() fails. savagefb_probe() goes to label failed_init and
does not free allocated memory. It is not valid to go to label
failed_mmio since savage_init_fb_info() can fail during memory
allocation as well. So, the patch free allocated memory on the error
handling path in savage_init_fb_info() itself.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov &lt;novikov@ispras.ru&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/20200619162136.9010-1-novikov@ispras.ru
</content>
</entry>
</feed>
