Merge tag 'drm-misc-fixes-2020-08-04' of git://anongit.freedesktop.org/drm/drm-misc...
authorDave Airlie <airlied@redhat.com>
Tue, 11 Aug 2020 01:59:19 +0000 (11:59 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 11 Aug 2020 02:00:30 +0000 (12:00 +1000)
 * backmerge from drm-fixes at v5.8-rc7
 * add orientation quirk for ASUS T103HAF
 * drm/omap: force runtime PM suspend on system suspend
 * drm/tidss: fix modeset init for DPI panels
 * re-added docs for drm_gem_flink_ioctl()
 * ttm: fix page-offset calculation within TTM

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200804125510.GA29670@linux-uq9g
drivers/gpu/drm/drm_gem.c
drivers/gpu/drm/drm_panel_orientation_quirks.c
drivers/gpu/drm/omapdrm/dss/dispc.c
drivers/gpu/drm/omapdrm/dss/dsi.c
drivers/gpu/drm/omapdrm/dss/dss.c
drivers/gpu/drm/omapdrm/dss/venc.c
drivers/gpu/drm/tidss/tidss_kms.c
drivers/gpu/drm/ttm/ttm_bo_vm.c

index d4e7c83..19d7386 100644 (file)
@@ -879,6 +879,9 @@ err:
  * @file_priv: drm file-private structure
  *
  * Open an object using the global name, returning a handle and the size.
+ *
+ * This handle (of course) holds a reference to the object, so the object
+ * will not go away until the handle is deleted.
  */
 int
 drm_gem_open_ioctl(struct drm_device *dev, void *data,
index d00ea38..58f5dc2 100644 (file)
@@ -121,6 +121,12 @@ static const struct dmi_system_id orientation_data[] = {
                  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T101HA"),
                },
                .driver_data = (void *)&lcd800x1280_rightside_up,
+       }, {    /* Asus T103HAF */
+               .matches = {
+                 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+                 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T103HAF"),
+               },
+               .driver_data = (void *)&lcd800x1280_rightside_up,
        }, {    /* GPD MicroPC (generic strings, also match on bios date) */
                .matches = {
                  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
index 6639ee9..4859393 100644 (file)
@@ -4915,6 +4915,7 @@ static int dispc_runtime_resume(struct device *dev)
 static const struct dev_pm_ops dispc_pm_ops = {
        .runtime_suspend = dispc_runtime_suspend,
        .runtime_resume = dispc_runtime_resume,
+       SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 struct platform_driver omap_dispchw_driver = {
index 79ddfbf..eeccf40 100644 (file)
@@ -5467,6 +5467,7 @@ static int dsi_runtime_resume(struct device *dev)
 static const struct dev_pm_ops dsi_pm_ops = {
        .runtime_suspend = dsi_runtime_suspend,
        .runtime_resume = dsi_runtime_resume,
+       SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 struct platform_driver omap_dsihw_driver = {
index 4d5739f..6ccbc29 100644 (file)
@@ -1614,6 +1614,7 @@ static int dss_runtime_resume(struct device *dev)
 static const struct dev_pm_ops dss_pm_ops = {
        .runtime_suspend = dss_runtime_suspend,
        .runtime_resume = dss_runtime_resume,
+       SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 struct platform_driver omap_dsshw_driver = {
index 4406ce2..e081793 100644 (file)
@@ -903,6 +903,7 @@ static int venc_runtime_resume(struct device *dev)
 static const struct dev_pm_ops venc_pm_ops = {
        .runtime_suspend = venc_runtime_suspend,
        .runtime_resume = venc_runtime_resume,
+       SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
 };
 
 static const struct of_device_id venc_of_match[] = {
index 808c8af..09485c7 100644 (file)
@@ -154,7 +154,7 @@ static int tidss_dispc_modeset_init(struct tidss_device *tidss)
                                break;
                        case DISPC_VP_DPI:
                                enc_type = DRM_MODE_ENCODER_DPI;
-                               conn_type = DRM_MODE_CONNECTOR_LVDS;
+                               conn_type = DRM_MODE_CONNECTOR_DPI;
                                break;
                        default:
                                WARN_ON(1);
index d7a6537..dd60b96 100644 (file)
@@ -510,8 +510,10 @@ static int ttm_bo_vm_access_kmap(struct ttm_buffer_object *bo,
 int ttm_bo_vm_access(struct vm_area_struct *vma, unsigned long addr,
                     void *buf, int len, int write)
 {
-       unsigned long offset = (addr) - vma->vm_start;
        struct ttm_buffer_object *bo = vma->vm_private_data;
+       unsigned long offset = (addr) - vma->vm_start +
+               ((vma->vm_pgoff - drm_vma_node_start(&bo->base.vma_node))
+                << PAGE_SHIFT);
        int ret;
 
        if (len < 1 || (offset + len) >> PAGE_SHIFT > bo->num_pages)