Commit 2879b482 authored by Simona Vetter's avatar Simona Vetter
Browse files

Merge tag 'drm-misc-fixes-2024-07-04' of...

Merge tag 'drm-misc-fixes-2024-07-04' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-fixes

drm-misc-fixes for v6.10-rc7:
- Add panel quirks.
- Firmware sysfb refcount fix.
- Another null pointer mode deref fix for nouveau.
- Panthor sync and uobj fixes.
- Fix fbdev regression since v6.7.
- Delay free imported bo in ttm to fix lockdep splat.

Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ffba0c63-2798-40b6-948d-361cd3b14e9f@linux.intel.com
parents cfbce3bc d99fbd9a
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -101,8 +101,10 @@ static __init struct device *sysfb_parent_dev(const struct screen_info *si)
	if (IS_ERR(pdev)) {
		return ERR_CAST(pdev);
	} else if (pdev) {
		if (!sysfb_pci_dev_is_enabled(pdev))
		if (!sysfb_pci_dev_is_enabled(pdev)) {
			pci_dev_put(pdev);
			return ERR_PTR(-ENODEV);
		}
		return &pdev->dev;
	}

@@ -137,7 +139,7 @@ static __init int sysfb_init(void)
	if (compatible) {
		pd = sysfb_create_simplefb(si, &mode, parent);
		if (!IS_ERR(pd))
			goto unlock_mutex;
			goto put_device;
	}

	/* if the FB is incompatible, create a legacy framebuffer device */
@@ -155,7 +157,7 @@ static __init int sysfb_init(void)
	pd = platform_device_alloc(name, 0);
	if (!pd) {
		ret = -ENOMEM;
		goto unlock_mutex;
		goto put_device;
	}

	pd->dev.parent = parent;
@@ -170,9 +172,11 @@ static __init int sysfb_init(void)
	if (ret)
		goto err;

	goto unlock_mutex;
	goto put_device;
err:
	platform_device_put(pd);
put_device:
	put_device(parent);
unlock_mutex:
	mutex_unlock(&disable_lock);
	return ret;
+2 −1
Original line number Diff line number Diff line
@@ -84,7 +84,8 @@ static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper,
		    sizes->surface_width, sizes->surface_height,
		    sizes->surface_bpp);

	format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
	format = drm_driver_legacy_fb_format(dev, sizes->surface_bpp,
					     sizes->surface_depth);
	buffer = drm_client_framebuffer_create(client, sizes->surface_width,
					       sizes->surface_height, format);
	if (IS_ERR(buffer))
+8 −1
Original line number Diff line number Diff line
@@ -420,13 +420,20 @@ static const struct dmi_system_id orientation_data[] = {
		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Galaxy Book 10.6"),
		},
		.driver_data = (void *)&lcd1280x1920_rightside_up,
	}, {	/* Valve Steam Deck */
	}, {	/* Valve Steam Deck (Jupiter) */
		.matches = {
		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Valve"),
		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Jupiter"),
		  DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "1"),
		},
		.driver_data = (void *)&lcd800x1280_rightside_up,
	}, {	/* Valve Steam Deck (Galileo) */
		.matches = {
		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Valve"),
		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Galileo"),
		  DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "1"),
		},
		.driver_data = (void *)&lcd800x1280_rightside_up,
	}, {	/* VIOS LTH17 */
		.matches = {
		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
+3 −0
Original line number Diff line number Diff line
@@ -1001,6 +1001,9 @@ nouveau_connector_get_modes(struct drm_connector *connector)
		struct drm_display_mode *mode;

		mode = drm_mode_duplicate(dev, nv_connector->native_mode);
		if (!mode)
			return 0;

		drm_mode_probed_add(connector, mode);
		ret = 1;
	}
+3 −3
Original line number Diff line number Diff line
@@ -86,15 +86,15 @@ panthor_get_uobj_array(const struct drm_panthor_obj_array *in, u32 min_stride,
	int ret = 0;
	void *out_alloc;

	if (!in->count)
		return NULL;

	/* User stride must be at least the minimum object size, otherwise it might
	 * lack useful information.
	 */
	if (in->stride < min_stride)
		return ERR_PTR(-EINVAL);

	if (!in->count)
		return NULL;

	out_alloc = kvmalloc_array(in->count, obj_size, GFP_KERNEL);
	if (!out_alloc)
		return ERR_PTR(-ENOMEM);
Loading