[PATCHv4 15/36] drm/komeda: Make komeda_fb_none_size_check independent from framebuffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All necessary data is now available in other data structures.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxxxx>
---
 drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
index d4e0df00180e..07520cec6fbd 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
@@ -99,13 +99,11 @@ komeda_fb_afbc_size_check(struct komeda_fb *kfb,
 
 static int
 komeda_fb_none_afbc_size_check(struct komeda_dev *mdev,
-			       struct komeda_fb *kfb,
 			       const struct drm_format_info *info,
 			       struct drm_gem_object **objs,
 			       struct drm_file *file,
 			       const struct drm_mode_fb_cmd2 *mode_cmd)
 {
-	struct drm_framebuffer *fb = &kfb->base;
 	struct drm_gem_object *obj;
 	u32 i, block_h;
 	u64 min_size;
@@ -114,9 +112,10 @@ komeda_fb_none_afbc_size_check(struct komeda_dev *mdev,
 		obj = objs[i];
 
 		block_h = drm_format_info_block_height(info, i);
-		if ((fb->pitches[i] * block_h) % mdev->chip.bus_width) {
+		if ((mode_cmd->pitches[i] * block_h) % mdev->chip.bus_width) {
 			DRM_DEBUG_KMS("Pitch[%d]: 0x%x doesn't align to 0x%x\n",
-				      i, fb->pitches[i], mdev->chip.bus_width);
+				      i, mode_cmd->pitches[i],
+				      mdev->chip.bus_width);
 			return -EINVAL;
 		}
 
@@ -184,7 +183,7 @@ komeda_fb_create(struct drm_device *dev, struct drm_file *file,
 			return ERR_PTR(ret);
 		}
 
-		ret = komeda_fb_none_afbc_size_check(mdev, kfb, info, objs,
+		ret = komeda_fb_none_afbc_size_check(mdev, info, objs,
 						     file, mode_cmd);
 		for (i = 0; i < info->num_planes; ++i)
 			kfb->base.obj[i] = objs[i];
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux