Skip to content

Commit 69710cb

Browse files
committed
Merge tag 'v4.14.73' into 4.14-main
This is the 4.14.73 stable release
2 parents d5dd38e + 3b65f40 commit 69710cb

File tree

64 files changed

+400
-247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+400
-247
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 4
33
PATCHLEVEL = 14
4-
SUBLEVEL = 72
4+
SUBLEVEL = 73
55
EXTRAVERSION =
66
NAME = Petit Gorille
77

arch/x86/xen/pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static void xen_convert_regs(const struct xen_pmu_regs *xen_regs,
478478
irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id)
479479
{
480480
int err, ret = IRQ_NONE;
481-
struct pt_regs regs;
481+
struct pt_regs regs = {0};
482482
const struct xen_pmu_data *xenpmu_data = get_xenpmu_data();
483483
uint8_t xenpmu_flags = get_xenpmu_flags();
484484

drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -715,12 +715,14 @@ static int amdgpu_cgs_get_firmware_info(struct cgs_device *cgs_device,
715715
break;
716716
case CHIP_POLARIS10:
717717
if (type == CGS_UCODE_ID_SMU) {
718-
if ((adev->pdev->device == 0x67df) &&
719-
((adev->pdev->revision == 0xe0) ||
720-
(adev->pdev->revision == 0xe3) ||
721-
(adev->pdev->revision == 0xe4) ||
722-
(adev->pdev->revision == 0xe5) ||
723-
(adev->pdev->revision == 0xe7) ||
718+
if (((adev->pdev->device == 0x67df) &&
719+
((adev->pdev->revision == 0xe0) ||
720+
(adev->pdev->revision == 0xe3) ||
721+
(adev->pdev->revision == 0xe4) ||
722+
(adev->pdev->revision == 0xe5) ||
723+
(adev->pdev->revision == 0xe7) ||
724+
(adev->pdev->revision == 0xef))) ||
725+
((adev->pdev->device == 0x6fdf) &&
724726
(adev->pdev->revision == 0xef))) {
725727
info->is_kicker = true;
726728
strcpy(fw_name, "amdgpu/polaris10_k_smc.bin");

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ static const struct pci_device_id pciidlist[] = {
500500
{0x1002, 0x67CA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
501501
{0x1002, 0x67CC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
502502
{0x1002, 0x67CF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
503+
{0x1002, 0x6FDF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS10},
503504
/* Polaris12 */
504505
{0x1002, 0x6980, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},
505506
{0x1002, 0x6981, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_POLARIS12},

drivers/gpu/drm/nouveau/nouveau_connector.c

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,16 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
570570
nv_connector->edid = NULL;
571571
}
572572

573-
/* Outputs are only polled while runtime active, so acquiring a
574-
* runtime PM ref here is unnecessary (and would deadlock upon
575-
* runtime suspend because it waits for polling to finish).
573+
/* Outputs are only polled while runtime active, so resuming the
574+
* device here is unnecessary (and would deadlock upon runtime suspend
575+
* because it waits for polling to finish). We do however, want to
576+
* prevent the autosuspend timer from elapsing during this operation
577+
* if possible.
576578
*/
577-
if (!drm_kms_helper_is_poll_worker()) {
578-
ret = pm_runtime_get_sync(connector->dev->dev);
579+
if (drm_kms_helper_is_poll_worker()) {
580+
pm_runtime_get_noresume(dev->dev);
581+
} else {
582+
ret = pm_runtime_get_sync(dev->dev);
579583
if (ret < 0 && ret != -EACCES)
580584
return conn_status;
581585
}
@@ -653,10 +657,8 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
653657

654658
out:
655659

656-
if (!drm_kms_helper_is_poll_worker()) {
657-
pm_runtime_mark_last_busy(connector->dev->dev);
658-
pm_runtime_put_autosuspend(connector->dev->dev);
659-
}
660+
pm_runtime_mark_last_busy(dev->dev);
661+
pm_runtime_put_autosuspend(dev->dev);
660662

661663
return conn_status;
662664
}
@@ -1120,6 +1122,26 @@ nouveau_connector_hotplug(struct nvif_notify *notify)
11201122
const struct nvif_notify_conn_rep_v0 *rep = notify->data;
11211123
const char *name = connector->name;
11221124
struct nouveau_encoder *nv_encoder;
1125+
int ret;
1126+
1127+
ret = pm_runtime_get(drm->dev->dev);
1128+
if (ret == 0) {
1129+
/* We can't block here if there's a pending PM request
1130+
* running, as we'll deadlock nouveau_display_fini() when it
1131+
* calls nvif_put() on our nvif_notify struct. So, simply
1132+
* defer the hotplug event until the device finishes resuming
1133+
*/
1134+
NV_DEBUG(drm, "Deferring HPD on %s until runtime resume\n",
1135+
name);
1136+
schedule_work(&drm->hpd_work);
1137+
1138+
pm_runtime_put_noidle(drm->dev->dev);
1139+
return NVIF_NOTIFY_KEEP;
1140+
} else if (ret != 1 && ret != -EACCES) {
1141+
NV_WARN(drm, "HPD on %s dropped due to RPM failure: %d\n",
1142+
name, ret);
1143+
return NVIF_NOTIFY_DROP;
1144+
}
11231145

11241146
if (rep->mask & NVIF_NOTIFY_CONN_V0_IRQ) {
11251147
NV_DEBUG(drm, "service %s\n", name);
@@ -1137,6 +1159,8 @@ nouveau_connector_hotplug(struct nvif_notify *notify)
11371159
drm_helper_hpd_irq_event(connector->dev);
11381160
}
11391161

1162+
pm_runtime_mark_last_busy(drm->dev->dev);
1163+
pm_runtime_put_autosuspend(drm->dev->dev);
11401164
return NVIF_NOTIFY_KEEP;
11411165
}
11421166

drivers/gpu/drm/nouveau/nouveau_display.c

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,6 @@ nouveau_display_hpd_work(struct work_struct *work)
356356
pm_runtime_get_sync(drm->dev->dev);
357357

358358
drm_helper_hpd_irq_event(drm->dev);
359-
/* enable polling for external displays */
360-
drm_kms_helper_poll_enable(drm->dev);
361359

362360
pm_runtime_mark_last_busy(drm->dev->dev);
363361
pm_runtime_put_sync(drm->dev->dev);
@@ -380,15 +378,29 @@ nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val,
380378
{
381379
struct nouveau_drm *drm = container_of(nb, typeof(*drm), acpi_nb);
382380
struct acpi_bus_event *info = data;
381+
int ret;
383382

384383
if (!strcmp(info->device_class, ACPI_VIDEO_CLASS)) {
385384
if (info->type == ACPI_VIDEO_NOTIFY_PROBE) {
386-
/*
387-
* This may be the only indication we receive of a
388-
* connector hotplug on a runtime suspended GPU,
389-
* schedule hpd_work to check.
390-
*/
391-
schedule_work(&drm->hpd_work);
385+
ret = pm_runtime_get(drm->dev->dev);
386+
if (ret == 1 || ret == -EACCES) {
387+
/* If the GPU is already awake, or in a state
388+
* where we can't wake it up, it can handle
389+
* it's own hotplug events.
390+
*/
391+
pm_runtime_put_autosuspend(drm->dev->dev);
392+
} else if (ret == 0) {
393+
/* This may be the only indication we receive
394+
* of a connector hotplug on a runtime
395+
* suspended GPU, schedule hpd_work to check.
396+
*/
397+
NV_DEBUG(drm, "ACPI requested connector reprobe\n");
398+
schedule_work(&drm->hpd_work);
399+
pm_runtime_put_noidle(drm->dev->dev);
400+
} else {
401+
NV_WARN(drm, "Dropped ACPI reprobe event due to RPM error: %d\n",
402+
ret);
403+
}
392404

393405
/* acpi-video should not generate keypresses for this */
394406
return NOTIFY_BAD;
@@ -412,6 +424,11 @@ nouveau_display_init(struct drm_device *dev)
412424
if (ret)
413425
return ret;
414426

427+
/* enable connector detection and polling for connectors without HPD
428+
* support
429+
*/
430+
drm_kms_helper_poll_enable(dev);
431+
415432
/* enable hotplug interrupts */
416433
drm_connector_list_iter_begin(dev, &conn_iter);
417434
nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) {
@@ -426,7 +443,7 @@ nouveau_display_init(struct drm_device *dev)
426443
}
427444

428445
void
429-
nouveau_display_fini(struct drm_device *dev, bool suspend)
446+
nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime)
430447
{
431448
struct nouveau_display *disp = nouveau_display(dev);
432449
struct nouveau_drm *drm = nouveau_drm(dev);
@@ -451,6 +468,9 @@ nouveau_display_fini(struct drm_device *dev, bool suspend)
451468
}
452469
drm_connector_list_iter_end(&conn_iter);
453470

471+
if (!runtime)
472+
cancel_work_sync(&drm->hpd_work);
473+
454474
drm_kms_helper_poll_disable(dev);
455475
disp->fini(dev);
456476
}
@@ -640,11 +660,11 @@ nouveau_display_suspend(struct drm_device *dev, bool runtime)
640660
}
641661
}
642662

643-
nouveau_display_fini(dev, true);
663+
nouveau_display_fini(dev, true, runtime);
644664
return 0;
645665
}
646666

647-
nouveau_display_fini(dev, true);
667+
nouveau_display_fini(dev, true, runtime);
648668

649669
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
650670
struct nouveau_framebuffer *nouveau_fb;

drivers/gpu/drm/nouveau/nouveau_display.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ nouveau_display(struct drm_device *dev)
6464
int nouveau_display_create(struct drm_device *dev);
6565
void nouveau_display_destroy(struct drm_device *dev);
6666
int nouveau_display_init(struct drm_device *dev);
67-
void nouveau_display_fini(struct drm_device *dev, bool suspend);
67+
void nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime);
6868
int nouveau_display_suspend(struct drm_device *dev, bool runtime);
6969
void nouveau_display_resume(struct drm_device *dev, bool runtime);
7070
int nouveau_display_vblank_enable(struct drm_device *, unsigned int);

drivers/gpu/drm/nouveau/nouveau_drm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ nouveau_drm_unload(struct drm_device *dev)
546546
nouveau_debugfs_fini(drm);
547547

548548
if (dev->mode_config.num_crtc)
549-
nouveau_display_fini(dev, false);
549+
nouveau_display_fini(dev, false, false);
550550
nouveau_display_destroy(dev);
551551

552552
nouveau_bios_takedown(dev);

drivers/gpu/drm/udl/udl_fb.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,11 @@ static void udl_fbdev_destroy(struct drm_device *dev,
432432
{
433433
drm_fb_helper_unregister_fbi(&ufbdev->helper);
434434
drm_fb_helper_fini(&ufbdev->helper);
435-
drm_framebuffer_unregister_private(&ufbdev->ufb.base);
436-
drm_framebuffer_cleanup(&ufbdev->ufb.base);
437-
drm_gem_object_put_unlocked(&ufbdev->ufb.obj->base);
435+
if (ufbdev->ufb.obj) {
436+
drm_framebuffer_unregister_private(&ufbdev->ufb.base);
437+
drm_framebuffer_cleanup(&ufbdev->ufb.base);
438+
drm_gem_object_put_unlocked(&ufbdev->ufb.obj->base);
439+
}
438440
}
439441

440442
int udl_fbdev_init(struct drm_device *dev)

drivers/gpu/drm/vc4/vc4_plane.c

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
329329
vc4_state->y_scaling[0] = vc4_get_scaling_mode(vc4_state->src_h[0],
330330
vc4_state->crtc_h);
331331

332+
vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
333+
vc4_state->y_scaling[0] == VC4_SCALING_NONE);
334+
332335
if (num_planes > 1) {
333336
vc4_state->is_yuv = true;
334337

@@ -344,24 +347,17 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
344347
vc4_get_scaling_mode(vc4_state->src_h[1],
345348
vc4_state->crtc_h);
346349

347-
/* YUV conversion requires that scaling be enabled,
348-
* even on a plane that's otherwise 1:1. Choose TPZ
349-
* for simplicity.
350+
/* YUV conversion requires that horizontal scaling be enabled,
351+
* even on a plane that's otherwise 1:1. Looks like only PPF
352+
* works in that case, so let's pick that one.
350353
*/
351-
if (vc4_state->x_scaling[0] == VC4_SCALING_NONE)
352-
vc4_state->x_scaling[0] = VC4_SCALING_TPZ;
353-
if (vc4_state->y_scaling[0] == VC4_SCALING_NONE)
354-
vc4_state->y_scaling[0] = VC4_SCALING_TPZ;
354+
if (vc4_state->is_unity)
355+
vc4_state->x_scaling[0] = VC4_SCALING_PPF;
355356
} else {
356357
vc4_state->x_scaling[1] = VC4_SCALING_NONE;
357358
vc4_state->y_scaling[1] = VC4_SCALING_NONE;
358359
}
359360

360-
vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
361-
vc4_state->y_scaling[0] == VC4_SCALING_NONE &&
362-
vc4_state->x_scaling[1] == VC4_SCALING_NONE &&
363-
vc4_state->y_scaling[1] == VC4_SCALING_NONE);
364-
365361
/* No configuring scaling on the cursor plane, since it gets
366362
non-vblank-synced updates, and scaling requires requires
367363
LBM changes which have to be vblank-synced.
@@ -639,7 +635,10 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
639635
vc4_dlist_write(vc4_state, SCALER_CSC2_ITR_R_601_5);
640636
}
641637

642-
if (!vc4_state->is_unity) {
638+
if (vc4_state->x_scaling[0] != VC4_SCALING_NONE ||
639+
vc4_state->x_scaling[1] != VC4_SCALING_NONE ||
640+
vc4_state->y_scaling[0] != VC4_SCALING_NONE ||
641+
vc4_state->y_scaling[1] != VC4_SCALING_NONE) {
643642
/* LBM Base Address. */
644643
if (vc4_state->y_scaling[0] != VC4_SCALING_NONE ||
645644
vc4_state->y_scaling[1] != VC4_SCALING_NONE) {

0 commit comments

Comments
 (0)