Commit 63957f6b authored by Simona Vetter's avatar Simona Vetter
Browse files

Merge tag 'drm-misc-fixes-2023-11-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes



Assorted fixes for v6.7-rc2:
- Nouveau GSP fixes.
- Fix nouveau driver load without display.
- Use rwlock for nouveau's event lock to break a lockdep splat.
- Add orientation quirk for Lenovo Legion Go.
- Fix build failure in IVPU.

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/98fc82d3-8714-45e7-bd12-c95ba8c6c35f@linux.intel.com
parents b85ea95d ae1aadb1
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -250,9 +250,6 @@ int ivpu_rpm_get_if_active(struct ivpu_device *vdev)
{
	int ret;

	ivpu_dbg(vdev, RPM, "rpm_get_if_active count %d\n",
		 atomic_read(&vdev->drm.dev->power.usage_count));

	ret = pm_runtime_get_if_active(vdev->drm.dev, false);
	drm_WARN_ON(&vdev->drm, ret < 0);

+6 −0
Original line number Diff line number Diff line
@@ -336,6 +336,12 @@ static const struct dmi_system_id orientation_data[] = {
		  DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Duet 3 10IGL5"),
		},
		.driver_data = (void *)&lcd1200x1920_rightside_up,
	}, {	/* Lenovo Legion Go 8APU1 */
		.matches = {
		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
		  DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Legion Go 8APU1"),
		},
		.driver_data = (void *)&lcd1600x2560_leftside_up,
	}, {	/* Lenovo Yoga Book X90F / X90L */
		.matches = {
		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ struct nvkm_event {
	int index_nr;

	spinlock_t refs_lock;
	spinlock_t list_lock;
	rwlock_t list_lock;
	int *refs;

	struct list_head ntfy;
@@ -38,7 +38,7 @@ nvkm_event_init(const struct nvkm_event_func *func, struct nvkm_subdev *subdev,
		int types_nr, int index_nr, struct nvkm_event *event)
{
	spin_lock_init(&event->refs_lock);
	spin_lock_init(&event->list_lock);
	rwlock_init(&event->list_lock);
	return __nvkm_event_init(func, subdev, types_nr, index_nr, event);
}

+5 −0
Original line number Diff line number Diff line
@@ -726,6 +726,11 @@ nouveau_display_create(struct drm_device *dev)

	if (nouveau_modeset != 2) {
		ret = nvif_disp_ctor(&drm->client.device, "kmsDisp", 0, &disp->disp);
		/* no display hw */
		if (ret == -ENODEV) {
			ret = 0;
			goto disp_create_err;
		}

		if (!ret && (disp->disp.outp_mask || drm->vbios.dcb.entries)) {
			nouveau_display_create_properties(dev);
+6 −6
Original line number Diff line number Diff line
@@ -81,17 +81,17 @@ nvkm_event_ntfy_state(struct nvkm_event_ntfy *ntfy)
static void
nvkm_event_ntfy_remove(struct nvkm_event_ntfy *ntfy)
{
	spin_lock_irq(&ntfy->event->list_lock);
	write_lock_irq(&ntfy->event->list_lock);
	list_del_init(&ntfy->head);
	spin_unlock_irq(&ntfy->event->list_lock);
	write_unlock_irq(&ntfy->event->list_lock);
}

static void
nvkm_event_ntfy_insert(struct nvkm_event_ntfy *ntfy)
{
	spin_lock_irq(&ntfy->event->list_lock);
	write_lock_irq(&ntfy->event->list_lock);
	list_add_tail(&ntfy->head, &ntfy->event->ntfy);
	spin_unlock_irq(&ntfy->event->list_lock);
	write_unlock_irq(&ntfy->event->list_lock);
}

static void
@@ -176,7 +176,7 @@ nvkm_event_ntfy(struct nvkm_event *event, int id, u32 bits)
		return;

	nvkm_trace(event->subdev, "event: ntfy %08x on %d\n", bits, id);
	spin_lock_irqsave(&event->list_lock, flags);
	read_lock_irqsave(&event->list_lock, flags);

	list_for_each_entry_safe(ntfy, ntmp, &event->ntfy, head) {
		if (ntfy->id == id && ntfy->bits & bits) {
@@ -185,7 +185,7 @@ nvkm_event_ntfy(struct nvkm_event *event, int id, u32 bits)
		}
	}

	spin_unlock_irqrestore(&event->list_lock, flags);
	read_unlock_irqrestore(&event->list_lock, flags);
}

void
Loading