Re: [PATCH] drm: Fix possible memleak in drm_client_modeset_probe

2021-11-08 Thread He Ying
kindly ping... 在 2021/10/22 9:26, He Ying 写道: I got memory leak as follows when doing fault injection test: WARNING: CPU: 0 PID: 1214 at drm_mode_config_cleanup+0x689/0x890 [drm] RIP: 0010:drm_mode_config_cleanup+0x689/0x890 [drm] Call Trace: ? tracer_hardirqs_on+0x33/0x520

Re: [PATCH] drm: Fix wrong use of connector in vop_get_edp_connector

2021-11-08 Thread He Ying
kindly ping... 在 2021/10/25 9:55, He Ying 写道: >From the comments of drm_for_each_connector_iter(), we know that "connector is only valid within the list body, if you want to use connector after calling drm_connector_list_iter_end() then you need to grab your own reference fir

Re: [PATCH -V2] drm/sun4i: Grab reference of connector before return connector from sun4i_tcon_get_connector

2021-11-02 Thread He Ying
在 2021/11/2 23:03, Maxime Ripard 写道: Hi, On Tue, Nov 02, 2021 at 04:46:28AM -0400, He Ying wrote: From the comments of drm_for_each_connector_iter(), we know that "connector is only valid within the list body, if you want to use connector after calling drm_connector_list_iter_end() the

[PATCH -V2] drm/sun4i: Grab reference of connector before return connector from sun4i_tcon_get_connector

2021-11-02 Thread He Ying
of connector according to the comments and then call drm_connector_put() after using connector finishes. Signed-off-by: He Ying --- V2: Use proper subject prefix drivers/gpu/drm/sun4i/sun4i_tcon.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/

Re: [PATCH] drm: Grab reference of connector before return connector from sun4i_tcon_get_connector

2021-11-01 Thread He Ying
在 2021/11/1 21:02, Jani Nikula 写道: On Mon, 01 Nov 2021, He Ying wrote: From the comments of drm_for_each_connector_iter(), we know that "connector is only valid within the list body, if you want to use connector after calling drm_connector_list_iter_end() then you need to grab you

[PATCH] drm: Grab reference of connector before return connector from sun4i_tcon_get_connector

2021-10-31 Thread He Ying
of connector according to the comments and then call drm_connector_put() after using connector finishes. Signed-off-by: He Ying --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/dr

[PATCH] drm: Fix wrong use of connector in vop_get_edp_connector

2021-10-24 Thread He Ying
of connector according to the comments and then call drm_connector_put() after using connector finishes. Signed-off-by: He Ying Fixes: 2cbeb64f6c70 ("drm/rockchip: use drm_for_each_connector_iter()") --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 9 + 1 file changed, 5 ins

[PATCH -next] drm: Small optimization to intel_dp_mst_atomic_master_trans_check

2021-10-21 Thread He Ying
smaller and more clear. Apply it to the function intel_dp_mst_atomic_master_trans_check(). Signed-off-by: He Ying --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b

[PATCH] drm: Fix possible memleak in drm_client_modeset_probe

2021-10-21 Thread He Ying
alloc() is between drm_connector_list_iter_begin() and *_end(). Going to the label directly is not a good idea. Because iter->conn is not cleaned up if so. Fix the problem by going to the label outside drm_connector_list_iter_end(). Signed-off-by: He Ying --- drivers/gpu/drm/drm_client_

Re: [PATCH -next] drm/amdgpu: Use DIV_ROUND_UP_ULL instead of DIV_ROUND_UP

2021-06-10 Thread He Ying
Hello, 在 2021/6/10 16:20, Christian König 写道: Am 10.06.21 um 10:20 schrieb He Ying: When compiling the kernel for MIPS with CONFIG_DRM_AMDGPU = y, errors are encountered as follows: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.o: In function `amdgpu_vram_mgr_new': amdgpu_vram_mgr.c:(

[PATCH -next] drm/amdgpu: Use DIV_ROUND_UP_ULL instead of DIV_ROUND_UP

2021-06-10 Thread He Ying
s uint64_t) is not supported by default in linux kernel space. Instead, using do_div is OK for this situation. For this problem, using DIV_ROUND_UP_ULL instead of DIV_ROUND_UP is better. Fixes: 6a7f76e70fac ("drm/amdgpu: add VRAM manager v2") Reported-by: Hulk Robot Signed-off-by: He Ying

[PATCH v2 -next] phy: phy-mtk-mipi-dsi: Remove redundant dev_err call in mtk_mipi_tx_probe()

2021-04-08 Thread He Ying
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reviewed-by: Chunfeng Yun Reported-by: Hulk Robot Signed-off-by: He Ying --- v2: - Use 'return PTR_ERR();' instead of 'ret = PTR_ERR();return ret;&

[PATCH v2 -next] phy: phy-mtk-hdmi: Remove redundant dev_err call in mtk_hdmi_phy_probe()

2021-04-08 Thread He Ying
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: He Ying --- v2: - Use 'return PTR_ERR()' instead of 'ret = PTR_ERR();return ret;'. drivers/phy/mediatek/phy-mt