Re: [PATCH] ARM: PXA: Make PXA27x/PXA3xx overlay actually work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 15, 2011 at 5:48 PM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Tue, Feb 15, 2011 at 03:35:44PM +0800, Eric Miao wrote:
>> > @@ -720,12 +726,10 @@ static int overlayfb_open(struct fb_info *info, int user)
>> > Â Â Â Âif (user == 0)
>> > Â Â Â Â Â Â Â Âreturn -ENODEV;
>> >
>> > - Â Â Â /* allow only one user at a time */
>> > - Â Â Â if (atomic_inc_and_test(&ofb->usage))
>> > - Â Â Â Â Â Â Â return -EBUSY;
>> > + Â Â Â if (ofb->usage++ == 0)
>> > + Â Â Â Â Â Â Â /* unblank the base framebuffer */
>> > + Â Â Â Â Â Â Â fb_blank(&ofb->fbi->fb, FB_BLANK_UNBLANK);
>>
>> The change above allows multiple user at a time? Then I guess
>> some other places need to be changed accordingly to avoid the
>> racing conditions.
>
> You can't prevent multiple users. ÂThink threaded applications which
> share the same set of fds.
>
> Any driver which tries to do so by restricting the number of open()s is
> simply buggy.
>

OK, let's go ahead fix the racing conditions later.
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux