Commit 63957f6b authored by Daniel Vetter's avatar Daniel Vetter

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
...@@ -250,9 +250,6 @@ int ivpu_rpm_get_if_active(struct ivpu_device *vdev) ...@@ -250,9 +250,6 @@ int ivpu_rpm_get_if_active(struct ivpu_device *vdev)
{ {
int ret; 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); ret = pm_runtime_get_if_active(vdev->drm.dev, false);
drm_WARN_ON(&vdev->drm, ret < 0); drm_WARN_ON(&vdev->drm, ret < 0);
......
...@@ -336,6 +336,12 @@ static const struct dmi_system_id orientation_data[] = { ...@@ -336,6 +336,12 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Duet 3 10IGL5"), DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Duet 3 10IGL5"),
}, },
.driver_data = (void *)&lcd1200x1920_rightside_up, .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 */ }, { /* Lenovo Yoga Book X90F / X90L */
.matches = { .matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
......
...@@ -14,7 +14,7 @@ struct nvkm_event { ...@@ -14,7 +14,7 @@ struct nvkm_event {
int index_nr; int index_nr;
spinlock_t refs_lock; spinlock_t refs_lock;
spinlock_t list_lock; rwlock_t list_lock;
int *refs; int *refs;
struct list_head ntfy; struct list_head ntfy;
...@@ -38,7 +38,7 @@ nvkm_event_init(const struct nvkm_event_func *func, struct nvkm_subdev *subdev, ...@@ -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) int types_nr, int index_nr, struct nvkm_event *event)
{ {
spin_lock_init(&event->refs_lock); 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); return __nvkm_event_init(func, subdev, types_nr, index_nr, event);
} }
......
...@@ -726,6 +726,11 @@ nouveau_display_create(struct drm_device *dev) ...@@ -726,6 +726,11 @@ nouveau_display_create(struct drm_device *dev)
if (nouveau_modeset != 2) { if (nouveau_modeset != 2) {
ret = nvif_disp_ctor(&drm->client.device, "kmsDisp", 0, &disp->disp); 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)) { if (!ret && (disp->disp.outp_mask || drm->vbios.dcb.entries)) {
nouveau_display_create_properties(dev); nouveau_display_create_properties(dev);
......
...@@ -81,17 +81,17 @@ nvkm_event_ntfy_state(struct nvkm_event_ntfy *ntfy) ...@@ -81,17 +81,17 @@ nvkm_event_ntfy_state(struct nvkm_event_ntfy *ntfy)
static void static void
nvkm_event_ntfy_remove(struct nvkm_event_ntfy *ntfy) 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); list_del_init(&ntfy->head);
spin_unlock_irq(&ntfy->event->list_lock); write_unlock_irq(&ntfy->event->list_lock);
} }
static void static void
nvkm_event_ntfy_insert(struct nvkm_event_ntfy *ntfy) 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); list_add_tail(&ntfy->head, &ntfy->event->ntfy);
spin_unlock_irq(&ntfy->event->list_lock); write_unlock_irq(&ntfy->event->list_lock);
} }
static void static void
...@@ -176,7 +176,7 @@ nvkm_event_ntfy(struct nvkm_event *event, int id, u32 bits) ...@@ -176,7 +176,7 @@ nvkm_event_ntfy(struct nvkm_event *event, int id, u32 bits)
return; return;
nvkm_trace(event->subdev, "event: ntfy %08x on %d\n", bits, id); 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) { list_for_each_entry_safe(ntfy, ntmp, &event->ntfy, head) {
if (ntfy->id == id && ntfy->bits & bits) { if (ntfy->id == id && ntfy->bits & bits) {
...@@ -185,7 +185,7 @@ nvkm_event_ntfy(struct nvkm_event *event, int id, u32 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 void
......
...@@ -689,8 +689,8 @@ r535_gsp_rpc_get(struct nvkm_gsp *gsp, u32 fn, u32 argc) ...@@ -689,8 +689,8 @@ r535_gsp_rpc_get(struct nvkm_gsp *gsp, u32 fn, u32 argc)
struct nvfw_gsp_rpc *rpc; struct nvfw_gsp_rpc *rpc;
rpc = r535_gsp_cmdq_get(gsp, ALIGN(sizeof(*rpc) + argc, sizeof(u64))); rpc = r535_gsp_cmdq_get(gsp, ALIGN(sizeof(*rpc) + argc, sizeof(u64)));
if (!rpc) if (IS_ERR(rpc))
return NULL; return ERR_CAST(rpc);
rpc->header_version = 0x03000000; rpc->header_version = 0x03000000;
rpc->signature = ('C' << 24) | ('P' << 16) | ('R' << 8) | 'V'; rpc->signature = ('C' << 24) | ('P' << 16) | ('R' << 8) | 'V';
...@@ -1159,7 +1159,7 @@ static void ...@@ -1159,7 +1159,7 @@ static void
r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode, r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode,
MUX_METHOD_DATA_ELEMENT *part) MUX_METHOD_DATA_ELEMENT *part)
{ {
acpi_handle iter = NULL, handle_mux; acpi_handle iter = NULL, handle_mux = NULL;
acpi_status status; acpi_status status;
unsigned long long value; unsigned long long value;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment