Home Home > GIT Browse > SLE15-SP2
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-08-23 13:23:03 +0200
committerTakashi Iwai <tiwai@suse.de>2019-08-23 14:16:58 +0200
commitf21af72c0660b263156b890e213e5354485b8f14 (patch)
tree4a1cf1e5d607c2cc90b5371e56e468604436b56c
parentde3aa2b7c93551092a4aca42f28dd428a64eeda3 (diff)
Revive some downstream DRM patches and delete obsoleted patches
Refreshed for 5.3: patches.suse/drm-i915-Disable-tv-output-on-i9x5gm patches.suse/drm-mgag200-Implement-basic-PM-support Deleted, as no longer needed for 5.3: patches.suse/HID-quirks-fix-support-for-Apple-Magic-Keyboards.patch patches.suse/Input-synaptics-Add-intertouch-blacklist-for-Thinkpa.patch patches.suse/drm-i915-CVE-2018-20669-access-check.patch patches.suse/kernel-Export-mm_access.patch patches.suse/mmc-version-check-printk-downgrade patches.suse/tpm-Downgrade-error-level patches.suse/tty-Don-t-return-EAGAIN-in-blocking-read.patch suse-commit: d9bc0ec8e8b613ee53c49c588db4a7aecc630ae5
-rw-r--r--drivers/ata/libata-sff.c10
-rw-r--r--drivers/gpu/drm/i915/i915_pci.c8
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_drv.c34
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h2
-rw-r--r--drivers/pci/pci.c2
5 files changed, 46 insertions, 10 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 4f115adb4ee8..41ad4baa7592 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1261,9 +1261,8 @@ void ata_sff_flush_pio_task(struct ata_port *ap)
*/
spin_lock_irq(ap->lock);
ap->hsm_task_state = HSM_ST_IDLE;
- spin_unlock_irq(ap->lock);
-
ap->sff_pio_task_link = NULL;
+ spin_unlock_irq(ap->lock);
if (ata_msg_ctl(ap))
ata_port_dbg(ap, "%s: EXIT\n", __func__);
@@ -1273,14 +1272,17 @@ static void ata_sff_pio_task(struct work_struct *work)
{
struct ata_port *ap =
container_of(work, struct ata_port, sff_pio_task.work);
- struct ata_link *link = ap->sff_pio_task_link;
+ struct ata_link *link;
struct ata_queued_cmd *qc;
u8 status;
int poll_next;
spin_lock_irq(ap->lock);
- BUG_ON(ap->sff_pio_task_link == NULL);
+ link = ap->sff_pio_task_link;
+ if (WARN_ON(!link))
+ goto out_unlock;
+
/* qc can be NULL if timeout occurred */
qc = ata_qc_from_tag(ap, link->active_tag);
if (!qc) {
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 6c9f46fc3e12..810bfe29c0a9 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -232,7 +232,7 @@ static const struct intel_device_info intel_i915gm_info = {
.display.cursor_needs_physical = 1,
.display.has_overlay = 1,
.display.overlay_needs_physical = 1,
- .display.supports_tv = 1,
+ /* .display.supports_tv = 1, */ /* causes vblank mess (bsc#1086657) */
.display.has_fbc = 1,
.hws_needs_physical = 1,
.unfenced_needs_alignment = 1,
@@ -257,7 +257,7 @@ static const struct intel_device_info intel_i945gm_info = {
.display.cursor_needs_physical = 1,
.display.has_overlay = 1,
.display.overlay_needs_physical = 1,
- .display.supports_tv = 1,
+ /* .display.supports_tv = 1, */ /* causes vblank mess (bsc#1086657) */
.display.has_fbc = 1,
.hws_needs_physical = 1,
.unfenced_needs_alignment = 1,
@@ -313,7 +313,7 @@ static const struct intel_device_info intel_i965gm_info = {
.is_mobile = 1,
.display.has_fbc = 1,
.display.has_overlay = 1,
- .display.supports_tv = 1,
+ /* .display.supports_tv = 1, */ /* causes vblank mess (bsc#1086657) */
.hws_needs_physical = 1,
.has_snoop = false,
};
@@ -330,7 +330,7 @@ static const struct intel_device_info intel_gm45_info = {
PLATFORM(INTEL_GM45),
.is_mobile = 1,
.display.has_fbc = 1,
- .display.supports_tv = 1,
+ /* .display.supports_tv = 1, */ /* causes vblank mess (bsc#1086657) */
.engine_mask = BIT(RCS0) | BIT(VCS0),
.gpu_reset_clobbers_display = false,
};
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index aafa1cb31f50..83681341daa4 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -8,6 +8,8 @@
#include <linux/module.h>
#include <linux/console.h>
#include <drm/drmP.h>
+#include <drm/drm_crtc_helper.h>
+#include <drm/drm_probe_helper.h>
#include "mgag200_drv.h"
@@ -54,6 +56,37 @@ static void mga_pci_remove(struct pci_dev *pdev)
drm_put_dev(dev);
}
+#ifdef CONFIG_PM_SLEEP
+static int mgag200_pm_suspend(struct device *dev)
+{
+ struct drm_device *drm_dev = dev_get_drvdata(dev);
+ struct mga_device *mdev = drm_dev->dev_private;
+
+ drm_kms_helper_poll_disable(drm_dev);
+ if (mdev->mfbdev)
+ drm_fb_helper_set_suspend_unlocked(&mdev->mfbdev->helper, 1);
+
+ return 0;
+}
+
+static int mgag200_pm_resume(struct device *dev)
+{
+ struct drm_device *drm_dev = dev_get_drvdata(dev);
+ struct mga_device *mdev = drm_dev->dev_private;
+
+ drm_helper_resume_force_mode(drm_dev);
+ if (mdev->mfbdev)
+ drm_fb_helper_set_suspend_unlocked(&mdev->mfbdev->helper, 0);
+ drm_kms_helper_poll_enable(drm_dev);
+
+ return 0;
+}
+#endif
+
+static const struct dev_pm_ops mgag200_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(mgag200_pm_suspend, mgag200_pm_resume)
+};
+
static const struct file_operations mgag200_driver_fops = {
.owner = THIS_MODULE,
DRM_VRAM_MM_FILE_OPERATIONS
@@ -78,6 +111,7 @@ static struct pci_driver mgag200_pci_driver = {
.id_table = pciidlist,
.probe = mga_pci_probe,
.remove = mga_pci_remove,
+ .driver.pm = &mgag200_pm_ops,
};
static int __init mgag200_init(void)
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h
index a8c21c6c800b..f609891dd641 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h
@@ -60,7 +60,7 @@ s64 nvkm_timer_wait_test(struct nvkm_timer_wait *);
} while ((_taken = nvkm_timer_wait_test(&_wait)) >= 0); \
\
if (_warn && _taken < 0) \
- dev_WARN(_wait.tmr->subdev.device->dev, "timeout\n"); \
+ dev_info(_wait.tmr->subdev.device->dev, "timeout\n"); \
_taken; \
})
#define nvkm_usec(d,u,cond...) nvkm_nsec((d), (u) * 1000, ##cond)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 1b27b5af3d55..7f61d7b7f280 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1443,7 +1443,7 @@ static void pci_restore_rebar_state(struct pci_dev *pdev)
pci_read_config_dword(pdev, pos + PCI_REBAR_CTRL, &ctrl);
bar_idx = ctrl & PCI_REBAR_CTRL_BAR_IDX;
res = pdev->resource + bar_idx;
- size = order_base_2((resource_size(res) >> 20) | 1) - 1;
+ size = ilog2(resource_size(res)) - 20;
ctrl &= ~PCI_REBAR_CTRL_BAR_SIZE;
ctrl |= size << PCI_REBAR_CTRL_BAR_SHIFT;
pci_write_config_dword(pdev, pos + PCI_REBAR_CTRL, ctrl);