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
99d4d36a
Commit
99d4d36a
authored
Aug 20, 2015
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/nvif: extend nop ioctl to return nvif version identifier
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
bf81df9b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
4 deletions
+18
-4
drivers/gpu/drm/nouveau/include/nvif/client.h
drivers/gpu/drm/nouveau/include/nvif/client.h
+1
-0
drivers/gpu/drm/nouveau/include/nvif/ioctl.h
drivers/gpu/drm/nouveau/include/nvif/ioctl.h
+4
-1
drivers/gpu/drm/nouveau/nvif/client.c
drivers/gpu/drm/nouveau/nvif/client.c
+9
-0
drivers/gpu/drm/nouveau/nvkm/core/ioctl.c
drivers/gpu/drm/nouveau/nvkm/core/ioctl.c
+4
-3
No files found.
drivers/gpu/drm/nouveau/include/nvif/client.h
View file @
99d4d36a
...
...
@@ -6,6 +6,7 @@
struct
nvif_client
{
struct
nvif_object
object
;
const
struct
nvif_driver
*
driver
;
u64
version
;
u8
route
;
bool
super
;
};
...
...
drivers/gpu/drm/nouveau/include/nvif/ioctl.h
View file @
99d4d36a
#ifndef __NVIF_IOCTL_H__
#define __NVIF_IOCTL_H__
#define NVIF_VERSION_LATEST 0x0000000000000000ULL
struct
nvif_ioctl_v0
{
__u8
version
;
#define NVIF_IOCTL_V0_NOP 0x00
...
...
@@ -29,7 +31,8 @@ struct nvif_ioctl_v0 {
__u8
data
[];
/* ioctl data (below) */
};
struct
nvif_ioctl_nop
{
struct
nvif_ioctl_nop_v0
{
__u64
version
;
};
struct
nvif_ioctl_sclass_v0
{
...
...
drivers/gpu/drm/nouveau/nvif/client.c
View file @
99d4d36a
...
...
@@ -71,6 +71,10 @@ int
nvif_client_init
(
const
char
*
driver
,
const
char
*
name
,
u64
device
,
const
char
*
cfg
,
const
char
*
dbg
,
struct
nvif_client
*
client
)
{
struct
{
struct
nvif_ioctl_v0
ioctl
;
struct
nvif_ioctl_nop_v0
nop
;
}
args
=
{};
int
ret
,
i
;
ret
=
nvif_object_init
(
NULL
,
0
,
0
,
NULL
,
0
,
&
client
->
object
);
...
...
@@ -91,6 +95,11 @@ nvif_client_init(const char *driver, const char *name, u64 device,
}
}
if
(
ret
==
0
)
{
ret
=
nvif_client_ioctl
(
client
,
&
args
,
sizeof
(
args
));
client
->
version
=
args
.
nop
.
version
;
}
if
(
ret
)
nvif_client_fini
(
client
);
return
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/core/ioctl.c
View file @
99d4d36a
...
...
@@ -35,13 +35,14 @@ nvkm_ioctl_nop(struct nvkm_handle *handle, void *data, u32 size)
{
struct
nvkm_object
*
object
=
handle
->
object
;
union
{
struct
nvif_ioctl_nop
none
;
struct
nvif_ioctl_nop
_v0
v0
;
}
*
args
=
data
;
int
ret
;
nvif_ioctl
(
object
,
"nop size %d
\n
"
,
size
);
if
(
nvif_unvers
(
args
->
none
))
{
nvif_ioctl
(
object
,
"nop
\n
"
);
if
(
nvif_unpack
(
args
->
v0
,
0
,
0
,
false
))
{
nvif_ioctl
(
object
,
"nop vers %lld
\n
"
,
args
->
v0
.
version
);
args
->
v0
.
version
=
NVIF_VERSION_LATEST
;
}
return
ret
;
...
...
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