diff options
| -rw-r--r-- | drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 16 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_ddi.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/imx/ipuv3-crtc.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/scheduler/sched_main.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_drv.c | 9 | ||||
| -rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 10 | ||||
| -rw-r--r-- | drivers/gpu/drm/ttm/ttm_memory.c | 5 | ||||
| -rw-r--r-- | drivers/gpu/drm/vc4/vc4_crtc.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 33 | ||||
| -rw-r--r-- | drivers/gpu/ipu-v3/ipu-dp.c | 12 | ||||
| -rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 1 |
12 files changed, 53 insertions, 52 deletions
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index db761329a1e3..ab7968c8f6a2 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | |||
| @@ -1046,6 +1046,10 @@ static bool dw_hdmi_support_scdc(struct dw_hdmi *hdmi) | |||
| 1046 | if (hdmi->version < 0x200a) | 1046 | if (hdmi->version < 0x200a) |
| 1047 | return false; | 1047 | return false; |
| 1048 | 1048 | ||
| 1049 | /* Disable if no DDC bus */ | ||
| 1050 | if (!hdmi->ddc) | ||
| 1051 | return false; | ||
| 1052 | |||
| 1049 | /* Disable if SCDC is not supported, or if an HF-VSDB block is absent */ | 1053 | /* Disable if SCDC is not supported, or if an HF-VSDB block is absent */ |
| 1050 | if (!display->hdmi.scdc.supported || | 1054 | if (!display->hdmi.scdc.supported || |
| 1051 | !display->hdmi.scdc.scrambling.supported) | 1055 | !display->hdmi.scdc.scrambling.supported) |
| @@ -1684,13 +1688,13 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi, | |||
| 1684 | * Source Devices compliant shall set the | 1688 | * Source Devices compliant shall set the |
| 1685 | * Source Version = 1. | 1689 | * Source Version = 1. |
| 1686 | */ | 1690 | */ |
| 1687 | drm_scdc_readb(&hdmi->i2c->adap, SCDC_SINK_VERSION, | 1691 | drm_scdc_readb(hdmi->ddc, SCDC_SINK_VERSION, |
| 1688 | &bytes); | 1692 | &bytes); |
| 1689 | drm_scdc_writeb(&hdmi->i2c->adap, SCDC_SOURCE_VERSION, | 1693 | drm_scdc_writeb(hdmi->ddc, SCDC_SOURCE_VERSION, |
| 1690 | min_t(u8, bytes, SCDC_MIN_SOURCE_VERSION)); | 1694 | min_t(u8, bytes, SCDC_MIN_SOURCE_VERSION)); |
| 1691 | 1695 | ||
| 1692 | /* Enabled Scrambling in the Sink */ | 1696 | /* Enabled Scrambling in the Sink */ |
| 1693 | drm_scdc_set_scrambling(&hdmi->i2c->adap, 1); | 1697 | drm_scdc_set_scrambling(hdmi->ddc, 1); |
| 1694 | 1698 | ||
| 1695 | /* | 1699 | /* |
| 1696 | * To activate the scrambler feature, you must ensure | 1700 | * To activate the scrambler feature, you must ensure |
| @@ -1706,7 +1710,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi, | |||
| 1706 | hdmi_writeb(hdmi, 0, HDMI_FC_SCRAMBLER_CTRL); | 1710 | hdmi_writeb(hdmi, 0, HDMI_FC_SCRAMBLER_CTRL); |
| 1707 | hdmi_writeb(hdmi, (u8)~HDMI_MC_SWRSTZ_TMDSSWRST_REQ, | 1711 | hdmi_writeb(hdmi, (u8)~HDMI_MC_SWRSTZ_TMDSSWRST_REQ, |
| 1708 | HDMI_MC_SWRSTZ); | 1712 | HDMI_MC_SWRSTZ); |
| 1709 | drm_scdc_set_scrambling(&hdmi->i2c->adap, 0); | 1713 | drm_scdc_set_scrambling(hdmi->ddc, 0); |
| 1710 | } | 1714 | } |
| 1711 | } | 1715 | } |
| 1712 | 1716 | ||
| @@ -1800,6 +1804,8 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi) | |||
| 1800 | * iteration for others. | 1804 | * iteration for others. |
| 1801 | * The Amlogic Meson GX SoCs (v2.01a) have been identified as needing | 1805 | * The Amlogic Meson GX SoCs (v2.01a) have been identified as needing |
| 1802 | * the workaround with a single iteration. | 1806 | * the workaround with a single iteration. |
| 1807 | * The Rockchip RK3288 SoC (v2.00a) and RK3328/RK3399 SoCs (v2.11a) have | ||
| 1808 | * been identified as needing the workaround with a single iteration. | ||
| 1803 | */ | 1809 | */ |
| 1804 | 1810 | ||
| 1805 | switch (hdmi->version) { | 1811 | switch (hdmi->version) { |
| @@ -1808,7 +1814,9 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi) | |||
| 1808 | break; | 1814 | break; |
| 1809 | case 0x131a: | 1815 | case 0x131a: |
| 1810 | case 0x132a: | 1816 | case 0x132a: |
| 1817 | case 0x200a: | ||
| 1811 | case 0x201a: | 1818 | case 0x201a: |
| 1819 | case 0x211a: | ||
| 1812 | case 0x212a: | 1820 | case 0x212a: |
| 1813 | count = 1; | 1821 | count = 1; |
| 1814 | break; | 1822 | break; |
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index ab4e60dfd6a3..98cea1f4b3bf 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c | |||
| @@ -3862,14 +3862,16 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder, | |||
| 3862 | ret = intel_hdmi_compute_config(encoder, pipe_config, conn_state); | 3862 | ret = intel_hdmi_compute_config(encoder, pipe_config, conn_state); |
| 3863 | else | 3863 | else |
| 3864 | ret = intel_dp_compute_config(encoder, pipe_config, conn_state); | 3864 | ret = intel_dp_compute_config(encoder, pipe_config, conn_state); |
| 3865 | if (ret) | ||
| 3866 | return ret; | ||
| 3865 | 3867 | ||
| 3866 | if (IS_GEN9_LP(dev_priv) && ret) | 3868 | if (IS_GEN9_LP(dev_priv)) |
| 3867 | pipe_config->lane_lat_optim_mask = | 3869 | pipe_config->lane_lat_optim_mask = |
| 3868 | bxt_ddi_phy_calc_lane_lat_optim_mask(pipe_config->lane_count); | 3870 | bxt_ddi_phy_calc_lane_lat_optim_mask(pipe_config->lane_count); |
| 3869 | 3871 | ||
| 3870 | intel_ddi_compute_min_voltage_level(dev_priv, pipe_config); | 3872 | intel_ddi_compute_min_voltage_level(dev_priv, pipe_config); |
| 3871 | 3873 | ||
| 3872 | return ret; | 3874 | return 0; |
| 3873 | 3875 | ||
| 3874 | } | 3876 | } |
| 3875 | 3877 | ||
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 8891f29a8c7f..48da4a969a0a 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
| @@ -1886,6 +1886,9 @@ static int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, | |||
| 1886 | int pipe_bpp; | 1886 | int pipe_bpp; |
| 1887 | int ret; | 1887 | int ret; |
| 1888 | 1888 | ||
| 1889 | pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) && | ||
| 1890 | intel_dp_supports_fec(intel_dp, pipe_config); | ||
| 1891 | |||
| 1889 | if (!intel_dp_supports_dsc(intel_dp, pipe_config)) | 1892 | if (!intel_dp_supports_dsc(intel_dp, pipe_config)) |
| 1890 | return -EINVAL; | 1893 | return -EINVAL; |
| 1891 | 1894 | ||
| @@ -2116,9 +2119,6 @@ intel_dp_compute_config(struct intel_encoder *encoder, | |||
| 2116 | if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK) | 2119 | if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK) |
| 2117 | return -EINVAL; | 2120 | return -EINVAL; |
| 2118 | 2121 | ||
| 2119 | pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) && | ||
| 2120 | intel_dp_supports_fec(intel_dp, pipe_config); | ||
| 2121 | |||
| 2122 | ret = intel_dp_compute_link_config(encoder, pipe_config, conn_state); | 2122 | ret = intel_dp_compute_link_config(encoder, pipe_config, conn_state); |
| 2123 | if (ret < 0) | 2123 | if (ret < 0) |
| 2124 | return ret; | 2124 | return ret; |
diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c index ec3602ebbc1c..54011df8c2e8 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c | |||
| @@ -71,7 +71,7 @@ static void ipu_crtc_disable_planes(struct ipu_crtc *ipu_crtc, | |||
| 71 | if (disable_partial) | 71 | if (disable_partial) |
| 72 | ipu_plane_disable(ipu_crtc->plane[1], true); | 72 | ipu_plane_disable(ipu_crtc->plane[1], true); |
| 73 | if (disable_full) | 73 | if (disable_full) |
| 74 | ipu_plane_disable(ipu_crtc->plane[0], false); | 74 | ipu_plane_disable(ipu_crtc->plane[0], true); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | static void ipu_crtc_atomic_disable(struct drm_crtc *crtc, | 77 | static void ipu_crtc_atomic_disable(struct drm_crtc *crtc, |
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 19fc601c9eeb..a1bec2779e76 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c | |||
| @@ -366,10 +366,9 @@ void drm_sched_increase_karma(struct drm_sched_job *bad) | |||
| 366 | EXPORT_SYMBOL(drm_sched_increase_karma); | 366 | EXPORT_SYMBOL(drm_sched_increase_karma); |
| 367 | 367 | ||
| 368 | /** | 368 | /** |
| 369 | * drm_sched_hw_job_reset - stop the scheduler if it contains the bad job | 369 | * drm_sched_stop - stop the scheduler |
| 370 | * | 370 | * |
| 371 | * @sched: scheduler instance | 371 | * @sched: scheduler instance |
| 372 | * @bad: bad scheduler job | ||
| 373 | * | 372 | * |
| 374 | */ | 373 | */ |
| 375 | void drm_sched_stop(struct drm_gpu_scheduler *sched) | 374 | void drm_sched_stop(struct drm_gpu_scheduler *sched) |
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index 3ebd9f5e2719..29258b404e54 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/of_reserved_mem.h> | 16 | #include <linux/of_reserved_mem.h> |
| 17 | 17 | ||
| 18 | #include <drm/drmP.h> | 18 | #include <drm/drmP.h> |
| 19 | #include <drm/drm_atomic_helper.h> | ||
| 19 | #include <drm/drm_fb_cma_helper.h> | 20 | #include <drm/drm_fb_cma_helper.h> |
| 20 | #include <drm/drm_fb_helper.h> | 21 | #include <drm/drm_fb_helper.h> |
| 21 | #include <drm/drm_gem_cma_helper.h> | 22 | #include <drm/drm_gem_cma_helper.h> |
| @@ -85,6 +86,8 @@ static int sun4i_drv_bind(struct device *dev) | |||
| 85 | ret = -ENOMEM; | 86 | ret = -ENOMEM; |
| 86 | goto free_drm; | 87 | goto free_drm; |
| 87 | } | 88 | } |
| 89 | |||
| 90 | dev_set_drvdata(dev, drm); | ||
| 88 | drm->dev_private = drv; | 91 | drm->dev_private = drv; |
| 89 | INIT_LIST_HEAD(&drv->frontend_list); | 92 | INIT_LIST_HEAD(&drv->frontend_list); |
| 90 | INIT_LIST_HEAD(&drv->engine_list); | 93 | INIT_LIST_HEAD(&drv->engine_list); |
| @@ -144,8 +147,12 @@ static void sun4i_drv_unbind(struct device *dev) | |||
| 144 | 147 | ||
| 145 | drm_dev_unregister(drm); | 148 | drm_dev_unregister(drm); |
| 146 | drm_kms_helper_poll_fini(drm); | 149 | drm_kms_helper_poll_fini(drm); |
| 150 | drm_atomic_helper_shutdown(drm); | ||
| 147 | drm_mode_config_cleanup(drm); | 151 | drm_mode_config_cleanup(drm); |
| 152 | |||
| 153 | component_unbind_all(dev, NULL); | ||
| 148 | of_reserved_mem_device_release(dev); | 154 | of_reserved_mem_device_release(dev); |
| 155 | |||
| 149 | drm_dev_put(drm); | 156 | drm_dev_put(drm); |
| 150 | } | 157 | } |
| 151 | 158 | ||
| @@ -395,6 +402,8 @@ static int sun4i_drv_probe(struct platform_device *pdev) | |||
| 395 | 402 | ||
| 396 | static int sun4i_drv_remove(struct platform_device *pdev) | 403 | static int sun4i_drv_remove(struct platform_device *pdev) |
| 397 | { | 404 | { |
| 405 | component_master_del(&pdev->dev, &sun4i_drv_master_ops); | ||
| 406 | |||
| 398 | return 0; | 407 | return 0; |
| 399 | } | 408 | } |
| 400 | 409 | ||
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 0fa5034b9f9e..1a01669b159a 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
| @@ -49,9 +49,8 @@ static void ttm_bo_global_kobj_release(struct kobject *kobj); | |||
| 49 | * ttm_global_mutex - protecting the global BO state | 49 | * ttm_global_mutex - protecting the global BO state |
| 50 | */ | 50 | */ |
| 51 | DEFINE_MUTEX(ttm_global_mutex); | 51 | DEFINE_MUTEX(ttm_global_mutex); |
| 52 | struct ttm_bo_global ttm_bo_glob = { | 52 | unsigned ttm_bo_glob_use_count; |
| 53 | .use_count = 0 | 53 | struct ttm_bo_global ttm_bo_glob; |
| 54 | }; | ||
| 55 | 54 | ||
| 56 | static struct attribute ttm_bo_count = { | 55 | static struct attribute ttm_bo_count = { |
| 57 | .name = "bo_count", | 56 | .name = "bo_count", |
| @@ -1531,12 +1530,13 @@ static void ttm_bo_global_release(void) | |||
| 1531 | struct ttm_bo_global *glob = &ttm_bo_glob; | 1530 | struct ttm_bo_global *glob = &ttm_bo_glob; |
| 1532 | 1531 | ||
| 1533 | mutex_lock(&ttm_global_mutex); | 1532 | mutex_lock(&ttm_global_mutex); |
| 1534 | if (--glob->use_count > 0) | 1533 | if (--ttm_bo_glob_use_count > 0) |
| 1535 | goto out; | 1534 | goto out; |
| 1536 | 1535 | ||
| 1537 | kobject_del(&glob->kobj); | 1536 | kobject_del(&glob->kobj); |
| 1538 | kobject_put(&glob->kobj); | 1537 | kobject_put(&glob->kobj); |
| 1539 | ttm_mem_global_release(&ttm_mem_glob); | 1538 | ttm_mem_global_release(&ttm_mem_glob); |
| 1539 | memset(glob, 0, sizeof(*glob)); | ||
| 1540 | out: | 1540 | out: |
| 1541 | mutex_unlock(&ttm_global_mutex); | 1541 | mutex_unlock(&ttm_global_mutex); |
| 1542 | } | 1542 | } |
| @@ -1548,7 +1548,7 @@ static int ttm_bo_global_init(void) | |||
| 1548 | unsigned i; | 1548 | unsigned i; |
| 1549 | 1549 | ||
| 1550 | mutex_lock(&ttm_global_mutex); | 1550 | mutex_lock(&ttm_global_mutex); |
| 1551 | if (++glob->use_count > 1) | 1551 | if (++ttm_bo_glob_use_count > 1) |
| 1552 | goto out; | 1552 | goto out; |
| 1553 | 1553 | ||
| 1554 | ret = ttm_mem_global_init(&ttm_mem_glob); | 1554 | ret = ttm_mem_global_init(&ttm_mem_glob); |
diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index f1567c353b54..9a0909decb36 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c | |||
| @@ -461,8 +461,8 @@ out_no_zone: | |||
| 461 | 461 | ||
| 462 | void ttm_mem_global_release(struct ttm_mem_global *glob) | 462 | void ttm_mem_global_release(struct ttm_mem_global *glob) |
| 463 | { | 463 | { |
| 464 | unsigned int i; | ||
| 465 | struct ttm_mem_zone *zone; | 464 | struct ttm_mem_zone *zone; |
| 465 | unsigned int i; | ||
| 466 | 466 | ||
| 467 | /* let the page allocator first stop the shrink work. */ | 467 | /* let the page allocator first stop the shrink work. */ |
| 468 | ttm_page_alloc_fini(); | 468 | ttm_page_alloc_fini(); |
| @@ -475,9 +475,10 @@ void ttm_mem_global_release(struct ttm_mem_global *glob) | |||
| 475 | zone = glob->zones[i]; | 475 | zone = glob->zones[i]; |
| 476 | kobject_del(&zone->kobj); | 476 | kobject_del(&zone->kobj); |
| 477 | kobject_put(&zone->kobj); | 477 | kobject_put(&zone->kobj); |
| 478 | } | 478 | } |
| 479 | kobject_del(&glob->kobj); | 479 | kobject_del(&glob->kobj); |
| 480 | kobject_put(&glob->kobj); | 480 | kobject_put(&glob->kobj); |
| 481 | memset(glob, 0, sizeof(*glob)); | ||
| 481 | } | 482 | } |
| 482 | 483 | ||
| 483 | static void ttm_check_swapping(struct ttm_mem_global *glob) | 484 | static void ttm_check_swapping(struct ttm_mem_global *glob) |
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index 730008d3da76..1baa10e94484 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c | |||
| @@ -1042,7 +1042,7 @@ static void | |||
| 1042 | vc4_crtc_reset(struct drm_crtc *crtc) | 1042 | vc4_crtc_reset(struct drm_crtc *crtc) |
| 1043 | { | 1043 | { |
| 1044 | if (crtc->state) | 1044 | if (crtc->state) |
| 1045 | __drm_atomic_helper_crtc_destroy_state(crtc->state); | 1045 | vc4_crtc_destroy_state(crtc, crtc->state); |
| 1046 | 1046 | ||
| 1047 | crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL); | 1047 | crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL); |
| 1048 | if (crtc->state) | 1048 | if (crtc->state) |
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 6165fe2c4504..1bfa353d995c 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | |||
| @@ -546,29 +546,13 @@ static void vmw_get_initial_size(struct vmw_private *dev_priv) | |||
| 546 | } | 546 | } |
| 547 | 547 | ||
| 548 | /** | 548 | /** |
| 549 | * vmw_assume_iommu - Figure out whether coherent dma-remapping might be | ||
| 550 | * taking place. | ||
| 551 | * @dev: Pointer to the struct drm_device. | ||
| 552 | * | ||
| 553 | * Return: true if iommu present, false otherwise. | ||
| 554 | */ | ||
| 555 | static bool vmw_assume_iommu(struct drm_device *dev) | ||
| 556 | { | ||
| 557 | const struct dma_map_ops *ops = get_dma_ops(dev->dev); | ||
| 558 | |||
| 559 | return !dma_is_direct(ops) && ops && | ||
| 560 | ops->map_page != dma_direct_map_page; | ||
| 561 | } | ||
| 562 | |||
| 563 | /** | ||
| 564 | * vmw_dma_select_mode - Determine how DMA mappings should be set up for this | 549 | * vmw_dma_select_mode - Determine how DMA mappings should be set up for this |
| 565 | * system. | 550 | * system. |
| 566 | * | 551 | * |
| 567 | * @dev_priv: Pointer to a struct vmw_private | 552 | * @dev_priv: Pointer to a struct vmw_private |
| 568 | * | 553 | * |
| 569 | * This functions tries to determine the IOMMU setup and what actions | 554 | * This functions tries to determine what actions need to be taken by the |
| 570 | * need to be taken by the driver to make system pages visible to the | 555 | * driver to make system pages visible to the device. |
| 571 | * device. | ||
| 572 | * If this function decides that DMA is not possible, it returns -EINVAL. | 556 | * If this function decides that DMA is not possible, it returns -EINVAL. |
| 573 | * The driver may then try to disable features of the device that require | 557 | * The driver may then try to disable features of the device that require |
| 574 | * DMA. | 558 | * DMA. |
| @@ -578,23 +562,16 @@ static int vmw_dma_select_mode(struct vmw_private *dev_priv) | |||
| 578 | static const char *names[vmw_dma_map_max] = { | 562 | static const char *names[vmw_dma_map_max] = { |
| 579 | [vmw_dma_phys] = "Using physical TTM page addresses.", | 563 | [vmw_dma_phys] = "Using physical TTM page addresses.", |
| 580 | [vmw_dma_alloc_coherent] = "Using coherent TTM pages.", | 564 | [vmw_dma_alloc_coherent] = "Using coherent TTM pages.", |
| 581 | [vmw_dma_map_populate] = "Keeping DMA mappings.", | 565 | [vmw_dma_map_populate] = "Caching DMA mappings.", |
| 582 | [vmw_dma_map_bind] = "Giving up DMA mappings early."}; | 566 | [vmw_dma_map_bind] = "Giving up DMA mappings early."}; |
| 583 | 567 | ||
| 584 | if (vmw_force_coherent) | 568 | if (vmw_force_coherent) |
| 585 | dev_priv->map_mode = vmw_dma_alloc_coherent; | 569 | dev_priv->map_mode = vmw_dma_alloc_coherent; |
| 586 | else if (vmw_assume_iommu(dev_priv->dev)) | 570 | else if (vmw_restrict_iommu) |
| 587 | dev_priv->map_mode = vmw_dma_map_populate; | 571 | dev_priv->map_mode = vmw_dma_map_bind; |
| 588 | else if (!vmw_force_iommu) | ||
| 589 | dev_priv->map_mode = vmw_dma_phys; | ||
| 590 | else if (IS_ENABLED(CONFIG_SWIOTLB) && swiotlb_nr_tbl()) | ||
| 591 | dev_priv->map_mode = vmw_dma_alloc_coherent; | ||
| 592 | else | 572 | else |
| 593 | dev_priv->map_mode = vmw_dma_map_populate; | 573 | dev_priv->map_mode = vmw_dma_map_populate; |
| 594 | 574 | ||
| 595 | if (dev_priv->map_mode == vmw_dma_map_populate && vmw_restrict_iommu) | ||
| 596 | dev_priv->map_mode = vmw_dma_map_bind; | ||
| 597 | |||
| 598 | /* No TTM coherent page pool? FIXME: Ask TTM instead! */ | 575 | /* No TTM coherent page pool? FIXME: Ask TTM instead! */ |
| 599 | if (!(IS_ENABLED(CONFIG_SWIOTLB) || IS_ENABLED(CONFIG_INTEL_IOMMU)) && | 576 | if (!(IS_ENABLED(CONFIG_SWIOTLB) || IS_ENABLED(CONFIG_INTEL_IOMMU)) && |
| 600 | (dev_priv->map_mode == vmw_dma_alloc_coherent)) | 577 | (dev_priv->map_mode == vmw_dma_alloc_coherent)) |
diff --git a/drivers/gpu/ipu-v3/ipu-dp.c b/drivers/gpu/ipu-v3/ipu-dp.c index 9b2b3fa479c4..5e44ff1f2085 100644 --- a/drivers/gpu/ipu-v3/ipu-dp.c +++ b/drivers/gpu/ipu-v3/ipu-dp.c | |||
| @@ -195,7 +195,8 @@ int ipu_dp_setup_channel(struct ipu_dp *dp, | |||
| 195 | ipu_dp_csc_init(flow, flow->foreground.in_cs, flow->out_cs, | 195 | ipu_dp_csc_init(flow, flow->foreground.in_cs, flow->out_cs, |
| 196 | DP_COM_CONF_CSC_DEF_BOTH); | 196 | DP_COM_CONF_CSC_DEF_BOTH); |
| 197 | } else { | 197 | } else { |
| 198 | if (flow->foreground.in_cs == flow->out_cs) | 198 | if (flow->foreground.in_cs == IPUV3_COLORSPACE_UNKNOWN || |
| 199 | flow->foreground.in_cs == flow->out_cs) | ||
| 199 | /* | 200 | /* |
| 200 | * foreground identical to output, apply color | 201 | * foreground identical to output, apply color |
| 201 | * conversion on background | 202 | * conversion on background |
| @@ -261,6 +262,8 @@ void ipu_dp_disable_channel(struct ipu_dp *dp, bool sync) | |||
| 261 | struct ipu_dp_priv *priv = flow->priv; | 262 | struct ipu_dp_priv *priv = flow->priv; |
| 262 | u32 reg, csc; | 263 | u32 reg, csc; |
| 263 | 264 | ||
| 265 | dp->in_cs = IPUV3_COLORSPACE_UNKNOWN; | ||
| 266 | |||
| 264 | if (!dp->foreground) | 267 | if (!dp->foreground) |
| 265 | return; | 268 | return; |
| 266 | 269 | ||
| @@ -268,8 +271,9 @@ void ipu_dp_disable_channel(struct ipu_dp *dp, bool sync) | |||
| 268 | 271 | ||
| 269 | reg = readl(flow->base + DP_COM_CONF); | 272 | reg = readl(flow->base + DP_COM_CONF); |
| 270 | csc = reg & DP_COM_CONF_CSC_DEF_MASK; | 273 | csc = reg & DP_COM_CONF_CSC_DEF_MASK; |
| 271 | if (csc == DP_COM_CONF_CSC_DEF_FG) | 274 | reg &= ~DP_COM_CONF_CSC_DEF_MASK; |
| 272 | reg &= ~DP_COM_CONF_CSC_DEF_MASK; | 275 | if (csc == DP_COM_CONF_CSC_DEF_BOTH || csc == DP_COM_CONF_CSC_DEF_BG) |
| 276 | reg |= DP_COM_CONF_CSC_DEF_BG; | ||
| 273 | 277 | ||
| 274 | reg &= ~DP_COM_CONF_FG_EN; | 278 | reg &= ~DP_COM_CONF_FG_EN; |
| 275 | writel(reg, flow->base + DP_COM_CONF); | 279 | writel(reg, flow->base + DP_COM_CONF); |
| @@ -347,6 +351,8 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base) | |||
| 347 | mutex_init(&priv->mutex); | 351 | mutex_init(&priv->mutex); |
| 348 | 352 | ||
| 349 | for (i = 0; i < IPUV3_NUM_FLOWS; i++) { | 353 | for (i = 0; i < IPUV3_NUM_FLOWS; i++) { |
| 354 | priv->flow[i].background.in_cs = IPUV3_COLORSPACE_UNKNOWN; | ||
| 355 | priv->flow[i].foreground.in_cs = IPUV3_COLORSPACE_UNKNOWN; | ||
| 350 | priv->flow[i].foreground.foreground = true; | 356 | priv->flow[i].foreground.foreground = true; |
| 351 | priv->flow[i].base = priv->base + ipu_dp_flow_base[i]; | 357 | priv->flow[i].base = priv->base + ipu_dp_flow_base[i]; |
| 352 | priv->flow[i].priv = priv; | 358 | priv->flow[i].priv = priv; |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index cbf3180cb612..668ad971cd7b 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
| @@ -420,7 +420,6 @@ extern struct ttm_bo_global { | |||
| 420 | /** | 420 | /** |
| 421 | * Protected by ttm_global_mutex. | 421 | * Protected by ttm_global_mutex. |
| 422 | */ | 422 | */ |
| 423 | unsigned int use_count; | ||
| 424 | struct list_head device_list; | 423 | struct list_head device_list; |
| 425 | 424 | ||
| 426 | /** | 425 | /** |
