Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'drm-fixes-2020-09-11' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
"Regular fixes, not much a major amount. One thing though is Laurent
fixed some Kconfig issues, and I'm carrying the rapidio kconfig change
so the drm one for xlnx driver works. He hadn't got a response from
rapidio maintainers.

Otherwise, virtio, sun4i, tve200, ingenic have some fixes, one audio
fix for i915 and a core docs fix.

kconfig:
- rapidio/xlnx kconfig fix

core:
- Documentation fix

i915:
- audio regression fix

virtio:
- Fix double free in virtio
- Fix virtio unblank
- Remove output->enabled from virtio, as it should use crtc_state

sun4i:
- Add missing put_device in sun4i, and other fixes
- Handle sun4i alpha on lowest plane correctly

tv200:
- Fix tve200 enable/disable

ingenic
- Small ingenic fixes"

* tag 'drm-fixes-2020-09-11' of git://anongit.freedesktop.org/drm/drm:
drm/i915: fix regression leading to display audio probe failure on GLK
drm: xlnx: dpsub: Fix DMADEVICES Kconfig dependency
rapidio: Replace 'select' DMAENGINES 'with depends on'
drm/virtio: drop virtio_gpu_output->enabled
drm/sun4i: backend: Disable alpha on the lowest plane on the A20
drm/sun4i: backend: Support alpha property on lowest plane
drm/sun4i: Fix DE2 YVU handling
drm/tve200: Stabilize enable/disable
dma-buf: fence-chain: Document missing dma_fence_chain_init() parameter in kerneldoc
dma-buf: Fix kerneldoc of dma_buf_set_name()
drm/virtio: fix unblank
Documentation: fix dma-buf.rst underline length warning
drm/sun4i: Fix dsi dcs long write function
drm/ingenic: Fix driver not probing when IPU port is missing
drm/ingenic: Fix leak of device_node pointer
drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux()
drm/virtio: Revert "drm/virtio: Call the right shmem helpers"

+77 -36
+1 -1
Documentation/driver-api/dma-buf.rst
··· 179 179 :internal: 180 180 181 181 Indefinite DMA Fences 182 - ~~~~~~~~~~~~~~~~~~~~ 182 + ~~~~~~~~~~~~~~~~~~~~~ 183 183 184 184 At various times &dma_fence with an indefinite time until dma_fence_wait() 185 185 finishes have been proposed. Examples include:
+3 -3
drivers/dma-buf/dma-buf.c
··· 316 316 * name of the dma-buf if the same piece of memory is used for multiple 317 317 * purpose between different devices. 318 318 * 319 - * @dmabuf [in] dmabuf buffer that will be renamed. 320 - * @buf: [in] A piece of userspace memory that contains the name of 321 - * the dma-buf. 319 + * @dmabuf: [in] dmabuf buffer that will be renamed. 320 + * @buf: [in] A piece of userspace memory that contains the name of 321 + * the dma-buf. 322 322 * 323 323 * Returns 0 on success. If the dma-buf buffer is already attached to 324 324 * devices, return -EBUSY.
+1
drivers/dma-buf/dma-fence-chain.c
··· 222 222 * @chain: the chain node to initialize 223 223 * @prev: the previous fence 224 224 * @fence: the current fence 225 + * @seqno: the sequence number to use for the fence chain 225 226 * 226 227 * Initialize a new chain node and either start a new chain or add the node to 227 228 * the existing chain of the previous fence.
+4 -6
drivers/gpu/drm/i915/display/intel_display.c
··· 14956 14956 if (dev_priv->wm.distrust_bios_wm) 14957 14957 any_ms = true; 14958 14958 14959 - if (any_ms) { 14960 - ret = intel_modeset_checks(state); 14961 - if (ret) 14962 - goto fail; 14963 - } 14964 - 14965 14959 intel_fbc_choose_crtc(dev_priv, state); 14966 14960 ret = calc_watermark_data(state); 14967 14961 if (ret) ··· 14970 14976 goto fail; 14971 14977 14972 14978 if (any_ms) { 14979 + ret = intel_modeset_checks(state); 14980 + if (ret) 14981 + goto fail; 14982 + 14973 14983 ret = intel_modeset_calc_cdclk(state); 14974 14984 if (ret) 14975 14985 return ret;
+12 -8
drivers/gpu/drm/ingenic/ingenic-drm-drv.c
··· 673 673 component_unbind_all(priv->dev, &priv->drm); 674 674 } 675 675 676 - static int ingenic_drm_bind(struct device *dev) 676 + static int ingenic_drm_bind(struct device *dev, bool has_components) 677 677 { 678 678 struct platform_device *pdev = to_platform_device(dev); 679 679 const struct jz_soc_info *soc_info; ··· 808 808 return ret; 809 809 } 810 810 811 - if (IS_ENABLED(CONFIG_DRM_INGENIC_IPU)) { 811 + if (IS_ENABLED(CONFIG_DRM_INGENIC_IPU) && has_components) { 812 812 ret = component_bind_all(dev, drm); 813 813 if (ret) { 814 814 if (ret != -EPROBE_DEFER) ··· 939 939 return ret; 940 940 } 941 941 942 + static int ingenic_drm_bind_with_components(struct device *dev) 943 + { 944 + return ingenic_drm_bind(dev, true); 945 + } 946 + 942 947 static int compare_of(struct device *dev, void *data) 943 948 { 944 949 return dev->of_node == data; ··· 962 957 } 963 958 964 959 static const struct component_master_ops ingenic_master_ops = { 965 - .bind = ingenic_drm_bind, 960 + .bind = ingenic_drm_bind_with_components, 966 961 .unbind = ingenic_drm_unbind, 967 962 }; 968 963 ··· 973 968 struct device_node *np; 974 969 975 970 if (!IS_ENABLED(CONFIG_DRM_INGENIC_IPU)) 976 - return ingenic_drm_bind(dev); 971 + return ingenic_drm_bind(dev, false); 977 972 978 973 /* IPU is at port address 8 */ 979 974 np = of_graph_get_remote_node(dev->of_node, 8, 0); 980 - if (!np) { 981 - dev_err(dev, "Unable to get IPU node\n"); 982 - return -EINVAL; 983 - } 975 + if (!np) 976 + return ingenic_drm_bind(dev, false); 984 977 985 978 drm_of_component_match_add(dev, &match, compare_of, np); 979 + of_node_put(np); 986 980 987 981 return component_master_add_with_match(dev, &ingenic_master_ops, match); 988 982 }
+1 -3
drivers/gpu/drm/sun4i/sun4i_backend.c
··· 589 589 590 590 /* We can't have an alpha plane at the lowest position */ 591 591 if (!backend->quirks->supports_lowest_plane_alpha && 592 - (plane_states[0]->fb->format->has_alpha || 593 - (plane_states[0]->alpha != DRM_BLEND_ALPHA_OPAQUE))) 592 + (plane_states[0]->alpha != DRM_BLEND_ALPHA_OPAQUE)) 594 593 return -EINVAL; 595 594 596 595 for (i = 1; i < num_planes; i++) { ··· 994 995 995 996 static const struct sun4i_backend_quirks sun7i_backend_quirks = { 996 997 .needs_output_muxing = true, 997 - .supports_lowest_plane_alpha = true, 998 998 }; 999 999 1000 1000 static const struct sun4i_backend_quirks sun8i_a33_backend_quirks = {
+6 -2
drivers/gpu/drm/sun4i/sun4i_tcon.c
··· 1433 1433 if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && 1434 1434 encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { 1435 1435 ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id); 1436 - if (ret) 1436 + if (ret) { 1437 + put_device(&pdev->dev); 1437 1438 return ret; 1439 + } 1438 1440 } 1439 1441 1440 1442 if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) { 1441 1443 ret = sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); 1442 - if (ret) 1444 + if (ret) { 1445 + put_device(&pdev->dev); 1443 1446 return ret; 1447 + } 1444 1448 } 1445 1449 1446 1450 return 0;
+2 -2
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
··· 889 889 regmap_write(dsi->regs, SUN6I_DSI_CMD_TX_REG(0), 890 890 sun6i_dsi_dcs_build_pkt_hdr(dsi, msg)); 891 891 892 - bounce = kzalloc(msg->tx_len + sizeof(crc), GFP_KERNEL); 892 + bounce = kzalloc(ALIGN(msg->tx_len + sizeof(crc), 4), GFP_KERNEL); 893 893 if (!bounce) 894 894 return -ENOMEM; 895 895 ··· 900 900 memcpy((u8 *)bounce + msg->tx_len, &crc, sizeof(crc)); 901 901 len += sizeof(crc); 902 902 903 - regmap_bulk_write(dsi->regs, SUN6I_DSI_CMD_TX_REG(1), bounce, len); 903 + regmap_bulk_write(dsi->regs, SUN6I_DSI_CMD_TX_REG(1), bounce, DIV_ROUND_UP(len, 4)); 904 904 regmap_write(dsi->regs, SUN6I_DSI_CMD_CTL_REG, len + 4 - 1); 905 905 kfree(bounce); 906 906
+1 -1
drivers/gpu/drm/sun4i/sun8i_vi_layer.c
··· 211 211 return 0; 212 212 } 213 213 214 - static bool sun8i_vi_layer_get_csc_mode(const struct drm_format_info *format) 214 + static u32 sun8i_vi_layer_get_csc_mode(const struct drm_format_info *format) 215 215 { 216 216 if (!format->is_yuv) 217 217 return SUN8I_CSC_MODE_OFF;
+21 -1
drivers/gpu/drm/tve200/tve200_display.c
··· 14 14 #include <linux/version.h> 15 15 #include <linux/dma-buf.h> 16 16 #include <linux/of_graph.h> 17 + #include <linux/delay.h> 17 18 18 19 #include <drm/drm_fb_cma_helper.h> 19 20 #include <drm/drm_fourcc.h> ··· 131 130 struct drm_connector *connector = priv->connector; 132 131 u32 format = fb->format->format; 133 132 u32 ctrl1 = 0; 133 + int retries; 134 134 135 135 clk_prepare_enable(priv->clk); 136 + 137 + /* Reset the TVE200 and wait for it to come back online */ 138 + writel(TVE200_CTRL_4_RESET, priv->regs + TVE200_CTRL_4); 139 + for (retries = 0; retries < 5; retries++) { 140 + usleep_range(30000, 50000); 141 + if (readl(priv->regs + TVE200_CTRL_4) & TVE200_CTRL_4_RESET) 142 + continue; 143 + else 144 + break; 145 + } 146 + if (retries == 5 && 147 + readl(priv->regs + TVE200_CTRL_4) & TVE200_CTRL_4_RESET) { 148 + dev_err(drm->dev, "can't get hardware out of reset\n"); 149 + return; 150 + } 136 151 137 152 /* Function 1 */ 138 153 ctrl1 |= TVE200_CTRL_CSMODE; ··· 247 230 248 231 drm_crtc_vblank_off(crtc); 249 232 250 - /* Disable and Power Down */ 233 + /* Disable put into reset and Power Down */ 251 234 writel(0, priv->regs + TVE200_CTRL); 235 + writel(TVE200_CTRL_4_RESET, priv->regs + TVE200_CTRL_4); 252 236 253 237 clk_disable_unprepare(priv->clk); 254 238 } ··· 297 279 struct drm_device *drm = crtc->dev; 298 280 struct tve200_drm_dev_private *priv = drm->dev_private; 299 281 282 + /* Clear any IRQs and enable */ 283 + writel(0xFF, priv->regs + TVE200_INT_CLR); 300 284 writel(TVE200_INT_V_STATUS, priv->regs + TVE200_INT_EN); 301 285 return 0; 302 286 }
+11 -4
drivers/gpu/drm/virtio/virtgpu_display.c
··· 97 97 static void virtio_gpu_crtc_atomic_enable(struct drm_crtc *crtc, 98 98 struct drm_crtc_state *old_state) 99 99 { 100 - struct virtio_gpu_output *output = drm_crtc_to_virtio_gpu_output(crtc); 101 - 102 - output->enabled = true; 103 100 } 104 101 105 102 static void virtio_gpu_crtc_atomic_disable(struct drm_crtc *crtc, ··· 108 111 109 112 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0, 0, 0, 0, 0); 110 113 virtio_gpu_notify(vgdev); 111 - output->enabled = false; 112 114 } 113 115 114 116 static int virtio_gpu_crtc_atomic_check(struct drm_crtc *crtc, ··· 119 123 static void virtio_gpu_crtc_atomic_flush(struct drm_crtc *crtc, 120 124 struct drm_crtc_state *old_state) 121 125 { 126 + struct virtio_gpu_output *output = drm_crtc_to_virtio_gpu_output(crtc); 127 + 128 + /* 129 + * virtio-gpu can't do modeset and plane update operations 130 + * independent from each other. So the actual modeset happens 131 + * in the plane update callback, and here we just check 132 + * whenever we must force the modeset. 133 + */ 134 + if (drm_atomic_crtc_needs_modeset(crtc->state)) { 135 + output->needs_modeset = true; 136 + } 122 137 } 123 138 124 139 static const struct drm_crtc_helper_funcs virtio_gpu_crtc_helper_funcs = {
+1 -1
drivers/gpu/drm/virtio/virtgpu_drv.h
··· 137 137 struct edid *edid; 138 138 int cur_x; 139 139 int cur_y; 140 - bool enabled; 140 + bool needs_modeset; 141 141 }; 142 142 #define drm_crtc_to_virtio_gpu_output(x) \ 143 143 container_of(x, struct virtio_gpu_output, crtc)
+7 -1
drivers/gpu/drm/virtio/virtgpu_object.c
··· 151 151 if (ret < 0) 152 152 return -EINVAL; 153 153 154 - shmem->pages = drm_gem_shmem_get_pages_sgt(&bo->base.base); 154 + /* 155 + * virtio_gpu uses drm_gem_shmem_get_sg_table instead of 156 + * drm_gem_shmem_get_pages_sgt because virtio has it's own set of 157 + * dma-ops. This is discouraged for other drivers, but should be fine 158 + * since virtio_gpu doesn't support dma-buf import from other devices. 159 + */ 160 + shmem->pages = drm_gem_shmem_get_sg_table(&bo->base.base); 155 161 if (!shmem->pages) { 156 162 drm_gem_shmem_unpin(&bo->base.base); 157 163 return -EINVAL;
+4 -2
drivers/gpu/drm/virtio/virtgpu_plane.c
··· 142 142 if (WARN_ON(!output)) 143 143 return; 144 144 145 - if (!plane->state->fb || !output->enabled) { 145 + if (!plane->state->fb || !output->crtc.state->active) { 146 146 DRM_DEBUG("nofb\n"); 147 147 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0, 148 148 plane->state->src_w >> 16, ··· 163 163 plane->state->src_w != old_state->src_w || 164 164 plane->state->src_h != old_state->src_h || 165 165 plane->state->src_x != old_state->src_x || 166 - plane->state->src_y != old_state->src_y) { 166 + plane->state->src_y != old_state->src_y || 167 + output->needs_modeset) { 168 + output->needs_modeset = false; 167 169 DRM_DEBUG("handle 0x%x, crtc %dx%d+%d+%d, src %dx%d+%d+%d\n", 168 170 bo->hw_res_handle, 169 171 plane->state->crtc_w, plane->state->crtc_h,
+1
drivers/gpu/drm/xlnx/Kconfig
··· 2 2 tristate "ZynqMP DisplayPort Controller Driver" 3 3 depends on ARCH_ZYNQMP || COMPILE_TEST 4 4 depends on COMMON_CLK && DRM && OF 5 + depends on DMADEVICES 5 6 select DMA_ENGINE 6 7 select DRM_GEM_CMA_HELPER 7 8 select DRM_KMS_CMA_HELPER
+1 -1
drivers/rapidio/Kconfig
··· 37 37 config RAPIDIO_DMA_ENGINE 38 38 bool "DMA Engine support for RapidIO" 39 39 depends on RAPIDIO 40 - select DMADEVICES 40 + depends on DMADEVICES 41 41 select DMA_ENGINE 42 42 help 43 43 Say Y here if you want to use DMA Engine frameork for RapidIO data