Re: 回复: 回复: [RFC PATCH 1/2] drm/amdgpu: Fix memory corruption due to swapout and swapin

2021-05-20 Thread Pan, Xinhui
I just sent out patch below yesterday. swapping unpopulated bo is useless indeed. [RFC PATCH 2/2] drm/ttm: skip swapout when ttm has no backend page.

[PATCH v4] drm/i915: Invoke another _DSM to enable MUX on HP Workstation laptops

2021-05-20 Thread Kai-Heng Feng
On HP Fury G7 Workstations, graphics output is re-routed from Intel GFX to discrete GFX after S3. This is not desirable, because userspace will treat connected display as a new one, losing display settings. The expected behavior is to let discrete GFX drives all external displays. The platform

Re: [PATCH] drm/amdgpu: Let userptr BO ttm have TTM_PAGE_FLAG_SG set

2021-05-20 Thread Christian König
Am 20.05.21 um 05:15 schrieb xinhui pan: We have met memory corruption due to unexcepted swapout/swapin. swapout function create one swap storage which is filled with zero. And set ttm->page_flags as TTM_PAGE_FLAG_SWAPPED. But because userptr BO ttm has no backend page at that time, no real

[PATCH v3 4/4] drm: rcar-du: Use drm_bridge_connector_init() helper

2021-05-20 Thread Laurent Pinchart
Use the drm_bridge_connector_init() helper to create a drm_connector for each output, instead of relying on the bridge drivers doing so. Attach the bridges with the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag to instruct them not to create a connector. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo

[PATCH v3 2/4] drm: rcar-du: lvds: Convert to DRM panel bridge helper

2021-05-20 Thread Laurent Pinchart
Replace the manual panel handling with usage of the DRM panel bridge helper. This simplifies the driver, and brings support for DRM_BRIDGE_ATTACH_NO_CONNECTOR as an added bonus. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_lvds.c | 120 +++- 1 file

[PATCH v3 3/4] drm: rcar-du: dw-hdmi: Set output port number

2021-05-20 Thread Laurent Pinchart
Report the DT output port number in dw_hdmi_plat_data to connect to the next bridge in the dw-hdmi driver. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c

[PATCH v3 1/4] drm: bridge: dw-hdmi: Attach to next bridge if available

2021-05-20 Thread Laurent Pinchart
On all platforms except i.MX and Rockchip, the dw-hdmi DT bindings require a video output port connected to an HDMI sink (most likely an HDMI connector, in rare cases another bridges converting HDMI to another protocol). For those platforms, retrieve the next bridge and attach it from the dw-hdmi

[PATCH v3 0/4] Converter R-Car DU to the DRM bridge connector helper

2021-05-20 Thread Laurent Pinchart
Hello, This patch series converts the R-Car DU driver to use the DRM bridge connector helper drm_bridge_connector_init(). The bulk of the v1 series was converting the adv7511, simple-bridge and dw-hdmi drivers to make connector creation optional (through the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag),

Re: [PATCH v7 01/15] swiotlb: Refactor swiotlb init functions

2021-05-20 Thread Claire Chang
On Thu, May 20, 2021 at 2:50 AM Florian Fainelli wrote: > > > > On 5/17/2021 11:42 PM, Claire Chang wrote: > > Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct > > initialization to make the code reusable. > > > > Note that we now also call set_memory_decrypted in

Re: [RFC 1/3] dma-fence: Add boost fence op

2021-05-20 Thread Christian König
Uff, that looks very hardware specific to me. As far as I can see you can also implement completely inside the backend by starting a timer on enable_signaling, don't you? Christian. Am 19.05.21 um 20:38 schrieb Rob Clark: From: Rob Clark Add a way to hint to the fence signaler that a

Re: [PATCH v7 04/15] swiotlb: Add restricted DMA pool initialization

2021-05-20 Thread Claire Chang
On Thu, May 20, 2021 at 2:54 AM Florian Fainelli wrote: > > > > On 5/17/2021 11:42 PM, Claire Chang wrote: > > Add the initialization function to create restricted DMA pools from > > matching reserved-memory nodes. > > > > Signed-off-by: Claire Chang > > --- > > include/linux/device.h | 4 +++

Re: 回复: 回复: [RFC PATCH 1/2] drm/amdgpu: Fix memory corruption due to swapout and swapin

2021-05-20 Thread Christian König
swapout function create one swap storage which is filled with zero. And set ttm->page_flags as TTM_PAGE_FLAG_SWAPPED. Just because ttm has no backend page this time, no real data is swapout to this swap storage. That's the fundamental problem. A TT object which isn't populated shouldn't be

Re: 回复: 回复: [RFC PATCH 1/2] drm/amdgpu: Fix memory corruption due to swapout and swapin

2021-05-20 Thread Christian König
The problem is that ttm_bo_type_sg doesn't allocate a page array for the TT object. Christian. Am 20.05.21 um 04:58 schrieb Pan, Xinhui: [AMD Official Use Only] I am not sure if we can create a ttm_bo_type_sg bo for userptr. But I have another idea now. we can use flag

Re:Re:Re: [PATCH] drivers/video/fbdev/core/fbmem.c: add pointer judgment

2021-05-20 Thread 宋强
I find null pointer bug when I debug the kernel of loongson in mips,I think the function fb_set_suspend() adding pointer judgment will more friendly.[  101.409101] PM: hibernation entry               [  101.526365] PM: Syncing filesystems ... [  101.543008] PM: done.[  101.545287] Freezing user

Re:Re: [PATCH] drivers/video/fbdev/core/fbmem.c: add pointer judgment

2021-05-20 Thread 宋强
I find null pointer bug when I debug the kernel of loongson,I think the function fb_set_suspend() add pointer judgment will more friendly.[  101.409101] PM: hibernation entry               [  101.526365] PM: Syncing filesystems ... [  101.543008] PM: done.[  101.545287] Freezing user space

<    1   2   3