lkml.org 
[lkml]   [2004]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/9] Update saa7146 driver core
    Date
    - [DVB] saa7146: fix timeout bug on AMD64 in saa7146_wait_for_debi_done()
    - [DVB] saa7146: release resources for video overlay properly, don't (incorrectly) rely on VIDIOC_OVERLAY(0)
    diff -uNrwB --new-file xx-linux-2.6.3/drivers/media/common/saa7146_core.c linux-2.6.3.p/drivers/media/common/saa7146_core.c
    --- xx-linux-2.6.3/drivers/media/common/saa7146_core.c 2004-02-23 12:34:26.000000000 +0100
    +++ linux-2.6.3.p/drivers/media/common/saa7146_core.c 2004-02-23 12:52:31.000000000 +0100
    @@ -69,14 +69,14 @@
    /* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */
    int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
    {
    - int start;
    + unsigned long start;

    /* wait for registers to be programmed */
    start = jiffies;
    while (1) {
    if (saa7146_read(dev, MC2) & 2)
    break;
    - if (jiffies-start > HZ/20) {
    + if (time_after(jiffies, start + HZ/20)) {
    DEB_S(("timed out while waiting for registers getting programmed\n"));
    return -ETIMEDOUT;
    }
    @@ -88,7 +88,7 @@
    if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S))
    break;
    saa7146_read(dev, MC2);
    - if (jiffies-start > HZ/4) {
    + if (time_after(jiffies, start + HZ/4)) {
    DEB_S(("timed out while waiting for transfer completion\n"));
    return -ETIMEDOUT;
    }
    diff -uNrwB --new-file xx-linux-2.6.3/drivers/media/common/saa7146_video.c linux-2.6.3.p/drivers/media/common/saa7146_video.c
    --- xx-linux-2.6.3/drivers/media/common/saa7146_video.c 2004-02-23 12:34:26.000000000 +0100
    +++ linux-2.6.3.p/drivers/media/common/saa7146_video.c 2004-02-02 21:13:12.000000000 +0100
    @@ -1413,6 +1419,7 @@
    spin_lock_irqsave(&dev->slock,flags);
    saa7146_stop_preview(fh);
    spin_unlock_irqrestore(&dev->slock,flags);
    + saa7146_res_free(fh, RESOURCE_DMA1_HPS|RESOURCE_DMA2_CLP);
    }
    }


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:01    [W:0.044 / U:1.484 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site