Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3734718f
Commit
3734718f
authored
Jan 04, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://drm.bkbits.net/drm-linus
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
e90d017c
882a04c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
28 deletions
+73
-28
arch/sparc64/Kconfig
arch/sparc64/Kconfig
+1
-1
drivers/char/drm/ffb_drv.c
drivers/char/drm/ffb_drv.c
+71
-26
drivers/char/drm/ffb_drv.h
drivers/char/drm/ffb_drv.h
+1
-1
No files found.
arch/sparc64/Kconfig
View file @
3734718f
...
@@ -560,7 +560,7 @@ config DRM
...
@@ -560,7 +560,7 @@ config DRM
config DRM_FFB
config DRM_FFB
tristate "Creator/Creator3D"
tristate "Creator/Creator3D"
depends on DRM
depends on DRM
&& BROKEN
help
help
Choose this option if you have one of Sun's Creator3D-based graphics
Choose this option if you have one of Sun's Creator3D-based graphics
and frame buffer cards. Product page at
and frame buffer cards. Product page at
...
...
drivers/char/drm/ffb_drv.c
View file @
3734718f
...
@@ -210,30 +210,17 @@ unsigned long ffb_get_unmapped_area(struct file *filp,
...
@@ -210,30 +210,17 @@ unsigned long ffb_get_unmapped_area(struct file *filp,
return
addr
;
return
addr
;
}
}
/* This functions must be here since it references drm_numdevs)
* which drm_drv.h declares.
*/
static
int
ffb_presetup
(
drm_device_t
*
dev
)
static
int
ffb_presetup
(
drm_device_t
*
dev
)
{
{
ffb_dev_priv_t
*
ffb_priv
;
ffb_dev_priv_t
*
ffb_priv
;
drm_device_t
*
temp_dev
;
int
ret
=
0
;
int
ret
=
0
;
int
i
;
int
i
=
0
;
/* Check for the case where no device was found. */
/* Check for the case where no device was found. */
if
(
ffb_position
==
NULL
)
if
(
ffb_position
==
NULL
)
return
-
ENODEV
;
return
-
ENODEV
;
/* Find our instance number by finding our device in dev structure */
/* code used to use numdevs no numdevs anymore */
for
(
i
=
0
;
i
<
drm_numdevs
;
i
++
)
{
temp_dev
=
&
(
drm_device
[
i
]);
if
(
temp_dev
==
dev
)
break
;
}
if
(
i
==
drm_numdevs
)
return
-
ENODEV
;
ffb_priv
=
kmalloc
(
sizeof
(
ffb_dev_priv_t
),
GFP_KERNEL
);
ffb_priv
=
kmalloc
(
sizeof
(
ffb_dev_priv_t
),
GFP_KERNEL
);
if
(
!
ffb_priv
)
if
(
!
ffb_priv
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -305,16 +292,74 @@ static unsigned long ffb_driver_get_reg_ofs(drm_device_t *dev)
...
@@ -305,16 +292,74 @@ static unsigned long ffb_driver_get_reg_ofs(drm_device_t *dev)
return
0
;
return
0
;
}
}
void
ffb_driver_register_fns
(
drm_device_t
*
dev
)
static
int
postinit
(
struct
drm_device
*
dev
,
unsigned
long
flags
)
{
DRM_INFO
(
"Initialized %s %d.%d.%d %s on minor %d
\n
"
,
DRIVER_NAME
,
DRIVER_MAJOR
,
DRIVER_MINOR
,
DRIVER_PATCHLEVEL
,
DRIVER_DATE
,
dev
->
minor
);
return
0
;
}
static
int
version
(
drm_version_t
*
version
)
{
{
ffb_set_context_ioctls
();
int
len
;
DRM
(
fops
).
get_unmapped_area
=
ffb_get_unmapped_area
;
dev
->
driver
.
release
=
ffb_driver_release
;
version
->
version_major
=
DRIVER_MAJOR
;
dev
->
driver
.
presetup
=
ffb_presetup
;
version
->
version_minor
=
DRIVER_MINOR
;
dev
->
driver
.
pretakedown
=
ffb_driver_pretakedown
;
version
->
version_patchlevel
=
DRIVER_PATCHLEVEL
;
dev
->
driver
.
postcleanup
=
ffb_driver_postcleanup
;
DRM_COPY
(
version
->
name
,
DRIVER_NAME
);
dev
->
driver
.
kernel_context_switch
=
ffb_context_switch
;
DRM_COPY
(
version
->
date
,
DRIVER_DATE
);
dev
->
driver
.
kernel_context_switch_unlock
=
ffb_driver_kernel_context_switch_unlock
;
DRM_COPY
(
version
->
desc
,
DRIVER_DESC
);
dev
->
driver
.
get_map_ofs
=
ffb_driver_get_map_ofs
;
return
0
;
dev
->
driver
.
get_reg_ofs
=
ffb_driver_get_reg_ofs
;
}
static
drm_ioctl_desc_t
ioctls
[]
=
{
};
static
struct
drm_driver
driver
=
{
.
driver_features
=
0
,
.
dev_priv_size
=
sizeof
(
u32
),
.
release
=
ffb_driver_release
,
.
presetup
=
ffb_presetup
,
.
pretakedown
=
ffb_driver_pretakedown
,
.
postcleanup
=
ffb_driver_postcleanup
,
.
kernel_context_switch
=
ffb_driver_context_switch
,
.
kernel_context_switch_unlock
=
ffb_driver_kernel_context_switch_unlock
,
.
get_map_ofs
=
ffb_driver_get_map_ofs
,
.
get_reg_ofs
=
ffb_driver_get_reg_ofs
,
.
postinit
=
postinit
,
.
version
=
version
,
.
ioctls
=
ioctls
,
.
num_ioctls
=
DRM_ARRAY_SIZE
(
ioctls
),
.
fops
=
{
.
owner
=
THIS_MODULE
,
.
open
=
drm_open
,
.
release
=
drm_release
,
.
ioctl
=
drm_ioctl
,
.
mmap
=
drm_mmap
,
.
poll
=
drm_poll
,
.
fasync
=
drm_fasync
,
},
};
static
int
__init
ffb_init
(
void
)
{
return
-
ENODEV
;
}
}
static
void
__exit
ffb_exit
(
void
)
{
}
module_init
(
ffb_init
);
module_exit
(
ffb_exit
);
MODULE_AUTHOR
(
DRIVER_AUTHOR
);
MODULE_DESCRIPTION
(
DRIVER_DESC
);
MODULE_LICENSE
(
"GPL and additional rights"
);
drivers/char/drm/ffb_drv.h
View file @
3734718f
...
@@ -275,7 +275,6 @@ typedef struct ffb_dev_priv {
...
@@ -275,7 +275,6 @@ typedef struct ffb_dev_priv {
struct
ffb_hw_context
*
hw_state
[
FFB_MAX_CTXS
];
struct
ffb_hw_context
*
hw_state
[
FFB_MAX_CTXS
];
}
ffb_dev_priv_t
;
}
ffb_dev_priv_t
;
extern
struct
file_operations
DRM
(
fops
);
extern
unsigned
long
ffb_get_unmapped_area
(
struct
file
*
filp
,
extern
unsigned
long
ffb_get_unmapped_area
(
struct
file
*
filp
,
unsigned
long
hint
,
unsigned
long
hint
,
unsigned
long
len
,
unsigned
long
len
,
...
@@ -284,3 +283,4 @@ extern unsigned long ffb_get_unmapped_area(struct file *filp,
...
@@ -284,3 +283,4 @@ extern unsigned long ffb_get_unmapped_area(struct file *filp,
extern
void
ffb_set_context_ioctls
(
void
);
extern
void
ffb_set_context_ioctls
(
void
);
extern
drm_ioctl_desc_t
DRM
(
ioctls
)[];
extern
drm_ioctl_desc_t
DRM
(
ioctls
)[];
extern
int
ffb_driver_context_switch
(
drm_device_t
*
dev
,
int
old
,
int
new
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment