Commit 15f9d8b8 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'drm-misc-fixes-2020-08-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

 * 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: default avatarDave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200804125510.GA29670@linux-uq9g
parents c44264f9 b5ac98cb
...@@ -879,6 +879,9 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data, ...@@ -879,6 +879,9 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
* @file_priv: drm file-private structure * @file_priv: drm file-private structure
* *
* Open an object using the global name, returning a handle and the size. * 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 int
drm_gem_open_ioctl(struct drm_device *dev, void *data, drm_gem_open_ioctl(struct drm_device *dev, void *data,
......
...@@ -121,6 +121,12 @@ static const struct dmi_system_id orientation_data[] = { ...@@ -121,6 +121,12 @@ static const struct dmi_system_id orientation_data[] = {
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T101HA"), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T101HA"),
}, },
.driver_data = (void *)&lcd800x1280_rightside_up, .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) */ }, { /* GPD MicroPC (generic strings, also match on bios date) */
.matches = { .matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"), DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
......
...@@ -4915,6 +4915,7 @@ static int dispc_runtime_resume(struct device *dev) ...@@ -4915,6 +4915,7 @@ static int dispc_runtime_resume(struct device *dev)
static const struct dev_pm_ops dispc_pm_ops = { static const struct dev_pm_ops dispc_pm_ops = {
.runtime_suspend = dispc_runtime_suspend, .runtime_suspend = dispc_runtime_suspend,
.runtime_resume = dispc_runtime_resume, .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 = { struct platform_driver omap_dispchw_driver = {
......
...@@ -5467,6 +5467,7 @@ static int dsi_runtime_resume(struct device *dev) ...@@ -5467,6 +5467,7 @@ static int dsi_runtime_resume(struct device *dev)
static const struct dev_pm_ops dsi_pm_ops = { static const struct dev_pm_ops dsi_pm_ops = {
.runtime_suspend = dsi_runtime_suspend, .runtime_suspend = dsi_runtime_suspend,
.runtime_resume = dsi_runtime_resume, .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 = { struct platform_driver omap_dsihw_driver = {
......
...@@ -1614,6 +1614,7 @@ static int dss_runtime_resume(struct device *dev) ...@@ -1614,6 +1614,7 @@ static int dss_runtime_resume(struct device *dev)
static const struct dev_pm_ops dss_pm_ops = { static const struct dev_pm_ops dss_pm_ops = {
.runtime_suspend = dss_runtime_suspend, .runtime_suspend = dss_runtime_suspend,
.runtime_resume = dss_runtime_resume, .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 = { struct platform_driver omap_dsshw_driver = {
......
...@@ -903,6 +903,7 @@ static int venc_runtime_resume(struct device *dev) ...@@ -903,6 +903,7 @@ static int venc_runtime_resume(struct device *dev)
static const struct dev_pm_ops venc_pm_ops = { static const struct dev_pm_ops venc_pm_ops = {
.runtime_suspend = venc_runtime_suspend, .runtime_suspend = venc_runtime_suspend,
.runtime_resume = venc_runtime_resume, .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[] = { static const struct of_device_id venc_of_match[] = {
......
...@@ -154,7 +154,7 @@ static int tidss_dispc_modeset_init(struct tidss_device *tidss) ...@@ -154,7 +154,7 @@ static int tidss_dispc_modeset_init(struct tidss_device *tidss)
break; break;
case DISPC_VP_DPI: case DISPC_VP_DPI:
enc_type = DRM_MODE_ENCODER_DPI; enc_type = DRM_MODE_ENCODER_DPI;
conn_type = DRM_MODE_CONNECTOR_LVDS; conn_type = DRM_MODE_CONNECTOR_DPI;
break; break;
default: default:
WARN_ON(1); WARN_ON(1);
......
...@@ -510,8 +510,10 @@ static int ttm_bo_vm_access_kmap(struct ttm_buffer_object *bo, ...@@ -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, int ttm_bo_vm_access(struct vm_area_struct *vma, unsigned long addr,
void *buf, int len, int write) void *buf, int len, int write)
{ {
unsigned long offset = (addr) - vma->vm_start;
struct ttm_buffer_object *bo = vma->vm_private_data; 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; int ret;
if (len < 1 || (offset + len) >> PAGE_SHIFT > bo->num_pages) if (len < 1 || (offset + len) >> PAGE_SHIFT > bo->num_pages)
......
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