[PATCH] drm/mediatek: stop iterating dma addresses when sg_dma_len() == 0

2020-04-20 Thread Anand K Mistry
If dma_map_sg() merges pages when creating the mapping, only the first entries will have a valid sg_dma_address() and sg_dma_len(), followed by entries with sg_dma_len() == 0. Signed-off-by: Anand K Mistry --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [PATCH] drm/mediatek: stop iterating dma addresses when sg_dma_len() == 0

2020-04-28 Thread Anand K. Mistry
On Sun, 26 Apr 2020 at 18:04, Chun-Kuang Hu wrote: > Hi, Anand: > > Anand K Mistry 於 2020年4月20日 週一 下午2:09寫道: > > > > If dma_map_sg() merges pages when creating the mapping, only the first > > entries will have a valid sg_dma_address() and sg_dma_len(), followed by

Re: [PATCH] drm/mediatek: stop iterating dma addresses when sg_dma_len() == 0

2020-04-28 Thread Anand K. Mistry
On Sun, 26 Apr 2020 at 18:04, Chun-Kuang Hu wrote: > > Hi, Anand: > > Anand K Mistry 於 2020年4月20日 週一 下午2:09寫道: > > > > If dma_map_sg() merges pages when creating the mapping, only the first > > entries will have a valid sg_dma_address() and sg_dma_len(), followed

[PATCH] drm/amd/display: Fix error code on failure to set brightness

2021-06-08 Thread Anand K Mistry
. This is interpreted in user-space as a successful write of 1 character, which is obviously wrong. It's not clear exactly what error code to use, but EINVAL should be reasonable. Signed-off-by: Anand K Mistry --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1