[Openchrome-devel] drm-openchrome: Branch 'drm-next-3.19' - 2 commits - drivers/gpu/drm

Kevin Brace kevinbrace at kemper.freedesktop.org
Tue Aug 22 00:46:46 UTC 2017


 drivers/gpu/drm/openchrome/via_crtc.c |   16 ++++++++--------
 drivers/gpu/drm/openchrome/via_drv.h  |    5 +++++
 2 files changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 80fb30ac550989546b0fedcc244ded14443896e4
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Aug 21 17:46:28 2017 -0700

    Fixing local *mode_set_base functions to use old_fb rather than fb
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/via_crtc.c b/drivers/gpu/drm/openchrome/via_crtc.c
index bf71b5f349d6..9fd8e92a50d7 100644
--- a/drivers/gpu/drm/openchrome/via_crtc.c
+++ b/drivers/gpu/drm/openchrome/via_crtc.c
@@ -1228,7 +1228,7 @@ exit:
 
 static int
 via_iga1_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
-                        struct drm_framebuffer *fb)
+                        struct drm_framebuffer *old_fb)
 {
     struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
     struct drm_framebuffer *new_fb = crtc->primary->fb;
@@ -1245,7 +1245,7 @@ via_iga1_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
     }
 
     /* No reason to reset the display surface again */
-    if (new_fb == fb)
+    if (new_fb == old_fb)
         return ret;
 
     obj = new_fb->helper_private;
@@ -1266,8 +1266,8 @@ via_iga1_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
     }
 
     /* Free the old framebuffer if it exist */
-    if (fb) {
-        obj = fb->helper_private;
+    if (old_fb) {
+        obj = old_fb->helper_private;
         bo = ttm_gem_mapping(obj);
 
         ret = via_bo_unpin(bo, NULL);
@@ -1541,7 +1541,7 @@ exit:
 
 static int
 via_iga2_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
-                        struct drm_framebuffer *fb)
+                        struct drm_framebuffer *old_fb)
 {
     struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
     struct drm_framebuffer *new_fb = crtc->primary->fb;
@@ -1558,7 +1558,7 @@ via_iga2_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
     }
 
     /* No reason to reset the display surface again */
-    if (new_fb == fb)
+    if (new_fb == old_fb)
         return ret;
 
     obj = new_fb->helper_private;
@@ -1579,8 +1579,8 @@ via_iga2_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
     }
 
     /* Free the old framebuffer if it exist */
-    if (fb) {
-        obj = fb->helper_private;
+    if (old_fb) {
+        obj = old_fb->helper_private;
         bo = ttm_gem_mapping(obj);
 
         ret = via_bo_unpin(bo, NULL);
commit ed52adbce851c7960297a0d6f5bd065cfe4ed002
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Aug 20 11:17:40 2017 -0700

    Declare via_framebuffer struct
    
    This is needed to fix the code.
    
    Signed-off-by: Kevin Brace <kevinbrace at 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,


More information about the Openchrome-devel mailing list