This series fixes various poll bugs. The first patch fixes a vivid bug w.r.t. the disconnect error injection. It is identical to: https://patchwork.linuxtv.org/project/linux-media/patch/74c0afae-3925-29c2-fa73-6c773c8d10c6@xxxxxxxxx/ This fix allows us to test disconnect using vivid in v4l2-compliance (a patch for that will be posted separately). The next two patches are from Alexandre and are unchanged from his v2 series: https://patchwork.linuxtv.org/project/linux-media/cover/20201123151843.798205-1-gnurou@xxxxxxxxx/ See that link for more info about these two patches. The fourth patch introduces v4l2_event_wake_all(), which needs to be called when unregistering a video device since otherwise any processes that wait for an event won't wake up. The fifth patch does the same for the vivid disconnect error injection functionality. Again, this allows us to test that this works using vivid and v4l2-compliance. The last two patches add EPOLLPRI to the event mask when poll() sees that the video or cec device is unregistered. This is needed because if select() is called and it only checks for exceptions, then it will only return if EPOLLPRI is set. I'll post a patch for v4l2-compliance separately that will test this special case using vivid. Regards, Hans Alexandre Courbot (2): media: videobuf2: always call poll_wait() on queues media: v4l2-mem2mem: always call poll_wait() on queues Hans Verkuil (5): vivid: fix 'disconnect' error injection v4l2-dev/event: add v4l2_event_wake_all() vivid: call v4l2_event_wake_all() on disconnect v4l2-dev: add EPOLLPRI in v4l2_poll() when dev is unregistered cec: add EPOLLPRI in poll() when dev is unregistered drivers/media/cec/core/cec-api.c | 2 +- .../media/common/videobuf2/videobuf2-core.c | 11 +++- drivers/media/test-drivers/vivid/vivid-core.c | 65 ++++++++++++------- drivers/media/test-drivers/vivid/vivid-core.h | 1 + .../media/test-drivers/vivid/vivid-ctrls.c | 27 +++++--- drivers/media/v4l2-core/v4l2-dev.c | 15 +++-- drivers/media/v4l2-core/v4l2-event.c | 17 +++++ drivers/media/v4l2-core/v4l2-mem2mem.c | 15 ++++- include/media/v4l2-event.h | 13 +++- 9 files changed, 123 insertions(+), 43 deletions(-) -- 2.29.2