drm/msm: Fix fb plane offset calculation
PATCH 1/1 drm/msm: Fix fb plane offset calculation
From: Rob Clark <[email protected]>
The offset got dropped by accident.
--- drivers/gpu/drm/msm/msm_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/msm_fb.c +1 -1
@@ -118,7 +118,7 @@ uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, struct msm_gem_address_space *aspace, int plane) {struct msm_framebuffer *msm_fb =to_msm_framebuffer (fb); -return msm_fb->iova[plane]; +return msm_fb->iova[plane] + fb->offsets[plane]; }struct drm_gem_object *msm_framebuffer_bo (struct drm_framebuffer *fb,int plane)
Signature · 1 line
2.35.1
Quoted 6 lines · Rob Clark
From: Rob Clark <[email protected]>
The offset got dropped by accident.
Fixes d413e6f97134 ("drm/msm: Drop msm_gem_iova()")Signed-off-by Rob Clark <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/msm/msm_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/msm/msm_fb.c +1
-1@@ -118,7 +118,7 @@ uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, struct msm_gem_address_space *aspace, int plane) {struct msm_framebuffer *msm_fb =to_msm_framebuffer (fb); -return msm_fb->iova[plane]; +return msm_fb->iova[plane] + fb->offsets[plane]; }struct drm_gem_object *msm_framebuffer_bo (struct drm_framebuffer *fb,int plane)
Quoted 7 lines · Rob Clark
From: Rob Clark <[email protected]>
The offset got dropped by accident.
Fixes d413e6f97134 ("drm/msm: Drop msm_gem_iova()")Signed-off-by Rob Clark <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/msm/msm_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/msm/msm_fb.c +0
-0
drivers/gpu/drm/msm/msm_fb.c uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, · line 121
Quoted 5 lines
drivers/gpu/drm/msm/msm_fb.c +1
-1@@ -118,7 +118,7 @@ uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, struct msm_gem_address_space *aspace, int plane) {struct msm_framebuffer *msm_fb =to_msm_framebuffer (fb); -return msm_fb->iova[plane]; +return msm_fb->iova[plane] + fb->offsets[plane];
Nit: can we push fb->offsets handling into msm_framebuffer_prepare() instead? Then the msm_framebuffer_iova() would become trivial?
Quoted 6 lines
drivers/gpu/drm/msm/msm_fb.c +0
-1}struct drm_gem_object *msm_framebuffer_bo (struct drm_framebuffer *fb,int plane) --2.35.1
Signature · 2 lines
With best wishes Dmitry
Quoted 16 lines · Dmitry Baryshkov
Quoted 7 lines · Rob Clark
From: Rob Clark <[email protected]>
The offset got dropped by accident.
Fixes d413e6f97134 ("drm/msm: Drop msm_gem_iova()")Signed-off-by Rob Clark <[email protected]>Reviewed-by Dmitry Baryshkov <[email protected]>Quoted 4 lines
--- drivers/gpu/drm/msm/msm_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 13 lines
drivers/gpu/drm/msm/msm_fb.c uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, · line 121
Quoted 10 lines
drivers/gpu/drm/msm/msm_fb.c +1
-1@@ -118,7 +118,7 @@ uint32_t msm_framebuffer_iova(struct drm_framebuffer *fb, struct msm_gem_address_space *aspace, int plane) {struct msm_framebuffer *msm_fb =to_msm_framebuffer (fb); -return msm_fb->iova[plane]; +return msm_fb->iova[plane] + fb->offsets[plane];Nit: can we push
fb->offsetshandling intomsm_framebuffer_prepare()instead? Then themsm_framebuffer_iova()would become trivial?
I'd briefly considered it, but ended up putting it here simply because that is where the offset addition was prior to d413e6f97134. Whether that is a good reason or not, idk. (Prior to d413e6f97134 it needed to be here, now it doesn't)
BR,
-R
Quoted 11 lines
Quoted 6 lines
drivers/gpu/drm/msm/msm_fb.c +0
-1}struct drm_gem_object *msm_framebuffer_bo (struct drm_framebuffer *fb,int plane) --2.35.1
--
With best wishes
Dmitry
Quoting Rob Clark (2022-05-10 09:52:16)
Quoted 7 lines
From: Rob Clark <[email protected]>
The offset got dropped by accident.
Fixes d413e6f97134 ("drm/msm: Drop msm_gem_iova()")Signed-off-by Rob Clark <[email protected]>---