Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libva
Commits
201210bc
Commit
201210bc
authored
Sep 09, 2009
by
Gwenole Beauchesne
Committed by
Austin Yuan
Sep 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up NVIDIA driver detection code.
parent
599673fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
62 deletions
+14
-62
src/x11/va_x11.c
src/x11/va_x11.c
+14
-62
No files found.
src/x11/va_x11.c
View file @
201210bc
...
@@ -42,26 +42,6 @@
...
@@ -42,26 +42,6 @@
static
VADisplayContextP
pDisplayContexts
=
NULL
;
static
VADisplayContextP
pDisplayContexts
=
NULL
;
static
void
va_errorMessage
(
const
char
*
msg
,
...)
{
va_list
args
;
fprintf
(
stderr
,
"libva error: "
);
va_start
(
args
,
msg
);
vfprintf
(
stderr
,
msg
,
args
);
va_end
(
args
);
}
static
void
va_infoMessage
(
const
char
*
msg
,
...)
{
va_list
args
;
fprintf
(
stderr
,
"libva: "
);
va_start
(
args
,
msg
);
vfprintf
(
stderr
,
msg
,
args
);
va_end
(
args
);
}
static
int
va_DisplayContextIsValid
(
static
int
va_DisplayContextIsValid
(
VADisplayContextP
pDisplayContext
VADisplayContextP
pDisplayContext
)
)
...
@@ -132,49 +112,21 @@ static VAStatus va_NVCTRL_GetDriverName (
...
@@ -132,49 +112,21 @@ static VAStatus va_NVCTRL_GetDriverName (
)
)
{
{
VADriverContextP
ctx
=
pDisplayContext
->
pDriverContext
;
VADriverContextP
ctx
=
pDisplayContext
->
pDriverContext
;
VAStatus
vaStatus
=
VA_STATUS_ERROR_UNKNOWN
;
int
direct_capable
,
driver_major
,
driver_minor
,
driver_patch
;
int
direct_capable
;
Bool
result
;
int
driver_major
;
int
driver_minor
;
int
driver_patch
;
Bool
result
=
True
;
char
*
nvidia_driver_name
=
NULL
;
if
(
result
)
result
=
VA_NVCTRLQueryDirectRenderingCapable
(
ctx
->
x11_dpy
,
ctx
->
x11_screen
,
{
&
direct_capable
);
result
=
VA_NVCTRLQueryDirectRenderingCapable
(
ctx
->
x11_dpy
,
ctx
->
x11_screen
,
&
direct_capable
);
if
(
!
result
||
!
direct_capable
)
if
(
!
result
)
return
VA_STATUS_ERROR_UNKNOWN
;
{
va_errorMessage
(
"VA_NVCTRLQueryDirectRenderingCapable failed
\n
"
);
result
=
VA_NVCTRLGetClientDriverName
(
ctx
->
x11_dpy
,
ctx
->
x11_screen
,
}
&
driver_major
,
&
driver_minor
,
}
&
driver_patch
,
driver_name
);
if
(
result
)
if
(
!
result
)
{
return
VA_STATUS_ERROR_UNKNOWN
;
result
=
direct_capable
;
if
(
!
result
)
return
VA_STATUS_SUCCESS
;
{
va_errorMessage
(
"VA_NVCTRLQueryDirectRenderingCapable returned false
\n
"
);
}
}
if
(
result
)
{
result
=
VA_NVCTRLGetClientDriverName
(
ctx
->
x11_dpy
,
ctx
->
x11_screen
,
&
driver_major
,
&
driver_minor
,
&
driver_patch
,
&
nvidia_driver_name
);
if
(
!
result
)
{
va_errorMessage
(
"VA_NVCTRLGetClientDriverName returned false
\n
"
);
}
}
if
(
result
)
{
vaStatus
=
VA_STATUS_SUCCESS
;
va_infoMessage
(
"va_NVCTRL_GetDriverName: %d.%d.%d %s (screen %d)
\n
"
,
driver_major
,
driver_minor
,
driver_patch
,
nvidia_driver_name
,
ctx
->
x11_screen
);
if
(
driver_name
)
*
driver_name
=
nvidia_driver_name
;
}
return
vaStatus
;
}
}
static
VAStatus
va_DisplayContextGetDriverName
(
static
VAStatus
va_DisplayContextGetDriverName
(
...
...
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