Merge tag 'drm-msm-fixes-2019-01-24' of git://people.freedesktop.org/~robclark/linux into drm-fixes
A few fixes for v5.0.. the opp-level fix and removal of hard-coded irq name is partially to make things smoother in v5.1 merge window to avoid dependency on drm vs dt trees, but are otherwise sane changes. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGsAEHd2tGRQxRTs+A-8y_tthPs2iUgCCCEwR5vDMXab4A@mail.gmail.com
This commit is contained in:
@@ -115,7 +115,9 @@ static void rd_write(struct msm_rd_state *rd, const void *buf, int sz)
|
||||
char *fptr = &fifo->buf[fifo->head];
|
||||
int n;
|
||||
|
||||
wait_event(rd->fifo_event, circ_space(&rd->fifo) > 0);
|
||||
wait_event(rd->fifo_event, circ_space(&rd->fifo) > 0 || !rd->open);
|
||||
if (!rd->open)
|
||||
return;
|
||||
|
||||
/* Note that smp_load_acquire() is not strictly required
|
||||
* as CIRC_SPACE_TO_END() does not access the tail more
|
||||
@@ -213,7 +215,10 @@ out:
|
||||
static int rd_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct msm_rd_state *rd = inode->i_private;
|
||||
|
||||
rd->open = false;
|
||||
wake_up_all(&rd->fifo_event);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user