Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
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
linux
linux-davinci-2.6.23
Commits
37026278
Commit
37026278
authored
Aug 06, 2006
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
V4L/DVB (4474): On some cases, depth were not returned.
Signed-off-by:
Mauro Carvalho Chehab
<
mchehab@infradead.org
>
parent
a202a5bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/bt8xx/bttv-driver.c
+8
-0
drivers/media/video/v4l1-compat.c
drivers/media/video/v4l1-compat.c
+9
-3
No files found.
drivers/media/video/bt8xx/bttv-driver.c
View file @
37026278
...
...
@@ -2431,6 +2431,14 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
fbuf
->
bytesperline
=
btv
->
fbuf
.
fmt
.
bytesperline
;
if
(
fh
->
ovfmt
)
fbuf
->
depth
=
fh
->
ovfmt
->
depth
;
else
{
if
(
fbuf
->
width
)
fbuf
->
depth
=
((
fbuf
->
bytesperline
<<
3
)
+
(
fbuf
->
width
-
1
)
)
/
fbuf
->
width
;
else
fbuf
->
depth
=
0
;
}
return
0
;
}
case
VIDIOCSFBUF
:
...
...
drivers/media/video/v4l1-compat.c
View file @
37026278
...
...
@@ -349,6 +349,8 @@ v4l_compat_translate_ioctl(struct inode *inode,
{
struct
video_buffer
*
buffer
=
arg
;
memset
(
buffer
,
0
,
sizeof
(
*
buffer
));
err
=
drv
(
inode
,
file
,
VIDIOC_G_FBUF
,
&
fbuf2
);
if
(
err
<
0
)
{
dprintk
(
"VIDIOCGFBUF / VIDIOC_G_FBUF: %d
\n
"
,
err
);
...
...
@@ -361,7 +363,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
switch
(
fbuf2
.
fmt
.
pixelformat
)
{
case
V4L2_PIX_FMT_RGB332
:
buffer
->
depth
=
8
;
break
;
break
;
case
V4L2_PIX_FMT_RGB555
:
buffer
->
depth
=
15
;
break
;
...
...
@@ -377,9 +379,13 @@ v4l_compat_translate_ioctl(struct inode *inode,
default:
buffer
->
depth
=
0
;
}
if
(
0
!=
fbuf2
.
fmt
.
bytesperline
)
if
(
fbuf2
.
fmt
.
bytesperline
)
{
buffer
->
bytesperline
=
fbuf2
.
fmt
.
bytesperline
;
else
{
if
(
!
buffer
->
depth
&&
buffer
->
width
)
buffer
->
depth
=
((
fbuf2
.
fmt
.
bytesperline
<<
3
)
+
(
buffer
->
width
-
1
)
)
/
buffer
->
width
;
}
else
{
buffer
->
bytesperline
=
(
buffer
->
width
*
buffer
->
depth
+
7
)
&
7
;
buffer
->
bytesperline
>>=
3
;
...
...
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