Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ca9c20ce
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ca9c20ce
编写于
14年前
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fbdev/udlfb'
上级
17ca20cb
81f6f3c1
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
64 addition
and
126 deletion
+64
-126
Documentation/fb/udlfb.txt
Documentation/fb/udlfb.txt
+0
-0
drivers/staging/Kconfig
drivers/staging/Kconfig
+0
-2
drivers/staging/Makefile
drivers/staging/Makefile
+0
-1
drivers/staging/udlfb/Kconfig
drivers/staging/udlfb/Kconfig
+0
-14
drivers/staging/udlfb/Makefile
drivers/staging/udlfb/Makefile
+0
-1
drivers/video/Kconfig
drivers/video/Kconfig
+14
-0
drivers/video/Makefile
drivers/video/Makefile
+1
-0
drivers/video/udlfb.c
drivers/video/udlfb.c
+49
-86
include/video/udlfb.h
include/video/udlfb.h
+0
-22
未找到文件。
drivers/staging/udl
fb/udlfb.txt
→
Documentation/
fb/udlfb.txt
浏览文件 @
ca9c20ce
文件已移动
This diff is collapsed.
Click to expand it.
drivers/staging/Kconfig
浏览文件 @
ca9c20ce
...
...
@@ -111,8 +111,6 @@ source "drivers/staging/vt6655/Kconfig"
source "drivers/staging/vt6656/Kconfig"
source "drivers/staging/udlfb/Kconfig"
source "drivers/staging/hv/Kconfig"
source "drivers/staging/vme/Kconfig"
...
...
This diff is collapsed.
Click to expand it.
drivers/staging/Makefile
浏览文件 @
ca9c20ce
...
...
@@ -38,7 +38,6 @@ obj-$(CONFIG_USB_SERIAL_QUATECH_USB2) += quatech_usb2/
obj-$(CONFIG_OCTEON_ETHERNET)
+=
octeon/
obj-$(CONFIG_VT6655)
+=
vt6655/
obj-$(CONFIG_VT6656)
+=
vt6656/
obj-$(CONFIG_FB_UDL)
+=
udlfb/
obj-$(CONFIG_HYPERV)
+=
hv/
obj-$(CONFIG_VME_BUS)
+=
vme/
obj-$(CONFIG_MRST_RAR_HANDLER)
+=
memrar/
...
...
This diff is collapsed.
Click to expand it.
drivers/staging/udlfb/Kconfig
已删除
100644 → 0
浏览文件 @
17ca20cb
config FB_UDL
tristate "Displaylink USB Framebuffer support"
depends on FB && USB
select FB_MODE_HELPERS
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
select FB_SYS_FOPS
select FB_DEFERRED_IO
---help---
This is a kernel framebuffer driver for DisplayLink USB devices.
Supports fbdev clients like xf86-video-fbdev, kdrive, fbi, and
mplayer -vo fbdev. Supports all USB 2.0 era DisplayLink devices.
To compile as a module, choose M here: the module name is udlfb.
This diff is collapsed.
Click to expand it.
drivers/staging/udlfb/Makefile
已删除
100644 → 0
浏览文件 @
17ca20cb
obj-$(CONFIG_FB_UDL)
+=
udlfb.o
This diff is collapsed.
Click to expand it.
drivers/video/Kconfig
浏览文件 @
ca9c20ce
...
...
@@ -2116,6 +2116,20 @@ config FB_SM501
If unsure, say N.
config FB_UDL
tristate "Displaylink USB Framebuffer support"
depends on FB && USB
select FB_MODE_HELPERS
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
select FB_SYS_FOPS
select FB_DEFERRED_IO
---help---
This is a kernel framebuffer driver for DisplayLink USB devices.
Supports fbdev clients like xf86-video-fbdev, kdrive, fbi, and
mplayer -vo fbdev. Supports all USB 2.0 era DisplayLink devices.
To compile as a module, choose M here: the module name is udlfb.
config FB_PNX4008_DUM
tristate "Display Update Module support on Philips PNX4008 board"
...
...
This diff is collapsed.
Click to expand it.
drivers/video/Makefile
浏览文件 @
ca9c20ce
...
...
@@ -125,6 +125,7 @@ obj-$(CONFIG_FB_PNX4008_DUM_RGB) += pnx4008/
obj-$(CONFIG_FB_IBM_GXT4500)
+=
gxt4500.o
obj-$(CONFIG_FB_PS3)
+=
ps3fb.o
obj-$(CONFIG_FB_SM501)
+=
sm501fb.o
obj-$(CONFIG_FB_UDL)
+=
udlfb.o
obj-$(CONFIG_FB_XILINX)
+=
xilinxfb.o
obj-$(CONFIG_SH_MIPI_DSI)
+=
sh_mipi_dsi.o
obj-$(CONFIG_FB_SH_MOBILE_HDMI)
+=
sh_mobile_hdmi.o
...
...
This diff is collapsed.
Click to expand it.
drivers/
staging/udlfb
/udlfb.c
→
drivers/
video
/udlfb.c
浏览文件 @
ca9c20ce
...
...
@@ -16,6 +16,8 @@
* from Florian Echtler, Henrik Bjerregaard Pedersen, and others.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
...
...
@@ -26,8 +28,8 @@
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include "
udlfb
.h"
#include <video/udlfb.h>
#include "
edid
.h"
static
struct
fb_fix_screeninfo
dlfb_fix
=
{
.
id
=
"udlfb"
,
...
...
@@ -40,9 +42,7 @@ static struct fb_fix_screeninfo dlfb_fix = {
};
static
const
u32
udlfb_info_flags
=
FBINFO_DEFAULT
|
FBINFO_READS_FAST
|
#ifdef FBINFO_VIRTFB
FBINFO_VIRTFB
|
#endif
FBINFO_HWACCEL_IMAGEBLIT
|
FBINFO_HWACCEL_FILLRECT
|
FBINFO_HWACCEL_COPYAREA
|
FBINFO_MISC_ALWAYS_SETPAR
;
...
...
@@ -293,7 +293,7 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma)
pos
=
(
unsigned
long
)
info
->
fix
.
smem_start
+
offset
;
dl
_notice
(
"mmap() framebuffer addr:%lu size:%lu
\n
"
,
pr
_notice
(
"mmap() framebuffer addr:%lu size:%lu
\n
"
,
pos
,
size
);
while
(
size
>
0
)
{
...
...
@@ -595,18 +595,6 @@ int dlfb_handle_damage(struct dlfb_data *dev, int x, int y,
return
0
;
}
static
ssize_t
dlfb_ops_read
(
struct
fb_info
*
info
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
ssize_t
result
=
-
ENOSYS
;
#if defined CONFIG_FB_SYS_FOPS || defined CONFIG_FB_SYS_FOPS_MODULE
result
=
fb_sys_read
(
info
,
buf
,
count
,
ppos
);
#endif
return
result
;
}
/*
* Path triggered by usermode clients who write to filesystem
* e.g. cat filename > /dev/fb1
...
...
@@ -616,12 +604,10 @@ static ssize_t dlfb_ops_read(struct fb_info *info, char __user *buf,
static
ssize_t
dlfb_ops_write
(
struct
fb_info
*
info
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
ssize_t
result
=
-
ENOSYS
;
ssize_t
result
;
struct
dlfb_data
*
dev
=
info
->
par
;
u32
offset
=
(
u32
)
*
ppos
;
#if defined CONFIG_FB_SYS_FOPS || defined CONFIG_FB_SYS_FOPS_MODULE
result
=
fb_sys_write
(
info
,
buf
,
count
,
ppos
);
if
(
result
>
0
)
{
...
...
@@ -632,7 +618,6 @@ static ssize_t dlfb_ops_write(struct fb_info *info, const char __user *buf,
dlfb_handle_damage
(
dev
,
0
,
start
,
info
->
var
.
xres
,
lines
,
info
->
screen_base
);
}
#endif
return
result
;
}
...
...
@@ -644,14 +629,10 @@ static void dlfb_ops_copyarea(struct fb_info *info,
struct
dlfb_data
*
dev
=
info
->
par
;
#if defined CONFIG_FB_SYS_COPYAREA || defined CONFIG_FB_SYS_COPYAREA_MODULE
sys_copyarea
(
info
,
area
);
dlfb_handle_damage
(
dev
,
area
->
dx
,
area
->
dy
,
area
->
width
,
area
->
height
,
info
->
screen_base
);
#endif
}
static
void
dlfb_ops_imageblit
(
struct
fb_info
*
info
,
...
...
@@ -659,15 +640,10 @@ static void dlfb_ops_imageblit(struct fb_info *info,
{
struct
dlfb_data
*
dev
=
info
->
par
;
#if defined CONFIG_FB_SYS_IMAGEBLIT || defined CONFIG_FB_SYS_IMAGEBLIT_MODULE
sys_imageblit
(
info
,
image
);
dlfb_handle_damage
(
dev
,
image
->
dx
,
image
->
dy
,
image
->
width
,
image
->
height
,
info
->
screen_base
);
#endif
}
static
void
dlfb_ops_fillrect
(
struct
fb_info
*
info
,
...
...
@@ -675,17 +651,12 @@ static void dlfb_ops_fillrect(struct fb_info *info,
{
struct
dlfb_data
*
dev
=
info
->
par
;
#if defined CONFIG_FB_SYS_FILLRECT || defined CONFIG_FB_SYS_FILLRECT_MODULE
sys_fillrect
(
info
,
rect
);
dlfb_handle_damage
(
dev
,
rect
->
dx
,
rect
->
dy
,
rect
->
width
,
rect
->
height
,
info
->
screen_base
);
#endif
}
#ifdef CONFIG_FB_DEFERRED_IO
/*
* NOTE: fb_defio.c is holding info->fbdefio.mutex
* Touching ANY framebuffer memory that triggers a page fault
...
...
@@ -747,8 +718,6 @@ static void dlfb_dpy_deferred_io(struct fb_info *info,
&
dev
->
cpu_kcycles_used
);
}
#endif
static
int
dlfb_get_edid
(
struct
dlfb_data
*
dev
,
char
*
edid
,
int
len
)
{
int
i
;
...
...
@@ -765,7 +734,7 @@ static int dlfb_get_edid(struct dlfb_data *dev, char *edid, int len)
(
0x80
|
(
0x02
<<
5
)),
i
<<
8
,
0xA1
,
rbuf
,
2
,
HZ
);
if
(
ret
<
1
)
{
dl
_err
(
"Read EDID byte %d failed err %x
\n
"
,
i
,
ret
);
pr
_err
(
"Read EDID byte %d failed err %x
\n
"
,
i
,
ret
);
i
--
;
break
;
}
...
...
@@ -881,7 +850,6 @@ static int dlfb_ops_open(struct fb_info *info, int user)
kref_get
(
&
dev
->
kref
);
#ifdef CONFIG_FB_DEFERRED_IO
if
(
fb_defio
&&
(
info
->
fbdefio
==
NULL
))
{
/* enable defio at last moment if not disabled by client */
...
...
@@ -897,9 +865,8 @@ static int dlfb_ops_open(struct fb_info *info, int user)
info
->
fbdefio
=
fbdefio
;
fb_deferred_io_init
(
info
);
}
#endif
dl
_notice
(
"open /dev/fb%d user=%d fb_info=%p count=%d
\n
"
,
pr
_notice
(
"open /dev/fb%d user=%d fb_info=%p count=%d
\n
"
,
info
->
node
,
user
,
info
,
dev
->
fb_count
);
return
0
;
...
...
@@ -923,7 +890,7 @@ static void dlfb_free(struct kref *kref)
kfree
(
dev
->
edid
);
dl
_warn
(
"freeing dlfb_data %p
\n
"
,
dev
);
pr
_warn
(
"freeing dlfb_data %p
\n
"
,
dev
);
kfree
(
dev
);
}
...
...
@@ -959,7 +926,7 @@ static void dlfb_free_framebuffer_work(struct work_struct *work)
/* Assume info structure is freed after this point */
framebuffer_release
(
info
);
dl
_warn
(
"fb_info for /dev/fb%d has been freed
\n
"
,
node
);
pr
_warn
(
"fb_info for /dev/fb%d has been freed
\n
"
,
node
);
/* ref taken in probe() as part of registering framebfufer */
kref_put
(
&
dev
->
kref
,
dlfb_free
);
...
...
@@ -978,16 +945,14 @@ static int dlfb_ops_release(struct fb_info *info, int user)
if
(
dev
->
virtualized
&&
(
dev
->
fb_count
==
0
))
schedule_delayed_work
(
&
dev
->
free_framebuffer_work
,
HZ
);
#ifdef CONFIG_FB_DEFERRED_IO
if
((
dev
->
fb_count
==
0
)
&&
(
info
->
fbdefio
))
{
fb_deferred_io_cleanup
(
info
);
kfree
(
info
->
fbdefio
);
info
->
fbdefio
=
NULL
;
info
->
fbops
->
fb_mmap
=
dlfb_ops_mmap
;
}
#endif
dl
_warn
(
"released /dev/fb%d user=%d count=%d
\n
"
,
pr
_warn
(
"released /dev/fb%d user=%d count=%d
\n
"
,
info
->
node
,
user
,
dev
->
fb_count
);
kref_put
(
&
dev
->
kref
,
dlfb_free
);
...
...
@@ -1005,12 +970,12 @@ static int dlfb_is_valid_mode(struct fb_videomode *mode,
struct
dlfb_data
*
dev
=
info
->
par
;
if
(
mode
->
xres
*
mode
->
yres
>
dev
->
sku_pixel_limit
)
{
dl
_warn
(
"%dx%d beyond chip capabilities
\n
"
,
pr
_warn
(
"%dx%d beyond chip capabilities
\n
"
,
mode
->
xres
,
mode
->
yres
);
return
0
;
}
dl
_info
(
"%dx%d valid mode
\n
"
,
mode
->
xres
,
mode
->
yres
);
pr
_info
(
"%dx%d valid mode
\n
"
,
mode
->
xres
,
mode
->
yres
);
return
1
;
}
...
...
@@ -1054,7 +1019,7 @@ static int dlfb_ops_set_par(struct fb_info *info)
u16
*
pix_framebuffer
;
int
i
;
dl
_notice
(
"set_par mode %dx%d
\n
"
,
info
->
var
.
xres
,
info
->
var
.
yres
);
pr
_notice
(
"set_par mode %dx%d
\n
"
,
info
->
var
.
xres
,
info
->
var
.
yres
);
result
=
dlfb_set_video_mode
(
dev
,
&
info
->
var
);
...
...
@@ -1104,7 +1069,7 @@ static int dlfb_ops_blank(int blank_mode, struct fb_info *info)
static
struct
fb_ops
dlfb_ops
=
{
.
owner
=
THIS_MODULE
,
.
fb_read
=
dlfb_op
s_read
,
.
fb_read
=
fb_sy
s_read
,
.
fb_write
=
dlfb_ops_write
,
.
fb_setcolreg
=
dlfb_ops_setcolreg
,
.
fb_fillrect
=
dlfb_ops_fillrect
,
...
...
@@ -1133,7 +1098,7 @@ static int dlfb_realloc_framebuffer(struct dlfb_data *dev, struct fb_info *info)
unsigned
char
*
new_fb
;
unsigned
char
*
new_back
;
dl
_warn
(
"Reallocating framebuffer. Addresses will change!
\n
"
);
pr
_warn
(
"Reallocating framebuffer. Addresses will change!
\n
"
);
new_len
=
info
->
fix
.
line_length
*
info
->
var
.
yres
;
...
...
@@ -1143,7 +1108,7 @@ static int dlfb_realloc_framebuffer(struct dlfb_data *dev, struct fb_info *info)
*/
new_fb
=
vmalloc
(
new_len
);
if
(
!
new_fb
)
{
dl
_err
(
"Virtual framebuffer alloc failed
\n
"
);
pr
_err
(
"Virtual framebuffer alloc failed
\n
"
);
goto
error
;
}
...
...
@@ -1165,7 +1130,7 @@ static int dlfb_realloc_framebuffer(struct dlfb_data *dev, struct fb_info *info)
*/
new_back
=
vmalloc
(
new_len
);
if
(
!
new_back
)
dl
_info
(
"No shadow/backing buffer allcoated
\n
"
);
pr
_info
(
"No shadow/backing buffer allcoated
\n
"
);
else
{
if
(
dev
->
backing_buffer
)
vfree
(
dev
->
backing_buffer
);
...
...
@@ -1207,7 +1172,7 @@ static int dlfb_setup_modes(struct dlfb_data *dev,
if
(
info
->
dev
)
/* only use mutex if info has been registered */
mutex_lock
(
&
info
->
lock
);
edid
=
kmalloc
(
MAX_EDID_SIZE
,
GFP_KERNEL
);
edid
=
kmalloc
(
EDID_LENGTH
,
GFP_KERNEL
);
if
(
!
edid
)
{
result
=
-
ENOMEM
;
goto
error
;
...
...
@@ -1223,9 +1188,9 @@ static int dlfb_setup_modes(struct dlfb_data *dev,
*/
while
(
tries
--
)
{
i
=
dlfb_get_edid
(
dev
,
edid
,
MAX_EDID_SIZE
);
i
=
dlfb_get_edid
(
dev
,
edid
,
EDID_LENGTH
);
if
(
i
>=
MIN_EDID_SIZE
)
if
(
i
>=
EDID_LENGTH
)
fb_edid_to_monspecs
(
edid
,
&
info
->
monspecs
);
if
(
info
->
monspecs
.
modedb_len
>
0
)
{
...
...
@@ -1238,24 +1203,24 @@ static int dlfb_setup_modes(struct dlfb_data *dev,
/* If that fails, use a previously returned EDID if available */
if
(
info
->
monspecs
.
modedb_len
==
0
)
{
dl
_err
(
"Unable to get valid EDID from device/display
\n
"
);
pr
_err
(
"Unable to get valid EDID from device/display
\n
"
);
if
(
dev
->
edid
)
{
fb_edid_to_monspecs
(
dev
->
edid
,
&
info
->
monspecs
);
if
(
info
->
monspecs
.
modedb_len
>
0
)
dl
_err
(
"Using previously queried EDID
\n
"
);
pr
_err
(
"Using previously queried EDID
\n
"
);
}
}
/* If that fails, use the default EDID we were handed */
if
(
info
->
monspecs
.
modedb_len
==
0
)
{
if
(
default_edid_size
>=
MIN_EDID_SIZE
)
{
if
(
default_edid_size
>=
EDID_LENGTH
)
{
fb_edid_to_monspecs
(
default_edid
,
&
info
->
monspecs
);
if
(
info
->
monspecs
.
modedb_len
>
0
)
{
memcpy
(
edid
,
default_edid
,
default_edid_size
);
dev
->
edid
=
edid
;
dev
->
edid_size
=
default_edid_size
;
dl
_err
(
"Using default/backup EDID
\n
"
);
pr
_err
(
"Using default/backup EDID
\n
"
);
}
}
}
...
...
@@ -1381,7 +1346,7 @@ static ssize_t edid_show(
if
(
off
+
count
>
dev
->
edid_size
)
count
=
dev
->
edid_size
-
off
;
dl
_info
(
"sysfs edid copy %p to %p, %d bytes
\n
"
,
pr
_info
(
"sysfs edid copy %p to %p, %d bytes
\n
"
,
dev
->
edid
,
buf
,
(
int
)
count
);
memcpy
(
buf
,
dev
->
edid
,
count
);
...
...
@@ -1398,15 +1363,13 @@ static ssize_t edid_store(
struct
dlfb_data
*
dev
=
fb_info
->
par
;
/* We only support write of entire EDID at once, no offset*/
if
((
src_size
<
MIN_EDID_SIZE
)
||
(
src_size
>
MAX_EDID_SIZE
)
||
(
src_off
!=
0
))
if
((
src_size
!=
EDID_LENGTH
)
||
(
src_off
!=
0
))
return
0
;
dlfb_setup_modes
(
dev
,
fb_info
,
src
,
src_size
);
if
(
dev
->
edid
&&
(
memcmp
(
src
,
dev
->
edid
,
src_size
)
==
0
))
{
dl
_info
(
"sysfs written EDID is new default
\n
"
);
pr
_info
(
"sysfs written EDID is new default
\n
"
);
dlfb_ops_set_par
(
fb_info
);
return
src_size
;
}
else
...
...
@@ -1431,7 +1394,7 @@ static ssize_t metrics_reset_store(struct device *fbdev,
static
struct
bin_attribute
edid_attr
=
{
.
attr
.
name
=
"edid"
,
.
attr
.
mode
=
0666
,
.
size
=
MAX_EDID_SIZE
,
.
size
=
EDID_LENGTH
,
.
read
=
edid_show
,
.
write
=
edid_store
};
...
...
@@ -1479,7 +1442,7 @@ static int dlfb_parse_vendor_descriptor(struct dlfb_data *dev,
total_len
=
usb_get_descriptor
(
usbdev
,
0x5f
,
/* vendor specific */
0
,
desc
,
MAX_VENDOR_DESCRIPTOR_SIZE
);
if
(
total_len
>
5
)
{
dl
_info
(
"vendor descriptor length:%x data:%02x %02x %02x %02x"
\
pr
_info
(
"vendor descriptor length:%x data:%02x %02x %02x %02x"
\
"%02x %02x %02x %02x %02x %02x %02x
\n
"
,
total_len
,
desc
[
0
],
desc
[
1
],
desc
[
2
],
desc
[
3
],
desc
[
4
],
desc
[
5
],
desc
[
6
],
...
...
@@ -1508,7 +1471,7 @@ static int dlfb_parse_vendor_descriptor(struct dlfb_data *dev,
case
0x0200
:
{
/* max_area */
u32
max_area
;
max_area
=
le32_to_cpu
(
*
((
u32
*
)
desc
));
dl
_warn
(
"DL chip limited to %d pixel modes
\n
"
,
pr
_warn
(
"DL chip limited to %d pixel modes
\n
"
,
max_area
);
dev
->
sku_pixel_limit
=
max_area
;
break
;
...
...
@@ -1524,7 +1487,7 @@ static int dlfb_parse_vendor_descriptor(struct dlfb_data *dev,
unrecognized:
/* allow udlfb to load for now even if firmware unrecognized */
dl
_err
(
"Unrecognized vendor firmware descriptor
\n
"
);
pr
_err
(
"Unrecognized vendor firmware descriptor
\n
"
);
success:
kfree
(
buf
);
...
...
@@ -1557,24 +1520,24 @@ static int dlfb_usb_probe(struct usb_interface *interface,
dev
->
gdev
=
&
usbdev
->
dev
;
/* our generic struct device * */
usb_set_intfdata
(
interface
,
dev
);
dl
_info
(
"%s %s - serial #%s
\n
"
,
pr
_info
(
"%s %s - serial #%s
\n
"
,
usbdev
->
manufacturer
,
usbdev
->
product
,
usbdev
->
serial
);
dl
_info
(
"vid_%04x&pid_%04x&rev_%04x driver's dlfb_data struct at %p
\n
"
,
pr
_info
(
"vid_%04x&pid_%04x&rev_%04x driver's dlfb_data struct at %p
\n
"
,
usbdev
->
descriptor
.
idVendor
,
usbdev
->
descriptor
.
idProduct
,
usbdev
->
descriptor
.
bcdDevice
,
dev
);
dl
_info
(
"console enable=%d
\n
"
,
console
);
dl
_info
(
"fb_defio enable=%d
\n
"
,
fb_defio
);
pr
_info
(
"console enable=%d
\n
"
,
console
);
pr
_info
(
"fb_defio enable=%d
\n
"
,
fb_defio
);
dev
->
sku_pixel_limit
=
2048
*
1152
;
/* default to maximum */
if
(
!
dlfb_parse_vendor_descriptor
(
dev
,
usbdev
))
{
dl
_err
(
"firmware not recognized. Assume incompatible device
\n
"
);
pr
_err
(
"firmware not recognized. Assume incompatible device
\n
"
);
goto
error
;
}
if
(
!
dlfb_alloc_urb_list
(
dev
,
WRITES_IN_FLIGHT
,
MAX_TRANSFER
))
{
retval
=
-
ENOMEM
;
dl
_err
(
"dlfb_alloc_urb_list failed
\n
"
);
pr
_err
(
"dlfb_alloc_urb_list failed
\n
"
);
goto
error
;
}
...
...
@@ -1584,7 +1547,7 @@ static int dlfb_usb_probe(struct usb_interface *interface,
info
=
framebuffer_alloc
(
0
,
&
usbdev
->
dev
);
if
(
!
info
)
{
retval
=
-
ENOMEM
;
dl
_err
(
"framebuffer_alloc failed
\n
"
);
pr
_err
(
"framebuffer_alloc failed
\n
"
);
goto
error
;
}
...
...
@@ -1595,7 +1558,7 @@ static int dlfb_usb_probe(struct usb_interface *interface,
retval
=
fb_alloc_cmap
(
&
info
->
cmap
,
256
,
0
);
if
(
retval
<
0
)
{
dl
_err
(
"fb_alloc_cmap failed %x
\n
"
,
retval
);
pr
_err
(
"fb_alloc_cmap failed %x
\n
"
,
retval
);
goto
error
;
}
...
...
@@ -1606,7 +1569,7 @@ static int dlfb_usb_probe(struct usb_interface *interface,
retval
=
dlfb_setup_modes
(
dev
,
info
,
NULL
,
0
);
if
(
retval
!=
0
)
{
dl
_err
(
"unable to find common mode for display and adapter
\n
"
);
pr
_err
(
"unable to find common mode for display and adapter
\n
"
);
goto
error
;
}
...
...
@@ -1620,7 +1583,7 @@ static int dlfb_usb_probe(struct usb_interface *interface,
retval
=
register_framebuffer
(
info
);
if
(
retval
<
0
)
{
dl
_err
(
"register_framebuffer failed %d
\n
"
,
retval
);
pr
_err
(
"register_framebuffer failed %d
\n
"
,
retval
);
goto
error
;
}
...
...
@@ -1629,7 +1592,7 @@ static int dlfb_usb_probe(struct usb_interface *interface,
device_create_bin_file
(
info
->
dev
,
&
edid_attr
);
dl
_info
(
"DisplayLink USB device /dev/fb%d attached. %dx%d resolution."
pr
_info
(
"DisplayLink USB device /dev/fb%d attached. %dx%d resolution."
" Using %dK framebuffer memory
\n
"
,
info
->
node
,
info
->
var
.
xres
,
info
->
var
.
yres
,
((
dev
->
backing_buffer
)
?
...
...
@@ -1673,7 +1636,7 @@ static void dlfb_usb_disconnect(struct usb_interface *interface)
dev
=
usb_get_intfdata
(
interface
);
info
=
dev
->
info
;
dl
_info
(
"USB disconnect starting
\n
"
);
pr
_info
(
"USB disconnect starting
\n
"
);
/* we virtualize until all fb clients release. Then we free */
dev
->
virtualized
=
true
;
...
...
@@ -1737,7 +1700,7 @@ static void dlfb_urb_completion(struct urb *urb)
if
(
!
(
urb
->
status
==
-
ENOENT
||
urb
->
status
==
-
ECONNRESET
||
urb
->
status
==
-
ESHUTDOWN
))
{
dl
_err
(
"%s - nonzero write bulk status received: %d
\n
"
,
pr
_err
(
"%s - nonzero write bulk status received: %d
\n
"
,
__func__
,
urb
->
status
);
atomic_set
(
&
dev
->
lost_pixels
,
1
);
}
...
...
@@ -1769,7 +1732,7 @@ static void dlfb_free_urb_list(struct dlfb_data *dev)
int
ret
;
unsigned
long
flags
;
dl
_notice
(
"Waiting for completes and freeing all render urbs
\n
"
);
pr
_notice
(
"Waiting for completes and freeing all render urbs
\n
"
);
/* keep waiting and freeing, until we've got 'em all */
while
(
count
--
)
{
...
...
@@ -1848,7 +1811,7 @@ static int dlfb_alloc_urb_list(struct dlfb_data *dev, int count, size_t size)
dev
->
urbs
.
count
=
i
;
dev
->
urbs
.
available
=
i
;
dl
_notice
(
"allocated %d %d byte urbs
\n
"
,
i
,
(
int
)
size
);
pr
_notice
(
"allocated %d %d byte urbs
\n
"
,
i
,
(
int
)
size
);
return
i
;
}
...
...
@@ -1865,7 +1828,7 @@ static struct urb *dlfb_get_urb(struct dlfb_data *dev)
ret
=
down_timeout
(
&
dev
->
urbs
.
limit_sem
,
GET_URB_TIMEOUT
);
if
(
ret
)
{
atomic_set
(
&
dev
->
lost_pixels
,
1
);
dl
_warn
(
"wait for urb interrupted: %x available: %d
\n
"
,
pr
_warn
(
"wait for urb interrupted: %x available: %d
\n
"
,
ret
,
dev
->
urbs
.
available
);
goto
error
;
}
...
...
@@ -1897,7 +1860,7 @@ static int dlfb_submit_urb(struct dlfb_data *dev, struct urb *urb, size_t len)
if
(
ret
)
{
dlfb_urb_completion
(
urb
);
/* because no one else will */
atomic_set
(
&
dev
->
lost_pixels
,
1
);
dl
_err
(
"usb_submit_urb error %x
\n
"
,
ret
);
pr
_err
(
"usb_submit_urb error %x
\n
"
,
ret
);
}
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
drivers/staging/udlfb
/udlfb.h
→
include/video
/udlfb.h
浏览文件 @
ca9c20ce
...
...
@@ -65,9 +65,6 @@ struct dlfb_data {
#define MAX_TRANSFER (PAGE_SIZE*16 - BULK_SIZE)
#define WRITES_IN_FLIGHT (4)
#define MIN_EDID_SIZE 128
#define MAX_EDID_SIZE 128
#define MAX_VENDOR_DESCRIPTOR_SIZE 256
#define GET_URB_TIMEOUT HZ
...
...
@@ -95,23 +92,4 @@ struct dlfb_data {
#define DL_ALIGN_UP(x, a) ALIGN(x, a)
#define DL_ALIGN_DOWN(x, a) ALIGN(x-(a-1), a)
/* remove once this gets added to sysfs.h */
#define __ATTR_RW(attr) __ATTR(attr, 0644, attr##_show, attr##_store)
/*
* udlfb is both a usb device, and a framebuffer device.
* They may exist at the same time, but during various stages
* inactivity, teardown, or "virtual" operation, only one or the
* other will exist (one will outlive the other). So we can't
* call the dev_*() macros, because we don't have a stable dev object.
*/
#define dl_err(format, arg...) \
pr_err("udlfb: " format, ## arg)
#define dl_warn(format, arg...) \
pr_warning("udlfb: " format, ## arg)
#define dl_notice(format, arg...) \
pr_notice("udlfb: " format, ## arg)
#define dl_info(format, arg...) \
pr_info("udlfb: " format, ## arg)
#endif
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部