[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dri-patches
Subject:    drm: Branch 'modesetting-101'
From:       airlied () kemper ! freedesktop ! org (Dave Airlie)
Date:       2008-02-29 4:07:40
Message-ID: 20080229040740.77F7D10096 () kemper ! freedesktop ! org
[Download RAW message or body]

 libdrm/xf86drmMode.c  |    5 +++--
 libdrm/xf86drmMode.h  |    2 +-
 tests/mode/modetest.c |    2 +-
 tests/modedemo/demo.c |    2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 0e72819629741339af46d0e303f33482acdf0972
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Feb 29 14:07:29 2008 +1000

    drm: change fb api to take a bo handle not the bo pointer.

diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index 717e1fe..dd1a6ca 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -203,7 +203,8 @@ uint32_t drmModeGetHotplug(int fd)
 }
 
 int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
-                 uint8_t bpp, uint32_t pitch, drmBO *bo, uint32_t *buf_id)
+                 uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
+		 uint32_t *buf_id)
 {
 	struct drm_mode_fb_cmd f;
 	int ret;
@@ -213,7 +214,7 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
 	f.pitch  = pitch;
 	f.bpp    = bpp;
 	f.depth  = depth;
-	f.handle = bo->handle;
+	f.handle = bo_handle;
 
 	if (ret = ioctl(fd, DRM_IOCTL_MODE_ADDFB, &f))
 		return ret;
diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h
index 71e779d..edf9efe 100644
--- a/libdrm/xf86drmMode.h
+++ b/libdrm/xf86drmMode.h
@@ -177,7 +177,7 @@ extern drmModeFBPtr drmModeGetFB(int fd, uint32_t bufferId);
  * Creates a new framebuffer with an buffer object as its scanout buffer.
  */
 extern int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
-			uint8_t bpp, uint32_t pitch, drmBO *bo,
+			uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
 			uint32_t *buf_id);
 /**
  * Destroies the given framebuffer.
diff --git a/tests/mode/modetest.c b/tests/mode/modetest.c
index ab0cdc9..a50b0cc 100644
--- a/tests/mode/modetest.c
+++ b/tests/mode/modetest.c
@@ -291,7 +291,7 @@ int testFrameBufferAdd(int fd, drmModeResPtr res)
 		goto err;
 
 	printf("\tAdding FB\n");
-	ret = drmModeAddFB(fd, 800, 600, 32, 8, 0, &bo, &fb);
+	ret = drmModeAddFB(fd, 800, 600, 32, 8, 0, bo->handle, &fb);
 	if (ret)
 		goto err_bo;
 
diff --git a/tests/modedemo/demo.c b/tests/modedemo/demo.c
index db51cd6..00020bd 100644
--- a/tests/modedemo/demo.c
+++ b/tests/modedemo/demo.c
@@ -483,7 +483,7 @@ drmModeFBPtr createFB(int fd, drmModeResPtr res)
 		goto err;
 	}
 
-	ret = drmModeAddFB(fd, SIZE_X, SIZE_Y, 32, 32, PITCH * 4, &bo, &fb);
+	ret = drmModeAddFB(fd, SIZE_X, SIZE_Y, 32, 32, PITCH * 4, bo->handle, &fb);
 
 	if (ret)
 		goto err_bo;

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--
_______________________________________________
Dri-patches mailing list
Dri-patches@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-patches
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic