Skip to content

Commit 2c29cfc

Browse files
Mikulas Patockabzolnier
authored andcommitted
udlfb: make a local copy of fb_ops
The defio subsystem overwrites the method fb_osp->mmap. That method is stored in module's static data - and that means that if we have multiple diplaylink adapters, they will over write each other's method. In order to avoid interference between multiple adapters, we copy the fb_ops structure to a device-local memory. Signed-off-by: Mikulas Patocka <[email protected]> Cc: [email protected] Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
1 parent 564f180 commit 2c29cfc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/video/fbdev/udlfb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,8 @@ static void dlfb_init_framebuffer_work(struct work_struct *work)
16651665
dlfb->info = info;
16661666
info->par = dlfb;
16671667
info->pseudo_palette = dlfb->pseudo_palette;
1668-
info->fbops = &dlfb_ops;
1668+
dlfb->ops = dlfb_ops;
1669+
info->fbops = &dlfb->ops;
16691670

16701671
retval = fb_alloc_cmap(&info->cmap, 256, 0);
16711672
if (retval < 0) {

include/video/udlfb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ struct dlfb_data {
5151
int base8;
5252
u32 pseudo_palette[256];
5353
int blank_mode; /*one of FB_BLANK_ */
54+
struct fb_ops ops;
5455
/* blit-only rendering path metrics, exposed through sysfs */
5556
atomic_t bytes_rendered; /* raw pixel-bytes driver asked to render */
5657
atomic_t bytes_identical; /* saved effort with backbuffer comparison */

0 commit comments

Comments
 (0)