[Openchrome-devel] drm-openchrome: Branch 'drm-next-4.13' - drivers/gpu/drm

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat Aug 12 08:05:13 UTC 2017


 drivers/gpu/drm/openchrome/via_fb.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit ba1507015a5126ccaaeebfd202ef9c6927d2b51e
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Aug 12 01:04:22 2017 -0700

    Calling drm_helper_mode_fill_fb_struct before FB initialization
    
    This bug is a logical (design) bug. drm_helper_mode_fill_fb_struct
    needs to be called before calling drm_framebuffer_init.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/via_fb.c b/drivers/gpu/drm/openchrome/via_fb.c
index 6a6516aba500..38d3d976bf21 100644
--- a/drivers/gpu/drm/openchrome/via_fb.c
+++ b/drivers/gpu/drm/openchrome/via_fb.c
@@ -974,6 +974,7 @@ via_user_framebuffer_create(struct drm_device *dev,
 
 	via_fb->gem_obj = gem_obj;
 
+	drm_helper_mode_fill_fb_struct(dev, &via_fb->fb, mode_cmd);
 	ret = drm_framebuffer_init(dev, &via_fb->fb, &via_fb_funcs);
 	if (ret) {
 		drm_gem_object_unreference(gem_obj);
@@ -981,8 +982,6 @@ via_user_framebuffer_create(struct drm_device *dev,
 		return ERR_PTR(ret);
 	}
 
-	drm_helper_mode_fill_fb_struct(dev, &via_fb->fb, mode_cmd);
-
 	return &via_fb->fb;
 }
 
@@ -1039,6 +1038,7 @@ via_fb_probe(struct drm_fb_helper *helper,
 	if (unlikely(ret))
 		goto out_err;
 
+	drm_helper_mode_fill_fb_struct(dev, &via_fb->fb, &mode_cmd);
 	ret = drm_framebuffer_init(helper->dev, &via_fb->fb, &via_fb_funcs);
 	if (unlikely(ret))
 		goto out_err;
@@ -1046,7 +1046,6 @@ via_fb_probe(struct drm_fb_helper *helper,
 	via_fb->gem_obj = gem_obj;
 	ttmfb->base.fb = &via_fb->fb;
 
-	drm_helper_mode_fill_fb_struct(dev, &via_fb->fb, &mode_cmd);
 	info->fix.smem_start = kmap->bo->mem.bus.base +
 				kmap->bo->mem.bus.offset;
 	info->fix.smem_len = info->screen_size = size;


More information about the Openchrome-devel mailing list