Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/exynos: Move dma_addr out of exynos_drm_fb

This can be calculated from the GEM BO DMA address as well as the offset
stored in the base framebuffer.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>

authored by

Daniel Stone and committed by
Inki Dae
7b30508f b11954a6

+3 -5
+3 -5
drivers/gpu/drm/exynos/exynos_drm_fb.c
··· 37 37 */ 38 38 struct exynos_drm_fb { 39 39 struct drm_framebuffer fb; 40 - dma_addr_t dma_addr[MAX_FB_BUFFER]; 41 40 }; 42 41 43 42 static int check_fb_gem_memory_type(struct drm_device *drm_dev, ··· 90 91 goto err; 91 92 92 93 exynos_fb->fb.obj[i] = &exynos_gem[i]->base; 93 - exynos_fb->dma_addr[i] = exynos_gem[i]->dma_addr 94 - + mode_cmd->offsets[i]; 95 94 } 96 95 97 96 drm_helper_mode_fill_fb_struct(dev, &exynos_fb->fb, mode_cmd); ··· 157 160 158 161 dma_addr_t exynos_drm_fb_dma_addr(struct drm_framebuffer *fb, int index) 159 162 { 160 - struct exynos_drm_fb *exynos_fb = to_exynos_fb(fb); 163 + struct exynos_drm_gem *exynos_gem; 161 164 162 165 if (WARN_ON_ONCE(index >= MAX_FB_BUFFER)) 163 166 return 0; 164 167 165 - return exynos_fb->dma_addr[index]; 168 + exynos_gem = to_exynos_gem(fb->obj[index]); 169 + return exynos_gem->dma_addr + fb->offsets[index]; 166 170 } 167 171 168 172 static struct drm_mode_config_helper_funcs exynos_drm_mode_config_helpers = {