drivers/gpu/drm/openchrome/ttm_gem.c | 5 ----- drivers/gpu/drm/openchrome/via_drv.h | 15 +++++++++++++++ drivers/gpu/drm/openchrome/via_fb.c | 14 +++++--------- 3 files changed, 20 insertions(+), 14 deletions(-)
New commits: commit 892556975ab59eec4dd3f057eb9a130e05a9a532 Author: Kevin Brace <kevinbr...@gmx.com> Date: Mon Aug 7 18:35:54 2017 -0700 Declare via_framebuffer struct This is needed to fix the code. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_drv.h b/drivers/gpu/drm/openchrome/via_drv.h index c1bb2769c56b..565e7562224d 100644 --- a/drivers/gpu/drm/openchrome/via_drv.h +++ b/drivers/gpu/drm/openchrome/via_drv.h @@ -121,6 +121,11 @@ struct ttm_fb_helper { struct ttm_bo_kmap_obj kmap; }; +struct via_framebuffer { + struct drm_framebuffer fb; + struct drm_gem_object *gem_obj; +}; + enum via_engine { VIA_ENG_H1 = 0, VIA_ENG_H2, commit d4f2d317df0bb79ffe172a68102ced4ee26f10aa Author: Kevin Brace <kevinbr...@gmx.com> Date: Mon Aug 7 18:30:08 2017 -0700 Consolidate struct declarations into via_drv.h There is no reason to do it inside *.c files. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/ttm_gem.c b/drivers/gpu/drm/openchrome/ttm_gem.c index 52dd2c942646..a5eb74e656e2 100644 --- a/drivers/gpu/drm/openchrome/ttm_gem.c +++ b/drivers/gpu/drm/openchrome/ttm_gem.c @@ -23,11 +23,6 @@ #include "drmP.h" #include "via_drv.h" -struct ttm_gem_object { - struct drm_gem_object gem; - struct ttm_heap *heap; -}; - /* * initialize the gem buffer object */ diff --git a/drivers/gpu/drm/openchrome/via_drv.h b/drivers/gpu/drm/openchrome/via_drv.h index 792c29ee5b14..c1bb2769c56b 100644 --- a/drivers/gpu/drm/openchrome/via_drv.h +++ b/drivers/gpu/drm/openchrome/via_drv.h @@ -111,6 +111,16 @@ struct ttm_heap { struct ttm_buffer_object pbo; }; +struct ttm_gem_object { + struct drm_gem_object gem; + struct ttm_heap *heap; +}; + +struct ttm_fb_helper { + struct drm_fb_helper base; + struct ttm_bo_kmap_obj kmap; +}; + enum via_engine { VIA_ENG_H1 = 0, VIA_ENG_H2, diff --git a/drivers/gpu/drm/openchrome/via_fb.c b/drivers/gpu/drm/openchrome/via_fb.c index 16b5122f1550..cf9f16ec42fa 100644 --- a/drivers/gpu/drm/openchrome/via_fb.c +++ b/drivers/gpu/drm/openchrome/via_fb.c @@ -25,11 +25,6 @@ #include "drm_fb_helper.h" #include "drm_crtc_helper.h" -struct ttm_fb_helper { - struct drm_fb_helper base; - struct ttm_bo_kmap_obj kmap; -}; - static int cle266_mem_type(struct via_device *dev_priv, struct pci_dev *bridge) { commit d7ea9d54a7b2659492d379d9940d6ee772e3344e Author: Kevin Brace <kevinbr...@gmx.com> Date: Mon Aug 7 18:10:22 2017 -0700 Rely on mode_config data for fb_helper initialization Commit e4563f6ba71792c77aeccb2092cc23149b44e642 made this change, so our side needs to change as well. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_fb.c b/drivers/gpu/drm/openchrome/via_fb.c index 3f21cfe79dc5..16b5122f1550 100644 --- a/drivers/gpu/drm/openchrome/via_fb.c +++ b/drivers/gpu/drm/openchrome/via_fb.c @@ -1204,8 +1204,8 @@ via_fbdev_init(struct drm_device *dev, struct drm_fb_helper **ptr) if (ret) goto out_err; - ret = drm_fb_helper_init(dev, &helper->base, dev->num_crtcs, - dev->mode_config.num_connector); + ret = drm_fb_helper_init(dev, &helper->base, + dev->mode_config.num_connector); if (ret) { fb_dealloc_cmap(&info->cmap); goto out_err; commit 2f1a392c652f607b7470d6aa90860c284d0a4f99 Author: Kevin Brace <kevinbr...@gmx.com> Date: Mon Aug 7 17:57:15 2017 -0700 Pass 'dev' to drm_helper_mode_fill_fb_struct() Commit a3f913ca98925d7e5bae725e9b2b38408215a695 made this change, so our side needs to change as well. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_fb.c b/drivers/gpu/drm/openchrome/via_fb.c index e4234f60089e..3f21cfe79dc5 100644 --- a/drivers/gpu/drm/openchrome/via_fb.c +++ b/drivers/gpu/drm/openchrome/via_fb.c @@ -978,7 +978,7 @@ via_user_framebuffer_create(struct drm_device *dev, return ERR_PTR(ret); } fb->helper_private = obj; - drm_helper_mode_fill_fb_struct(fb, mode_cmd); + drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); return fb; } @@ -1041,7 +1041,7 @@ via_fb_probe(struct drm_fb_helper *helper, fb->helper_private = obj; ttmfb->base.fb = fb; - drm_helper_mode_fill_fb_struct(fb, &mode_cmd); + drm_helper_mode_fill_fb_struct(dev, 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; commit b3f601d6f414b0c22ef812ae5a5d536c8b7905a6 Author: Kevin Brace <kevinbr...@gmx.com> Date: Mon Aug 7 17:54:55 2017 -0700 Added dev pointer to via_fb_probe Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/drivers/gpu/drm/openchrome/via_fb.c b/drivers/gpu/drm/openchrome/via_fb.c index ebc5822a0dfe..e4234f60089e 100644 --- a/drivers/gpu/drm/openchrome/via_fb.c +++ b/drivers/gpu/drm/openchrome/via_fb.c @@ -992,6 +992,7 @@ via_fb_probe(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) { struct ttm_fb_helper *ttmfb = container_of(helper, struct ttm_fb_helper, base); + struct drm_device *dev = helper->dev; struct via_device *dev_priv = helper->dev->dev_private; struct ttm_bo_kmap_obj *kmap = &ttmfb->kmap; struct fb_info *info = helper->fbdev; _______________________________________________ Openchrome-devel mailing list Openchrome-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/openchrome-devel