From: Maxime Ripard Date: Mon, 2 Nov 2020 10:17:54 +0000 (+0100) Subject: Merge drm/drm-next into drm-misc-next X-Git-Tag: baikal/mips/sdk5.9~12066^2~13^2~14 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=bc5c2ebdae589e402313a54fff16f32521aa3c34;p=kernel.git Merge drm/drm-next into drm-misc-next Daniel needs -rc2 in drm-misc-next to merge some patches Signed-off-by: Maxime Ripard --- bc5c2ebdae589e402313a54fff16f32521aa3c34 diff --cc drivers/gpu/drm/drm_gem.c index 1da67d34e55d6,69c2c079d8036..d586068f55091 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@@ -1076,7 -1085,9 +1076,9 @@@ int drm_gem_mmap_obj(struct drm_gem_obj */ drm_gem_object_get(obj); + vma->vm_private_data = obj; + - if (obj->funcs && obj->funcs->mmap) { + if (obj->funcs->mmap) { ret = obj->funcs->mmap(obj, vma); if (ret) { drm_gem_object_put(obj); diff --cc drivers/gpu/drm/drm_prime.c index 4910c446db836,9f955f2010c25..187b55ede62ec --- a/drivers/gpu/drm/drm_prime.c +++ b/drivers/gpu/drm/drm_prime.c @@@ -619,18 -622,17 +620,19 @@@ struct sg_table *drm_gem_map_dma_buf(st if (WARN_ON(dir == DMA_NONE)) return ERR_PTR(-EINVAL); - if (obj->funcs) - sgt = obj->funcs->get_sg_table(obj); - else - sgt = obj->dev->driver->gem_prime_get_sg_table(obj); + if (WARN_ON(!obj->funcs->get_sg_table)) + return ERR_PTR(-ENOSYS); + + sgt = obj->funcs->get_sg_table(obj); + if (IS_ERR(sgt)) + return sgt; - if (!dma_map_sg_attrs(attach->dev, sgt->sgl, sgt->nents, dir, - DMA_ATTR_SKIP_CPU_SYNC)) { + ret = dma_map_sgtable(attach->dev, sgt, dir, + DMA_ATTR_SKIP_CPU_SYNC); + if (ret) { sg_free_table(sgt); kfree(sgt); - sgt = ERR_PTR(-ENOMEM); + sgt = ERR_PTR(ret); } return sgt; diff --cc drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 5ba9b49dfa7a5,f56414a06ec41..6a24ce245a373 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@@ -753,12 -706,10 +707,12 @@@ static struct drm_crtc_state *dpu_crtc_ } static void dpu_crtc_disable(struct drm_crtc *crtc, - struct drm_crtc_state *old_crtc_state) + struct drm_atomic_state *state) { + struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state, + crtc); - struct dpu_crtc *dpu_crtc; - struct dpu_crtc_state *cstate; + struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); + struct dpu_crtc_state *cstate = to_dpu_crtc_state(crtc->state); struct drm_encoder *encoder; unsigned long flags; bool release_bandwidth = false; @@@ -826,9 -770,9 +773,9 @@@ } static void dpu_crtc_enable(struct drm_crtc *crtc, - struct drm_crtc_state *old_crtc_state) + struct drm_atomic_state *state) { - struct dpu_crtc *dpu_crtc; + struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); struct drm_encoder *encoder; bool request_bandwidth = false; diff --cc drivers/gpu/drm/virtio/virtgpu_vq.c index c1824f5369367,07945ca238e2d..857f730747b61 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@@ -1027,14 -1024,11 +1026,12 @@@ void virtio_gpu_cmd_transfer_to_host_3d struct virtio_gpu_transfer_host_3d *cmd_p; struct virtio_gpu_vbuffer *vbuf; bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev); - struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo); - if (use_dma_api) + if (virtio_gpu_is_shmem(bo) && use_dma_api) { + struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo); - - dma_sync_sg_for_device(vgdev->vdev->dev.parent, - shmem->pages->sgl, shmem->pages->nents, - DMA_TO_DEVICE); + dma_sync_sgtable_for_device(vgdev->vdev->dev.parent, + shmem->pages, DMA_TO_DEVICE); + } cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); memset(cmd_p, 0, sizeof(*cmd_p)); diff --cc include/drm/drm_dp_helper.h index ae4e20245ba39,a53243abd9450..1f0ee7f3f473c --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@@ -1035,7 -1003,16 +1054,17 @@@ struct drm_device #define DP_CEC_TX_MESSAGE_BUFFER 0x3020 #define DP_CEC_MESSAGE_BUFFER_LENGTH 0x10 + #define DP_PROTOCOL_CONVERTER_CONTROL_0 0x3050 /* DP 1.3 */ + # define DP_HDMI_DVI_OUTPUT_CONFIG (1 << 0) /* DP 1.3 */ + #define DP_PROTOCOL_CONVERTER_CONTROL_1 0x3051 /* DP 1.3 */ + # define DP_CONVERSION_TO_YCBCR420_ENABLE (1 << 0) /* DP 1.3 */ + # define DP_HDMI_EDID_PROCESSING_DISABLE (1 << 1) /* DP 1.4 */ + # define DP_HDMI_AUTONOMOUS_SCRAMBLING_DISABLE (1 << 2) /* DP 1.4 */ + # define DP_HDMI_FORCE_SCRAMBLING (1 << 3) /* DP 1.4 */ + #define DP_PROTOCOL_CONVERTER_CONTROL_2 0x3052 /* DP 1.3 */ + # define DP_CONVERSION_TO_YCBCR422_ENABLE (1 << 0) /* DP 1.3 */ + +/* HDCP 1.3 and HDCP 2.2 */ #define DP_AUX_HDCP_BKSV 0x68000 #define DP_AUX_HDCP_RI_PRIME 0x68005 #define DP_AUX_HDCP_AKSV 0x68007