Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
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
Commits
60b4dffb
Commit
60b4dffb
authored
Dec 04, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DaVinci Resizer: flag failing down_interruptible
parent
d5c8226e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
+27
-13
drivers/char/davinci_resizer.c
drivers/char/davinci_resizer.c
+27
-12
drivers/char/davinci_resizer.h
drivers/char/davinci_resizer.h
+0
-1
No files found.
drivers/char/davinci_resizer.c
View file @
60b4dffb
...
...
@@ -64,8 +64,6 @@
#include "davinci_resizer_hw.h"
#include "davinci_resizer.h"
#define DRIVERNAME "DaVinciResizer"
MODULE_LICENSE
(
"GPL"
);
MODULE_DESCRIPTION
(
"Texas Instruments Davinci video resizer driver"
);
...
...
@@ -501,6 +499,11 @@ static int rsz_start(rsz_resize_t * resize, channel_config_t * rsz_conf_chan)
/* Function call to add the entry of application in array */
ret
=
add_to_array
(
rsz_conf_chan
);
if
(
ret
<
0
)
{
dev_dbg
(
rsz_device
,
"%s: Failed adding array to configuration list aborting
\n
"
,
__FUNCTION__
);
return
-
EIO
;
}
/*Function call to set up the hardware */
rsz_hardware_setup
(
rsz_conf_chan
);
...
...
@@ -541,9 +544,11 @@ static int add_to_array(channel_config_t * rsz_conf_chan)
dev_dbg
(
rsz_device
,
"entering %s
\n
"
,
__FUNCTION__
);
/* locking the configuartion aaray */
down_interruptible
(
&
device_config
.
array_sem
);
/* locking the configuartion array */
if
(
down_interruptible
(
&
device_config
.
array_sem
))
{
dev_dbg
(
rsz_device
,
"%s: failed locking configuration array
\n
"
,
__FUNCTION__
);
return
-
1
;
}
/* Add configuration to the queue according to its priority */
if
(
device_config
.
array_count
==
EMPTY
)
{
/* If array empty insert at top position */
...
...
@@ -587,7 +592,9 @@ static int add_to_array(channel_config_t * rsz_conf_chan)
wait_for_completion_interruptible
(
&
(
rsz_conf_chan
->
channel_sem
));
#else
down_interruptible
(
&
(
rsz_conf_chan
->
channel_sem
));
if
(
down_interruptible
(
&
(
rsz_conf_chan
->
channel_sem
)))
dev_err
(
rsz_device
,
"%s: failed locking pending request
\n
"
,
__FUNCTION__
);
#endif
}
else
{
...
...
@@ -609,7 +616,11 @@ static int delete_from_array(channel_config_t * rsz_conf_chan)
dev_dbg
(
rsz_device
,
"entering %s
\n
"
,
__FUNCTION__
);
down_interruptible
(
&
(
device_config
.
array_sem
));
if
(
down_interruptible
(
&
(
device_config
.
array_sem
)))
{
dev_dbg
(
rsz_device
,
"%s: failed locking configuration array
\n
"
,
__FUNCTION__
);
return
-
1
;
}
/*shift the entried in array */
if
(
device_config
.
array_count
!=
SECONDENTRY
)
{
...
...
@@ -1190,7 +1201,9 @@ static int rsz_open(struct inode *inode, struct file *filp)
/* increment usage counter */
/* Lock the global variable and increment the counter */
down_interruptible
(
&
device_config
.
device_mutex
);
if
(
down_interruptible
(
&
device_config
.
device_mutex
))
dev_err
(
rsz_device
,
"%s: failed locking configuration to increment counter
\n
"
,
__FUNCTION__
);
device_config
.
module_usage_count
++
;
up
(
&
device_config
.
device_mutex
);
...
...
@@ -1262,7 +1275,9 @@ static int rsz_release(struct inode *inode, struct file *filp)
/* Decrements the module usage count; */
/* Lock the global variable and decrement variable */
down_interruptible
(
&
device_config
.
device_mutex
);
if
(
down_interruptible
(
&
device_config
.
device_mutex
))
dev_err
(
rsz_device
,
"%s: failed locking configuration to decrement counter
\n
"
,
__FUNCTION__
);
device_config
.
module_usage_count
--
;
up
(
&
device_config
.
device_mutex
);
...
...
@@ -1564,7 +1579,7 @@ static int __init rsz_init(void)
/* Register the driver in the kernel */
result
=
alloc_chrdev_region
(
&
dev
,
ZERO
,
1
,
DRIVER_NAME
);
result
=
alloc_chrdev_region
(
&
dev
,
ZERO
,
1
,
"Resizer"
);
if
(
result
<
ZERO
)
{
printk
(
"
\n
DaVinciresizer: Module intialization failed.\
could not register character device"
);
...
...
@@ -1586,7 +1601,7 @@ static int __init rsz_init(void)
}
/* registeration of character device */
register_chrdev
(
MAJOR
(
dev
),
DRIVER_NAME
,
&
rsz_fops
);
register_chrdev
(
MAJOR
(
dev
),
"Resizer"
,
&
rsz_fops
);
/* register driver as a platform driver */
if
(
misc_register
(
&
resizer_device
))
...
...
@@ -1651,7 +1666,7 @@ void __exit rsz_cleanup(void)
cdev_del
(
&
c_dev
);
/* unregistering the driver from the kernel */
unregister_chrdev
(
MAJOR
(
dev
),
DRIVER_NAME
);
unregister_chrdev
(
MAJOR
(
dev
),
"Resizer"
);
}
/* End of function resizer_cleanup */
...
...
drivers/char/davinci_resizer.h
View file @
60b4dffb
...
...
@@ -57,7 +57,6 @@
#define MAX_IMAGE_HEIGHT 960
#define MAX_INPUT_BUFFERS 8
#define MAX_OUTPUT_BUFFERS 8
#define DRIVER_NAME "Resizer"
#define FREE_BUFFER 0
#define ALIGNMENT 16
#define CHANNEL_BUSY 1
...
...
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