Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268066AbUIPNd7 (ORCPT ); Thu, 16 Sep 2004 09:33:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268079AbUIPNd5 (ORCPT ); Thu, 16 Sep 2004 09:33:57 -0400 Received: from mproxy.gmail.com ([216.239.56.251]:39468 "EHLO mproxy.gmail.com") by vger.kernel.org with ESMTP id S268066AbUIPNbS (ORCPT ); Thu, 16 Sep 2004 09:31:18 -0400 Message-ID: <21d7e99704091606315a4cc51a@mail.gmail.com> Date: Thu, 16 Sep 2004 23:31:15 +1000 From: Dave Airlie Reply-To: Dave Airlie To: Dave Airlie Subject: Re: [BK pull] [DRM] latest DRM patches.. Cc: torvalds@osdl.org, Andrew Morton , linux-kernel@vger.kernel.org In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6269 Lines: 160 I've just added another changeset to use __set_current_state after Alan suggested it as the proper construct to use in the DRM... Dave. On Thu, 16 Sep 2004 12:27:52 +0100 (IST), Dave Airlie wrote: > > Hi Linus, > > Please do a > > bk pull bk://drm.bkbits.net/drm-2.6 > > This will include the latest DRM changes and will update the following files: > > drivers/char/drm/drm_drv.h | 11 +++++++---- > drivers/char/drm/drm_os_linux.h | 4 ++-- > drivers/char/drm/drm_scatter.h | 2 +- > drivers/char/drm/i830_irq.c | 4 ++-- > 4 files changed, 12 insertions(+), 9 deletions(-) > > through these ChangeSets: > > (04/09/16 1.1904) > drm: use set_current_state instead of direct assignment > > Suggested-by: Nishanth Aravamudan > Approved-by: Dave Airlie > > (04/09/16 1.1903) > drm: add pci_enable_device > > Add pci_enable_device for any PCI device we want to use. > > From: Bjorn Helgaas > Approved-by: David Airlie > > (04/09/16 1.1902) > drm: fix bug introduced in the macro removal > > This caused issues with a PCI radeon card. > > From: Jon Smirl > Approved-by: Dave Airlie > > diff -Nru a/drivers/char/drm/drm_drv.h b/drivers/char/drm/drm_drv.h > --- a/drivers/char/drm/drm_drv.h Thu Sep 16 21:24:25 2004 > +++ b/drivers/char/drm/drm_drv.h Thu Sep 16 21:24:25 2004 > @@ -480,6 +480,9 @@ > if (DRM(numdevs) >= MAX_DEVICES) > return -ENODEV; > > + if ((retcode=pci_enable_device(pdev))) > + return retcode; > + > dev = &(DRM(device)[DRM(numdevs)]); > > memset( (void *)dev, 0, sizeof(*dev) ); > @@ -785,7 +788,7 @@ > > add_wait_queue( &dev->lock.lock_queue, &entry ); > for (;;) { > - current->state = TASK_INTERRUPTIBLE; > + set_current_state(TASK_INTERRUPTIBLE); > if ( !dev->lock.hw_lock ) { > /* Device has been unregistered */ > retcode = -EINTR; > @@ -805,7 +808,7 @@ > break; > } > } > - current->state = TASK_RUNNING; > + set_current_state(TASK_RUNNING); > remove_wait_queue( &dev->lock.lock_queue, &entry ); > if( !retcode ) { > if (dev->fn_tbl.release) > @@ -985,7 +988,7 @@ > > add_wait_queue( &dev->lock.lock_queue, &entry ); > for (;;) { > - current->state = TASK_INTERRUPTIBLE; > + set_current_state(TASK_INTERRUPTIBLE); > if ( !dev->lock.hw_lock ) { > /* Device has been unregistered */ > ret = -EINTR; > @@ -1006,7 +1009,7 @@ > break; > } > } > - current->state = TASK_RUNNING; > + set_current_state(TASK_RUNNING); > remove_wait_queue( &dev->lock.lock_queue, &entry ); > > sigemptyset( &dev->sigmask ); > diff -Nru a/drivers/char/drm/drm_os_linux.h b/drivers/char/drm/drm_os_linux.h > --- a/drivers/char/drm/drm_os_linux.h Thu Sep 16 21:24:25 2004 > +++ b/drivers/char/drm/drm_os_linux.h Thu Sep 16 21:24:25 2004 > @@ -134,7 +134,7 @@ > add_wait_queue(&(queue), &entry); \ > \ > for (;;) { \ > - current->state = TASK_INTERRUPTIBLE; \ > + set_current_state(TASK_INTERRUPTIBLE); \ > if (condition) \ > break; \ > if (time_after_eq(jiffies, end)) { \ > @@ -147,7 +147,7 @@ > break; \ > } \ > } \ > - current->state = TASK_RUNNING; \ > + set_current_state(TASK_RUNNING); \ > remove_wait_queue(&(queue), &entry); \ > } while (0) > > diff -Nru a/drivers/char/drm/drm_scatter.h b/drivers/char/drm/drm_scatter.h > --- a/drivers/char/drm/drm_scatter.h Thu Sep 16 21:24:25 2004 > +++ b/drivers/char/drm/drm_scatter.h Thu Sep 16 21:24:25 2004 > @@ -73,7 +73,7 @@ > > DRM_DEBUG( "%s\n", __FUNCTION__ ); > > - if (drm_core_check_feature(dev, DRIVER_SG)) > + if (!drm_core_check_feature(dev, DRIVER_SG)) > return -EINVAL; > > if ( dev->sg ) > diff -Nru a/drivers/char/drm/i830_irq.c b/drivers/char/drm/i830_irq.c > --- a/drivers/char/drm/i830_irq.c Thu Sep 16 21:24:25 2004 > +++ b/drivers/char/drm/i830_irq.c Thu Sep 16 21:24:25 2004 > @@ -92,7 +92,7 @@ > add_wait_queue(&dev_priv->irq_queue, &entry); > > for (;;) { > - current->state = TASK_INTERRUPTIBLE; > + set_current_state(TASK_INTERRUPTIBLE); > if (atomic_read(&dev_priv->irq_received) >= irq_nr) > break; > if((signed)(end - jiffies) <= 0) { > @@ -112,7 +112,7 @@ > } > } > > - current->state = TASK_RUNNING; > + set_current_state(TASK_RUNNING); > remove_wait_queue(&dev_priv->irq_queue, &entry); > return ret; > } > - > 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/ > - 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/