Commit eb7bac39 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-fixes-2022-05-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes



Multiple fixes to fbdev to address a regression at unregistration, an
iommu detection improvement for nouveau, a memory leak fix for nouveau,
pointer dereference fix for dma_buf_file_release(), and a build breakage
fix for vc4

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220513073044.ymayac7x7bzatrt7@houat
parents 30c60ba3 6fed53de
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -543,10 +543,6 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
	file->f_mode |= FMODE_LSEEK;
	dmabuf->file = file;

	ret = dma_buf_stats_setup(dmabuf);
	if (ret)
		goto err_sysfs;

	mutex_init(&dmabuf->lock);
	INIT_LIST_HEAD(&dmabuf->attachments);

@@ -554,6 +550,10 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
	list_add(&dmabuf->list_node, &db_list.head);
	mutex_unlock(&db_list.lock);

	ret = dma_buf_stats_setup(dmabuf);
	if (ret)
		goto err_sysfs;

	return dmabuf;

err_sysfs:
+5 −4
Original line number Diff line number Diff line
@@ -46,8 +46,9 @@ static bool
nouveau_get_backlight_name(char backlight_name[BL_NAME_SIZE],
			   struct nouveau_backlight *bl)
{
	const int nb = ida_simple_get(&bl_ida, 0, 0, GFP_KERNEL);
	if (nb < 0 || nb >= 100)
	const int nb = ida_alloc_max(&bl_ida, 99, GFP_KERNEL);

	if (nb < 0)
		return false;
	if (nb > 0)
		snprintf(backlight_name, BL_NAME_SIZE, "nv_backlight%d", nb);
@@ -414,7 +415,7 @@ nouveau_backlight_init(struct drm_connector *connector)
					    nv_encoder, ops, &props);
	if (IS_ERR(bl->dev)) {
		if (bl->id >= 0)
			ida_simple_remove(&bl_ida, bl->id);
			ida_free(&bl_ida, bl->id);
		ret = PTR_ERR(bl->dev);
		goto fail_alloc;
	}
@@ -442,7 +443,7 @@ nouveau_backlight_fini(struct drm_connector *connector)
		return;

	if (bl->id >= 0)
		ida_simple_remove(&bl_ida, bl->id);
		ida_free(&bl_ida, bl->id);

	backlight_device_unregister(bl->dev);
	nv_conn->backlight = NULL;
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)

	mutex_init(&tdev->iommu.mutex);

	if (iommu_present(&platform_bus_type)) {
	if (device_iommu_mapped(dev)) {
		tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
		if (!tdev->iommu.domain)
			goto error;
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#include <drm/drm_scdc_helper.h>
#include <linux/clk.h>
#include <linux/component.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/of_address.h>
#include <linux/of_gpio.h>
+1 −4
Original line number Diff line number Diff line
@@ -1434,10 +1434,7 @@ fb_release(struct inode *inode, struct file *file)
__acquires(&info->lock)
__releases(&info->lock)
{
	struct fb_info * const info = file_fb_info(file);

	if (!info)
		return -ENODEV;
	struct fb_info * const info = file->private_data;

	lock_fb_info(info);
	if (info->fbops->fb_release)
Loading