Re: [PATCH 1/1] drm/ttm: Set memory as decrypted for ttm framebuffer mappings

2018-09-27 Thread Jiandi An
On 08/24/2018 02:21 AM, Christian König wrote: > Am 24.08.2018 um 01:05 schrieb Jiandi An: >> >> >> On 08/23/2018 01:47 AM, Christian König wrote: >>> Am 22.08.2018 um 22:57 schrieb Jiandi An: >>>> >>>> On 08/22/2018 02:09 PM, Christian Kö

Re: [PATCH] drm/virtio: pass virtio_gpu_object to virtio_gpu_cmd_transfer_to_host_{2d,3d}

2018-09-21 Thread An, Jiandi
On 09/20/2018 11:53 PM, Jiandi An wrote: > > > On 09/20/2018 01:29 AM, Gerd Hoffmann wrote: >> Pass virtio_gpu_object down to virtio_gpu_cmd_transfer_to_host_2d and >> virtio_gpu_cmd_transfer_to_host_3d functions, instead of passing just >> the virtio resource h

Re: [virtio-dev] [PATCH 2/2] drm/virtio: add iommu support.

2018-09-20 Thread Jiandi An
s all know it (see patch just sent). Tested that patch you sent. Together with this patch it also resolves the virtio gpu graphical display issue for SEV guest. Is there a way to optimize the dma_sync_sg to only sync on the pages being updated instead of all the pages in the obj sgl list every ti

Re: [PATCH] drm/virtio: pass virtio_gpu_object to virtio_gpu_cmd_transfer_to_host_{2d,3d}

2018-09-20 Thread Jiandi An
t, for dma sync. > > Signed-off-by: Gerd Hoffmann Tested-by: Jiandi An > --- > drivers/gpu/drm/virtio/virtgpu_drv.h | 6 -- > drivers/gpu/drm/virtio/virtgpu_fb.c|

Re: [virtio-dev] [PATCH 2/2] drm/virtio: add iommu support.

2018-09-19 Thread Jiandi An
gt;> >>> Hmm. I'd suspect there is simply a code path missing. Can you send the >>> patch you have? >>> >>> cheers, >>> Gerd >>> >> >> I sent the patch. For now it does dma_sync_sg on the pages in >> TRANSFER_TO_HO

Re: [virtio-dev] [PATCH 2/2] drm/virtio: add iommu support.

2018-09-19 Thread Jiandi An
path missing. Can you send the > patch you have? > > cheers, > Gerd > I sent the patch. For now it does dma_sync_sg on the pages in TRANSFER_TO_HOST_2D/3D when use_dma_api is true. https://lore.kernel.org/lkml/20180919070931.91168-1-jiandi...@amd.com/ - Jiandi ___

[PATCH] drm/virtio: add dma sync for dma mapped virtio gpu framebuffer pages

2018-09-19 Thread An, Jiandi
With virtio gpu ttm-pages being dma mapped, dma sync is needed when swiotlb is used as bounce buffers, before TRANSFER_TO_HOST_2D/3D commands are sent. Signed-off-by: Jiandi An --- drivers/gpu/drm/virtio/virtgpu_drv.h | 8 drivers/gpu/drm/virtio/virtgpu_fb.c | 7 --- drivers/gpu

Re: [virtio-dev] [PATCH 2/2] drm/virtio: add iommu support.

2018-09-18 Thread Jiandi An
before sending VIRTIO_GPU_CMD_RESOURCE_FLUSH and VIRTIO_GPU_CMD_SET_SCANOUT, still blank black screen after display manger is kicked off. Do you know which path I'm still missing as far as VIRTIO_GPU_CMD goes? Thanks - Jiandi ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [virtio-dev] [PATCH 2/2] drm/virtio: add iommu support.

2018-09-12 Thread Jiandi An
ristian is suggesting to map and set ttm->pages as decrypted right after ttm->pages are allocated. Just checking with you guys maybe there is a better way to handle this in the virtio gpu layer instead of the common ttm layer. Could you guys shine some light on this? Thanks. - Jiandi

Re: [PATCH 1/1] drm/ttm: Set memory as decrypted for ttm framebuffer mappings

2018-08-23 Thread Jiandi An
On 08/23/2018 01:47 AM, Christian König wrote: Am 22.08.2018 um 22:57 schrieb Jiandi An: On 08/22/2018 02:09 PM, Christian König wrote: Am 22.08.2018 um 20:57 schrieb Jiandi An: Framebuffer memory needs to be accessed decrypted.  Ensure the memory encryption mask is not set for the ttm

Re: [PATCH 1/1] drm/ttm: Set memory as decrypted for ttm framebuffer mappings

2018-08-22 Thread Jiandi An
On 08/22/2018 02:09 PM, Christian König wrote: > Am 22.08.2018 um 20:57 schrieb Jiandi An: >> Framebuffer memory needs to be accessed decrypted.  Ensure the >> memory encryption mask is not set for the ttm framebuffer mappings. > > NAK, the memory not only needs to b

[PATCH 1/1] drm/ttm: Set memory as decrypted for ttm framebuffer mappings

2018-08-22 Thread Jiandi An
Framebuffer memory needs to be accessed decrypted. Ensure the memory encryption mask is not set for the ttm framebuffer mappings. Signed-off-by: Jiandi An --- drivers/gpu/drm/ttm/ttm_bo_util.c | 12 +++- drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 -- 2 files changed, 15 insertions