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önig

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

2018-09-20 Thread Jiandi An
On 09/20/2018 01:32 AM, Gerd Hoffmann wrote: > Hi, > >> void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, >> uint32_t resource_id, uint64_t >> offset, >> ... >> struct virtio_gpu_fbdev *vgfbdev = vgdev->vgfbdev; >> struc

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
On 09/19/2018 06:38 AM, Gerd Hoffmann wrote: Once display manger is kicked off for example (sudo systemctl start lightdm.service) and resource id 3 gets created from user space down, it still gives a blank black screen. >>> >>> Hmm. I'd suspect there is simply a code path m

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

2018-09-19 Thread Jiandi An
On 09/18/2018 11:46 PM, Gerd Hoffmann wrote: > Hi, > >> buffer. I tried to put a dma_sync_sg_for_device() on virtio_gpu_object >> obj->pages-sgl >> before VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D is sent. This fixes the kernel >> console path. > > That should be the right place. > >> Once disp

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

2018-09-18 Thread Jiandi An
On 09/12/2018 02:25 AM, Gerd Hoffmann wrote: > Hi, > >> I attempted to fix it in the ttm layer and here is the discussion >> https://lore.kernel.org/lkml/b44280d7-eb13-0996-71f5-3fbdeb466...@amd.com/ >> >> The ttm maintainer Christian is suggesting to map and set ttm->pages as >> decrypted >>

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

2018-09-11 Thread Jiandi An
I tested this with Gerd's qemu side fix with in the sirius/virtio-gpu-iommu branch https://git.kraxel.org/cgit/qemu/commit/?h=sirius/virtio-gpu-iommu&id=86f9d30e4a44ca47f007e51ab5744f87e79fb83e While this resolves the issue where iommu_platform attribute can be specified for virtio-gpu device in

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