From sacadmin Mon Aug 10 00:42:01 2009
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n7A7g0eW003518;
	Mon, 10 Aug 2009 00:42:00 -0700 (PDT)
Received: (from xc149992@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id n7A7g0jo003514;
	Mon, 10 Aug 2009 00:42:00 -0700 (PDT)
Date: Mon, 10 Aug 2009 00:42:00 -0700 (PDT)
From: Xiang-Dong Frank Che <xc149992@sac.sfbay.sun.com>
Message-Id: <200908100742.n7A7g0jo003514@sac.sfbay.sun.com>
To: PSARC-record@sac.sfbay.sun.com
Subject: Additional ioctls for GEM support in i915 driver [PSARC/2009/425 Self Review]
Status: RO
Content-Length: 579


Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 Additional ioctls for GEM support in i915 driver
    1.2. Name of Document Author/Supplier:
	 Author:  Miao Che
    1.3  Date of This Document:
	10 August, 2009
4. Technical Description
    See the case directory for more detail

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: Automatic
    6.6. ARC Exposure: open


From Frank.Che@Sun.COM Mon Aug 10 00:54:13 2009
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n7A7sDn6003849
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 10 Aug 2009 00:54:13 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n7A7sDpU007844
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Mon, 10 Aug 2009 00:54:13 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KO500B01HYDB100@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 10 Aug 2009 00:54:13 -0700 (PDT)
Received: from sineb-mail-1.sun.com ([192.18.19.6])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KO500LPOHYB8D90@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Mon,
 10 Aug 2009 00:54:12 -0700 (PDT)
Received: from fe-apac-06.sun.com
 (fe-apac-06.sun.com [192.18.19.177] (may be forged))
	by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n7A7sBYl019703	for
 <PSARC-ext@sun.com>; Mon, 10 Aug 2009 07:54:11 +0000 (GMT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 id <0KO500F00HU5K500@mail-apac.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 10 Aug 2009 15:54:11 +0800 (SGT)
Received: from [129.158.218.60] ([unknown] [129.158.218.60])
 by mail-apac.sun.com
 (Sun Java(tm) System Messaging Server 7u2-7.02 64bit (built Apr 16 2009))
 with ESMTPSA id <0KO5005Q0HY9LII0@mail-apac.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Mon, 10 Aug 2009 15:54:11 +0800 (SGT)
Date: Mon, 10 Aug 2009 15:50:13 +0800
From: Frank Che <Frank.Che@Sun.COM>
Subject: Additional ioctls for GEM support in i915 driver (PSARC/2009/425 Self
 Review)
Sender: Frank.Che@Sun.COM
To: PSARC-ext@Sun.COM
Cc: Miao.Chen@Sun.COM
Message-id: <4A7FD135.5080500@sun.com>
MIME-version: 1.0
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
User-Agent: Thunderbird 2.0.0.19 (X11/20090218)
Status: RO
Content-Length: 4904

I'm sponsoring this case for Miao Chen. This case is to add more 
exported interfaces to PSARC 2004/801 for the i915 driver. The requested 
release binding is patch/micro.

I have marked it as "closed approved automatic" since the change is 
straightforward and the interface is clear. If there is request, I'd be 
happy to upgrade it
to a fast track and set the timer.

-Frank

1. Introduction
1.1. Project/Component Working Name:
     Additional ioctls for GEM support in i915 driver.
1.2. Name of Document Author/Supplier:
     Author: Miao Chen
1.3  Date of This Document:
     7 August, 2009


4. Technical Description

4.1 Summary

This project is to add more DRM IOCTLs in the i915 driver
and the drm misc module for upgrading i915 driver to support
GEM.

4.2 Description

The drm (direct rendering management) misc module and i915
driver were introduced to Solaris in PSARC 2004/801. Xorg
needs them to work on those Intel integrated graphical devices
such as G33, G45, GM45 etc.

GEM (graphics execution manager) is a new memory management
framework in drm misc module and i915 driver. It provides much
better performance than old framework which works in user
level but not in kernel.

To upgrade the drm misc module and i915 driver to support GEM,
more DRM IOCTLs should be added.

4.3 Interface Table

------------------------------------------------------------------------------------------------------------------------------ 

| Interface exported        | Classifications | 
Comments                                                                     
|
------------------------------------------------------------------------------------------------------------------------------ 

| DRM_IOCTL_MODESET_CTL     | External        | Handle vblank event 
counter across mode switch                              |
| DRM_IOCTL_GEM_OPEN        | External        | Open an object using the 
global name, returning a handle and the size.       |
| DRM_IOCTL_GEM_FLINK       | External        | Create a global name for 
an object, returning the name.                      |
| DRM_IOCTL_GEM_CLOSE       | External        | Releases the handle to 
an object.                                            |
| DRM_I915_GEM_INIT         | External        | Initialize GEM for i915 
device specific feature.                             |
| DRM_I915_GEM_EXECBUFFER   | External        | Execute the batch 
buffer.                                                    |
| DRM_I915_GEM_PIN          | External        | Bind an object to 
hardware GTT.                                              |
| DRM_I915_GEM_UNPIN        | External        | Unbind an object to 
hardware GTT.                                            |
| DRM_I915_GEM_BUSY         | External        | Check if the specific 
object is busy.                                        |
| DRM_I915_GEM_THROTTLE     | External        | Throttle rendering by 
waiting until the ring has completed the requests.     |
| DRM_I915_GEM_ENTERVT      | External        | Setup kernel resources 
during entering vt.                                   |
| DRM_I915_GEM_LEAVEVT      | External        | Releases kernel 
resources during leaving vt.                                 |
| DRM_I915_GEM_CREATE       | External        | Create a new mm object 
and returns a handle to it.                           |
| DRM_I915_GEM_PREAD        | External        | Read data from the 
object referenced by handle.                              |
| DRM_I915_GEM_PWRITE       | External        | Write data to the object 
referenced by handle.                               |
| DRM_I915_GEM_MMAP         | External        | Map the contents of an 
object, returning the address it is mapped into.      |
| DRM_I915_GEM_SET_DOMAIN   | External        | Called when user space 
prepares to use an object with the CPU.               |
| DRM_I915_GEM_SW_FINISH    | External        | Called when user space 
has done writes to this buffer.                       |
| DRM_I915_GEM_SET_TILING   | External        | Set the tiling mode of 
an object.                                            |
| DRM_I915_GEM_GET_TILING   | External        | Returns the current 
tiling mode and required bit 6 swizzling for the object. |
| DRM_I915_GEM_GET_APERTURE | External        | Returns the total 
aperture size and current available aperture size.         |
------------------------------------------------------------------------------------------------------------------------------ 


4.4 References:

[1] PSARC/2004/801 DRI porting
http://sac.sfbay.sun.com/Archives/CaseLog/arc/PSARC/2004/801/

4.5 Documentation Change

There is no need to change any documentation about i915 driver.

6. Resources and Schedule
6.4. Steering Committee requested information
  6.4.1. Consolidation C-team Name:
           ON
6.5. ARC review type: self-review
6.6. ARC Exposure: open





